From 66ed9a18049bd7d0e30cb740ea7272aa294d6a0a Mon Sep 17 00:00:00 2001 From: comex Date: Sun, 22 Sep 2013 18:44:55 -0400 Subject: [PATCH] Upgrade WX to r74856, mainly to support @2x. --- Externals/wxWidgets3/CMakeLists.txt | 31 +- Externals/wxWidgets3/art/addbookm.xpm | 48 +- Externals/wxWidgets3/art/back.xpm | 42 +- Externals/wxWidgets3/art/cdrom.xpm | 114 +- Externals/wxWidgets3/art/copy.xpm | 88 +- Externals/wxWidgets3/art/cross.xpm | 34 +- Externals/wxWidgets3/art/cut.xpm | 92 +- Externals/wxWidgets3/art/deffile.xpm | 108 +- Externals/wxWidgets3/art/delbookm.xpm | 48 +- Externals/wxWidgets3/art/delete.xpm | 84 +- Externals/wxWidgets3/art/dir_up.xpm | 104 +- Externals/wxWidgets3/art/down.xpm | 42 +- Externals/wxWidgets3/art/exefile.xpm | 146 +- Externals/wxWidgets3/art/fileopen.xpm | 114 +- Externals/wxWidgets3/art/filesave.xpm | 84 +- Externals/wxWidgets3/art/filesaveas.xpm | 88 +- Externals/wxWidgets3/art/find.xpm | 124 +- Externals/wxWidgets3/art/findrepl.xpm | 126 +- Externals/wxWidgets3/art/floppy.xpm | 78 +- Externals/wxWidgets3/art/folder.xpm | 86 +- Externals/wxWidgets3/art/folder_open.xpm | 104 +- Externals/wxWidgets3/art/forward.xpm | 42 +- Externals/wxWidgets3/art/gtk/error.xpm | 116 +- Externals/wxWidgets3/art/gtk/info.xpm | 126 +- Externals/wxWidgets3/art/gtk/question.xpm | 150 +- Externals/wxWidgets3/art/gtk/warning.xpm | 126 +- Externals/wxWidgets3/art/harddisk.xpm | 120 +- Externals/wxWidgets3/art/helpicon.xpm | 88 +- Externals/wxWidgets3/art/home.xpm | 48 +- Externals/wxWidgets3/art/htmbook.xpm | 50 +- Externals/wxWidgets3/art/htmfoldr.xpm | 50 +- Externals/wxWidgets3/art/htmoptns.xpm | 40 +- Externals/wxWidgets3/art/htmpage.xpm | 46 +- Externals/wxWidgets3/art/htmsidep.xpm | 54 +- Externals/wxWidgets3/art/listview.xpm | 50 +- Externals/wxWidgets3/art/missimg.xpm | 86 +- Externals/wxWidgets3/art/motif/error.xpm | 116 +- Externals/wxWidgets3/art/motif/info.xpm | 126 +- Externals/wxWidgets3/art/motif/question.xpm | 150 +- Externals/wxWidgets3/art/motif/warning.xpm | 126 +- Externals/wxWidgets3/art/new.xpm | 100 +- Externals/wxWidgets3/art/new_dir.xpm | 86 +- Externals/wxWidgets3/art/paste.xpm | 92 +- Externals/wxWidgets3/art/print.xpm | 120 +- Externals/wxWidgets3/art/quit.xpm | 180 +- Externals/wxWidgets3/art/redo.xpm | 116 +- Externals/wxWidgets3/art/removable.xpm | 88 +- Externals/wxWidgets3/art/repview.xpm | 48 +- Externals/wxWidgets3/art/tick.xpm | 34 +- Externals/wxWidgets3/art/tipicon.xpm | 94 +- Externals/wxWidgets3/art/toparent.xpm | 42 +- Externals/wxWidgets3/art/undo.xpm | 116 +- Externals/wxWidgets3/art/up.xpm | 42 +- Externals/wxWidgets3/art/wxwin16x16.xpm | 322 +-- Externals/wxWidgets3/art/wxwin32x32.xpm | 884 ++++---- .../wxWidgets3/build/msw/wx_base.vcxproj | 30 +- .../build/msw/wx_base.vcxproj.filters | 80 +- Externals/wxWidgets3/build_wx.sh | 2 +- Externals/wxWidgets3/include/msvc/wx/setup.h | 254 +++ Externals/wxWidgets3/include/wx/aboutdlg.h | 1 - Externals/wxWidgets3/include/wx/accel.h | 10 +- Externals/wxWidgets3/include/wx/access.h | 1 - .../wxWidgets3/include/wx/affinematrix2d.h | 2 +- Externals/wxWidgets3/include/wx/afterstd.h | 3 +- Externals/wxWidgets3/include/wx/anidecod.h | 1 - Externals/wxWidgets3/include/wx/animate.h | 1 - Externals/wxWidgets3/include/wx/animdecod.h | 1 - Externals/wxWidgets3/include/wx/any.h | 5 +- Externals/wxWidgets3/include/wx/anybutton.h | 1 - Externals/wxWidgets3/include/wx/anystr.h | 1 - Externals/wxWidgets3/include/wx/app.h | 61 +- Externals/wxWidgets3/include/wx/apptrait.h | 7 - Externals/wxWidgets3/include/wx/archive.h | 1 - Externals/wxWidgets3/include/wx/arrimpl.cpp | 7 +- Externals/wxWidgets3/include/wx/arrstr.h | 3 +- Externals/wxWidgets3/include/wx/artprov.h | 1 - Externals/wxWidgets3/include/wx/atomic.h | 1 - Externals/wxWidgets3/include/wx/aui/aui.h | 1 - Externals/wxWidgets3/include/wx/aui/auibar.h | 90 +- Externals/wxWidgets3/include/wx/aui/auibook.h | 411 +--- Externals/wxWidgets3/include/wx/aui/dockart.h | 1 - .../wxWidgets3/include/wx/aui/floatpane.h | 1 - .../wxWidgets3/include/wx/aui/framemanager.h | 1 - Externals/wxWidgets3/include/wx/aui/tabart.h | 324 +++ .../wxWidgets3/include/wx/aui/tabartgtk.h | 58 + Externals/wxWidgets3/include/wx/aui/tabmdi.h | 7 +- .../wxWidgets3/include/wx/bannerwindow.h | 1 - Externals/wxWidgets3/include/wx/base64.h | 1 - Externals/wxWidgets3/include/wx/beforestd.h | 1 - Externals/wxWidgets3/include/wx/bitmap.h | 38 +- Externals/wxWidgets3/include/wx/bmpbuttn.h | 9 +- Externals/wxWidgets3/include/wx/bmpcbox.h | 1 - Externals/wxWidgets3/include/wx/bookctrl.h | 33 +- Externals/wxWidgets3/include/wx/brush.h | 17 +- Externals/wxWidgets3/include/wx/buffer.h | 6 +- Externals/wxWidgets3/include/wx/build.h | 1 - Externals/wxWidgets3/include/wx/busyinfo.h | 1 - Externals/wxWidgets3/include/wx/button.h | 1 - Externals/wxWidgets3/include/wx/calctrl.h | 1 - Externals/wxWidgets3/include/wx/caret.h | 1 - Externals/wxWidgets3/include/wx/chartype.h | 8 +- Externals/wxWidgets3/include/wx/checkbox.h | 1 - .../wxWidgets3/include/wx/checkeddelete.h | 22 +- Externals/wxWidgets3/include/wx/checklst.h | 3 +- Externals/wxWidgets3/include/wx/chkconf.h | 55 +- Externals/wxWidgets3/include/wx/choicdlg.h | 1 - Externals/wxWidgets3/include/wx/choice.h | 8 +- Externals/wxWidgets3/include/wx/choicebk.h | 18 +- Externals/wxWidgets3/include/wx/clipbrd.h | 1 - Externals/wxWidgets3/include/wx/clntdata.h | 1 - Externals/wxWidgets3/include/wx/clrpicker.h | 16 +- Externals/wxWidgets3/include/wx/cmdargs.h | 1 - Externals/wxWidgets3/include/wx/cmdline.h | 1 - Externals/wxWidgets3/include/wx/cmdproc.h | 1 - Externals/wxWidgets3/include/wx/cmndata.h | 1 - .../include/wx/cocoa/NSApplication.h | 1 - Externals/wxWidgets3/include/wx/cocoa/NSBox.h | 1 - .../wxWidgets3/include/wx/cocoa/NSButton.h | 1 - .../wxWidgets3/include/wx/cocoa/NSControl.h | 1 - .../wxWidgets3/include/wx/cocoa/NSMenu.h | 1 - .../wxWidgets3/include/wx/cocoa/NSPanel.h | 1 - .../wxWidgets3/include/wx/cocoa/NSScroller.h | 1 - .../wxWidgets3/include/wx/cocoa/NSSlider.h | 1 - .../wxWidgets3/include/wx/cocoa/NSTabView.h | 1 - .../include/wx/cocoa/NSTableDataSource.h | 1 - .../wxWidgets3/include/wx/cocoa/NSTableView.h | 1 - .../wxWidgets3/include/wx/cocoa/NSTextField.h | 1 - .../wxWidgets3/include/wx/cocoa/NSView.h | 1 - .../wxWidgets3/include/wx/cocoa/NSWindow.h | 1 - .../include/wx/cocoa/ObjcAssociate.h | 1 - .../wxWidgets3/include/wx/cocoa/ObjcRef.h | 1 - Externals/wxWidgets3/include/wx/cocoa/app.h | 1 - .../wxWidgets3/include/wx/cocoa/autorelease.h | 1 - .../wxWidgets3/include/wx/cocoa/bitmap.h | 4 +- .../wxWidgets3/include/wx/cocoa/bmpbuttn.h | 1 - Externals/wxWidgets3/include/wx/cocoa/brush.h | 1 - .../wxWidgets3/include/wx/cocoa/button.h | 1 - .../wxWidgets3/include/wx/cocoa/checkbox.h | 1 - .../wxWidgets3/include/wx/cocoa/checklst.h | 1 - .../wxWidgets3/include/wx/cocoa/chkconf.h | 1 - .../wxWidgets3/include/wx/cocoa/choice.h | 1 - .../wxWidgets3/include/wx/cocoa/clipbrd.h | 1 - .../wxWidgets3/include/wx/cocoa/colour.h | 1 - .../wxWidgets3/include/wx/cocoa/combobox.h | 1 - .../wxWidgets3/include/wx/cocoa/control.h | 1 - .../wxWidgets3/include/wx/cocoa/cursor.h | 1 - .../wxWidgets3/include/wx/cocoa/dataform.h | 1 - .../wxWidgets3/include/wx/cocoa/dataobj.h | 1 - .../wxWidgets3/include/wx/cocoa/dataobj2.h | 1 - Externals/wxWidgets3/include/wx/cocoa/dc.h | 5 +- .../wxWidgets3/include/wx/cocoa/dcclient.h | 1 - .../wxWidgets3/include/wx/cocoa/dcmemory.h | 1 - .../wxWidgets3/include/wx/cocoa/dcscreen.h | 1 - .../wxWidgets3/include/wx/cocoa/dialog.h | 1 - .../wxWidgets3/include/wx/cocoa/dirdlg.h | 1 - .../wxWidgets3/include/wx/cocoa/evtloop.h | 6 +- .../wxWidgets3/include/wx/cocoa/filedlg.h | 1 - Externals/wxWidgets3/include/wx/cocoa/font.h | 28 +- Externals/wxWidgets3/include/wx/cocoa/frame.h | 1 - Externals/wxWidgets3/include/wx/cocoa/gauge.h | 1 - .../wxWidgets3/include/wx/cocoa/glcanvas.h | 1 - Externals/wxWidgets3/include/wx/cocoa/icon.h | 1 - .../wxWidgets3/include/wx/cocoa/listbox.h | 1 - Externals/wxWidgets3/include/wx/cocoa/log.h | 1 - .../wxWidgets3/include/wx/cocoa/mbarman.h | 1 - Externals/wxWidgets3/include/wx/cocoa/mdi.h | 1 - Externals/wxWidgets3/include/wx/cocoa/menu.h | 1 - .../wxWidgets3/include/wx/cocoa/menuitem.h | 1 - .../wxWidgets3/include/wx/cocoa/msgdlg.h | 1 - .../wxWidgets3/include/wx/cocoa/notebook.h | 1 - .../wxWidgets3/include/wx/cocoa/objc/NSMenu.h | 1 - .../include/wx/cocoa/objc/NSSlider.h | 1 - .../wxWidgets3/include/wx/cocoa/objc/NSView.h | 1 - .../include/wx/cocoa/objc/NSWindow.h | 1 - .../include/wx/cocoa/objc/objc_uniquifying.h | 1 - Externals/wxWidgets3/include/wx/cocoa/pen.h | 1 - .../include/wx/cocoa/private/fontfactory.h | 1 - .../include/wx/cocoa/private/scrollview.h | 1 - .../include/wx/cocoa/private/timer.h | 1 - .../wxWidgets3/include/wx/cocoa/radiobox.h | 1 - .../wxWidgets3/include/wx/cocoa/radiobut.h | 1 - .../wxWidgets3/include/wx/cocoa/region.h | 1 - .../wxWidgets3/include/wx/cocoa/scrolbar.h | 1 - .../wxWidgets3/include/wx/cocoa/slider.h | 1 - Externals/wxWidgets3/include/wx/cocoa/sound.h | 1 - .../wxWidgets3/include/wx/cocoa/spinbutt.h | 1 - .../wxWidgets3/include/wx/cocoa/statbmp.h | 1 - .../wxWidgets3/include/wx/cocoa/statbox.h | 1 - .../wxWidgets3/include/wx/cocoa/statline.h | 1 - .../wxWidgets3/include/wx/cocoa/stattext.h | 1 - .../wxWidgets3/include/wx/cocoa/string.h | 1 - .../wxWidgets3/include/wx/cocoa/taskbar.h | 1 - .../wxWidgets3/include/wx/cocoa/textctrl.h | 1 - .../wxWidgets3/include/wx/cocoa/toolbar.h | 1 - .../wxWidgets3/include/wx/cocoa/tooltip.h | 1 - .../wxWidgets3/include/wx/cocoa/toplevel.h | 1 - .../include/wx/cocoa/trackingrectmanager.h | 1 - .../wxWidgets3/include/wx/cocoa/window.h | 1 - Externals/wxWidgets3/include/wx/collpane.h | 10 +- Externals/wxWidgets3/include/wx/colordlg.h | 1 - Externals/wxWidgets3/include/wx/colour.h | 2 +- Externals/wxWidgets3/include/wx/colourdata.h | 1 - Externals/wxWidgets3/include/wx/combo.h | 12 +- Externals/wxWidgets3/include/wx/combobox.h | 5 +- .../wxWidgets3/include/wx/commandlinkbutton.h | 1 - Externals/wxWidgets3/include/wx/compiler.h | 151 ++ .../wxWidgets3/include/wx/compositewin.h | 1 - Externals/wxWidgets3/include/wx/confbase.h | 3 +- Externals/wxWidgets3/include/wx/config.h | 1 - Externals/wxWidgets3/include/wx/containr.h | 94 +- Externals/wxWidgets3/include/wx/control.h | 7 +- Externals/wxWidgets3/include/wx/convauto.h | 1 - Externals/wxWidgets3/include/wx/cpp.h | 104 +- Externals/wxWidgets3/include/wx/cppunit.h | 1 - Externals/wxWidgets3/include/wx/crt.h | 1 - Externals/wxWidgets3/include/wx/cshelp.h | 1 - Externals/wxWidgets3/include/wx/ctrlsub.h | 7 +- Externals/wxWidgets3/include/wx/cursor.h | 7 +- Externals/wxWidgets3/include/wx/custombgwin.h | 1 - Externals/wxWidgets3/include/wx/dataobj.h | 40 +- Externals/wxWidgets3/include/wx/dataview.h | 135 +- Externals/wxWidgets3/include/wx/datectrl.h | 1 - Externals/wxWidgets3/include/wx/dateevt.h | 1 - Externals/wxWidgets3/include/wx/datetime.h | 200 +- .../wxWidgets3/include/wx/datetimectrl.h | 1 - Externals/wxWidgets3/include/wx/datstrm.h | 99 +- Externals/wxWidgets3/include/wx/dc.h | 35 +- Externals/wxWidgets3/include/wx/dcbuffer.h | 3 +- Externals/wxWidgets3/include/wx/dcclient.h | 1 - Externals/wxWidgets3/include/wx/dcgraph.h | 22 +- Externals/wxWidgets3/include/wx/dcmemory.h | 1 - Externals/wxWidgets3/include/wx/dcmirror.h | 34 +- Externals/wxWidgets3/include/wx/dcprint.h | 1 - Externals/wxWidgets3/include/wx/dcps.h | 1 - Externals/wxWidgets3/include/wx/dcscreen.h | 1 - Externals/wxWidgets3/include/wx/dcsvg.h | 38 +- Externals/wxWidgets3/include/wx/dde.h | 1 - Externals/wxWidgets3/include/wx/debug.h | 87 +- Externals/wxWidgets3/include/wx/debugrpt.h | 1 - Externals/wxWidgets3/include/wx/defs.h | 381 +++- Externals/wxWidgets3/include/wx/dialog.h | 50 +- Externals/wxWidgets3/include/wx/dialup.h | 1 - Externals/wxWidgets3/include/wx/dir.h | 19 +- Externals/wxWidgets3/include/wx/dirctrl.h | 1 - Externals/wxWidgets3/include/wx/dirdlg.h | 1 - Externals/wxWidgets3/include/wx/display.h | 1 - .../wxWidgets3/include/wx/display_impl.h | 1 - Externals/wxWidgets3/include/wx/dlimpexp.h | 26 +- Externals/wxWidgets3/include/wx/dnd.h | 3 +- Externals/wxWidgets3/include/wx/docmdi.h | 1 - Externals/wxWidgets3/include/wx/docview.h | 83 +- Externals/wxWidgets3/include/wx/dragimag.h | 1 - Externals/wxWidgets3/include/wx/dvrenderers.h | 10 +- Externals/wxWidgets3/include/wx/dynarray.h | 14 +- Externals/wxWidgets3/include/wx/dynlib.h | 8 +- Externals/wxWidgets3/include/wx/dynload.h | 8 +- Externals/wxWidgets3/include/wx/editlbox.h | 5 +- Externals/wxWidgets3/include/wx/effects.h | 1 - Externals/wxWidgets3/include/wx/encconv.h | 8 +- Externals/wxWidgets3/include/wx/encinfo.h | 1 - Externals/wxWidgets3/include/wx/event.h | 536 ++++- Externals/wxWidgets3/include/wx/eventfilter.h | 1 - Externals/wxWidgets3/include/wx/evtloop.h | 104 +- Externals/wxWidgets3/include/wx/evtloopsrc.h | 10 +- Externals/wxWidgets3/include/wx/except.h | 1 - Externals/wxWidgets3/include/wx/fdrepdlg.h | 32 +- Externals/wxWidgets3/include/wx/features.h | 1 - Externals/wxWidgets3/include/wx/ffile.h | 3 +- Externals/wxWidgets3/include/wx/file.h | 9 +- Externals/wxWidgets3/include/wx/fileconf.h | 1 - Externals/wxWidgets3/include/wx/filectrl.h | 1 - Externals/wxWidgets3/include/wx/filedlg.h | 11 +- Externals/wxWidgets3/include/wx/filefn.h | 57 +- Externals/wxWidgets3/include/wx/filehistory.h | 1 - Externals/wxWidgets3/include/wx/filename.h | 81 +- Externals/wxWidgets3/include/wx/filepicker.h | 38 +- Externals/wxWidgets3/include/wx/filesys.h | 14 +- Externals/wxWidgets3/include/wx/flags.h | 1 - Externals/wxWidgets3/include/wx/fmappriv.h | 1 - Externals/wxWidgets3/include/wx/font.h | 147 +- Externals/wxWidgets3/include/wx/fontdata.h | 1 - Externals/wxWidgets3/include/wx/fontdlg.h | 3 - Externals/wxWidgets3/include/wx/fontenc.h | 9 +- Externals/wxWidgets3/include/wx/fontenum.h | 1 - Externals/wxWidgets3/include/wx/fontmap.h | 1 - Externals/wxWidgets3/include/wx/fontpicker.h | 19 +- Externals/wxWidgets3/include/wx/fontutil.h | 6 +- Externals/wxWidgets3/include/wx/frame.h | 5 +- Externals/wxWidgets3/include/wx/fs_arc.h | 1 - Externals/wxWidgets3/include/wx/fs_filter.h | 1 - Externals/wxWidgets3/include/wx/fs_zip.h | 1 - Externals/wxWidgets3/include/wx/fswatcher.h | 61 +- Externals/wxWidgets3/include/wx/gauge.h | 1 - Externals/wxWidgets3/include/wx/gbsizer.h | 16 +- Externals/wxWidgets3/include/wx/gdicmn.h | 52 +- Externals/wxWidgets3/include/wx/gdiobj.h | 1 - .../wxWidgets3/include/wx/generic/aboutdlgg.h | 1 - .../wxWidgets3/include/wx/generic/accel.h | 1 - .../wxWidgets3/include/wx/generic/animate.h | 1 - .../wxWidgets3/include/wx/generic/bmpcbox.h | 1 - .../wxWidgets3/include/wx/generic/busyinfo.h | 1 - .../wxWidgets3/include/wx/generic/buttonbar.h | 1 - .../wxWidgets3/include/wx/generic/calctrlg.h | 1 - .../wxWidgets3/include/wx/generic/caret.h | 1 - .../wxWidgets3/include/wx/generic/choicdgg.h | 1 - .../include/wx/generic/clrpickerg.h | 1 - .../wxWidgets3/include/wx/generic/collpaneg.h | 1 - .../wxWidgets3/include/wx/generic/colour.h | 1 - .../wxWidgets3/include/wx/generic/colrdlgg.h | 1 - .../wxWidgets3/include/wx/generic/combo.h | 1 - .../wxWidgets3/include/wx/generic/ctrlsub.h | 1 - .../include/wx/generic/custombgwin.h | 1 - .../wxWidgets3/include/wx/generic/dataview.h | 19 +- .../wxWidgets3/include/wx/generic/datectrl.h | 1 - .../wxWidgets3/include/wx/generic/dcpsg.h | 9 +- .../wxWidgets3/include/wx/generic/dirctrlg.h | 23 +- .../wxWidgets3/include/wx/generic/dirdlgg.h | 1 - .../wxWidgets3/include/wx/generic/dragimgg.h | 1 - .../include/wx/generic/dvrenderer.h | 1 - .../include/wx/generic/dvrenderers.h | 1 - .../wxWidgets3/include/wx/generic/fdrepdlg.h | 1 - .../wxWidgets3/include/wx/generic/filectrlg.h | 5 +- .../wxWidgets3/include/wx/generic/filedlgg.h | 1 - .../include/wx/generic/filepickerg.h | 16 +- .../wxWidgets3/include/wx/generic/fontdlgg.h | 1 - .../include/wx/generic/fontpickerg.h | 1 - .../wxWidgets3/include/wx/generic/fswatcher.h | 1 - .../wxWidgets3/include/wx/generic/grid.h | 117 +- .../wxWidgets3/include/wx/generic/gridctrl.h | 23 +- .../include/wx/generic/grideditors.h | 20 +- .../wxWidgets3/include/wx/generic/gridsel.h | 1 - .../include/wx/generic/headerctrlg.h | 10 +- .../wxWidgets3/include/wx/generic/helpext.h | 1 - .../wxWidgets3/include/wx/generic/hyperlink.h | 1 - .../wxWidgets3/include/wx/generic/icon.h | 1 - .../wxWidgets3/include/wx/generic/imaglist.h | 1 - .../wxWidgets3/include/wx/generic/infobar.h | 1 - .../wxWidgets3/include/wx/generic/laywin.h | 1 - .../wxWidgets3/include/wx/generic/listctrl.h | 15 +- .../wxWidgets3/include/wx/generic/logg.h | 4 - .../wxWidgets3/include/wx/generic/mask.h | 1 - .../wxWidgets3/include/wx/generic/mdig.h | 1 - .../wxWidgets3/include/wx/generic/msgdlgg.h | 1 - .../wxWidgets3/include/wx/generic/notebook.h | 1 - .../wxWidgets3/include/wx/generic/notifmsg.h | 1 - .../wxWidgets3/include/wx/generic/numdlgg.h | 1 - .../wxWidgets3/include/wx/generic/paletteg.h | 1 - .../wxWidgets3/include/wx/generic/panelg.h | 1 - .../wxWidgets3/include/wx/generic/printps.h | 1 - .../include/wx/generic/private/grid.h | 14 +- .../include/wx/generic/private/listctrl.h | 70 +- .../include/wx/generic/private/markuptext.h | 1 - .../include/wx/generic/private/richtooltip.h | 12 +- .../include/wx/generic/private/textmeasure.h | 39 + .../include/wx/generic/private/timer.h | 1 - .../wxWidgets3/include/wx/generic/prntdlgg.h | 1 - .../wxWidgets3/include/wx/generic/progdlgg.h | 1 - .../wxWidgets3/include/wx/generic/propdlg.h | 1 - .../wxWidgets3/include/wx/generic/region.h | 1 - .../include/wx/generic/richmsgdlgg.h | 1 - .../wxWidgets3/include/wx/generic/sashwin.h | 1 - .../wxWidgets3/include/wx/generic/scrolwin.h | 2 +- .../wxWidgets3/include/wx/generic/spinctlg.h | 90 +- .../wxWidgets3/include/wx/generic/splash.h | 1 - .../wxWidgets3/include/wx/generic/splitter.h | 26 +- .../wxWidgets3/include/wx/generic/srchctlg.h | 3 +- .../wxWidgets3/include/wx/generic/statbmpg.h | 1 - .../wxWidgets3/include/wx/generic/statline.h | 1 - .../wxWidgets3/include/wx/generic/stattextg.h | 1 - .../wxWidgets3/include/wx/generic/statusbr.h | 9 +- .../wxWidgets3/include/wx/generic/tabg.h | 1 - .../wxWidgets3/include/wx/generic/textdlgg.h | 26 +- .../wxWidgets3/include/wx/generic/timectrl.h | 1 - .../wxWidgets3/include/wx/generic/treectlg.h | 12 +- .../wxWidgets3/include/wx/generic/wizard.h | 1 - Externals/wxWidgets3/include/wx/geometry.h | 29 +- Externals/wxWidgets3/include/wx/gifdecod.h | 1 - Externals/wxWidgets3/include/wx/glcanvas.h | 1 - Externals/wxWidgets3/include/wx/graphics.h | 23 +- Externals/wxWidgets3/include/wx/grid.h | 1 - Externals/wxWidgets3/include/wx/gtk/accel.h | 1 - Externals/wxWidgets3/include/wx/gtk/animate.h | 6 +- .../wxWidgets3/include/wx/gtk/anybutton.h | 1 - Externals/wxWidgets3/include/wx/gtk/app.h | 8 +- .../wxWidgets3/include/wx/gtk/assertdlg_gtk.h | 2 - Externals/wxWidgets3/include/wx/gtk/bitmap.h | 43 +- .../wxWidgets3/include/wx/gtk/bmpbuttn.h | 1 - Externals/wxWidgets3/include/wx/gtk/bmpcbox.h | 1 - Externals/wxWidgets3/include/wx/gtk/brush.h | 1 - Externals/wxWidgets3/include/wx/gtk/button.h | 1 - Externals/wxWidgets3/include/wx/gtk/calctrl.h | 1 - .../wxWidgets3/include/wx/gtk/checkbox.h | 2 +- .../wxWidgets3/include/wx/gtk/checklst.h | 28 +- Externals/wxWidgets3/include/wx/gtk/chkconf.h | 69 +- Externals/wxWidgets3/include/wx/gtk/choice.h | 4 +- Externals/wxWidgets3/include/wx/gtk/clipbrd.h | 4 +- .../wxWidgets3/include/wx/gtk/clrpicker.h | 5 +- .../wxWidgets3/include/wx/gtk/collpane.h | 11 +- .../wxWidgets3/include/wx/gtk/colordlg.h | 1 - Externals/wxWidgets3/include/wx/gtk/colour.h | 13 +- .../wxWidgets3/include/wx/gtk/combobox.h | 4 +- Externals/wxWidgets3/include/wx/gtk/control.h | 33 +- Externals/wxWidgets3/include/wx/gtk/cursor.h | 1 - .../wxWidgets3/include/wx/gtk/dataform.h | 1 - Externals/wxWidgets3/include/wx/gtk/dataobj.h | 1 - .../wxWidgets3/include/wx/gtk/dataobj2.h | 34 +- .../wxWidgets3/include/wx/gtk/dataview.h | 1 - Externals/wxWidgets3/include/wx/gtk/dc.h | 106 +- .../wxWidgets3/include/wx/gtk/dcclient.h | 9 +- .../wxWidgets3/include/wx/gtk/dcmemory.h | 4 +- .../wxWidgets3/include/wx/gtk/dcscreen.h | 3 +- Externals/wxWidgets3/include/wx/gtk/dialog.h | 2 - Externals/wxWidgets3/include/wx/gtk/dirdlg.h | 9 +- Externals/wxWidgets3/include/wx/gtk/dnd.h | 12 +- .../wxWidgets3/include/wx/gtk/dvrenderer.h | 1 - .../wxWidgets3/include/wx/gtk/dvrenderers.h | 11 +- Externals/wxWidgets3/include/wx/gtk/evtloop.h | 12 +- .../wxWidgets3/include/wx/gtk/evtloopsrc.h | 1 - .../wxWidgets3/include/wx/gtk/filectrl.h | 7 +- Externals/wxWidgets3/include/wx/gtk/filedlg.h | 5 +- .../wxWidgets3/include/wx/gtk/filehistory.h | 1 - .../wxWidgets3/include/wx/gtk/filepicker.h | 23 +- Externals/wxWidgets3/include/wx/gtk/font.h | 15 +- Externals/wxWidgets3/include/wx/gtk/fontdlg.h | 9 +- .../wxWidgets3/include/wx/gtk/fontpicker.h | 1 - Externals/wxWidgets3/include/wx/gtk/frame.h | 6 +- Externals/wxWidgets3/include/wx/gtk/gauge.h | 6 +- .../wxWidgets3/include/wx/gtk/glcanvas.h | 5 +- .../wxWidgets3/include/wx/gtk/gnome/gprint.h | 9 +- .../wxWidgets3/include/wx/gtk/gnome/gvfs.h | 1 - .../include/wx/gtk/hildon/notifmsg.h | 1 - .../wxWidgets3/include/wx/gtk/hyperlink.h | 1 - Externals/wxWidgets3/include/wx/gtk/infobar.h | 2 - Externals/wxWidgets3/include/wx/gtk/listbox.h | 9 +- Externals/wxWidgets3/include/wx/gtk/mdi.h | 3 +- Externals/wxWidgets3/include/wx/gtk/menu.h | 18 +- .../wxWidgets3/include/wx/gtk/menuitem.h | 6 +- .../wxWidgets3/include/wx/gtk/minifram.h | 2 +- Externals/wxWidgets3/include/wx/gtk/msgdlg.h | 1 - .../wxWidgets3/include/wx/gtk/nonownedwnd.h | 1 - .../wxWidgets3/include/wx/gtk/notebook.h | 5 +- .../wxWidgets3/include/wx/gtk/notifmsg.h | 51 + Externals/wxWidgets3/include/wx/gtk/pen.h | 1 - .../wxWidgets3/include/wx/gtk/popupwin.h | 1 - Externals/wxWidgets3/include/wx/gtk/print.h | 15 +- Externals/wxWidgets3/include/wx/gtk/private.h | 37 +- .../include/wx/gtk/private/dialogcount.h | 48 + .../wxWidgets3/include/wx/gtk/private/error.h | 45 + .../wxWidgets3/include/wx/gtk/private/event.h | 1 - .../include/wx/gtk/private/gdkconv.h | 1 - .../include/wx/gtk/private/gtk2-compat.h | 179 +- .../wxWidgets3/include/wx/gtk/private/list.h | 1 - .../include/wx/gtk/private/messagetype.h | 1 - .../include/wx/gtk/private/mnemonics.h | 1 - .../include/wx/gtk/private/object.h | 1 - .../include/wx/gtk/private/string.h | 1 - .../include/wx/gtk/private/textmeasure.h | 64 + .../wxWidgets3/include/wx/gtk/private/timer.h | 1 - .../include/wx/gtk/private/treeentry_gtk.h | 58 + .../include/wx/gtk/private/win_gtk.h | 13 +- .../wxWidgets3/include/wx/gtk/radiobox.h | 7 +- .../wxWidgets3/include/wx/gtk/radiobut.h | 1 - Externals/wxWidgets3/include/wx/gtk/region.h | 15 +- .../wxWidgets3/include/wx/gtk/scrolbar.h | 1 - .../wxWidgets3/include/wx/gtk/scrolwin.h | 3 +- Externals/wxWidgets3/include/wx/gtk/setup0.h | 1665 +++++++++++++++ Externals/wxWidgets3/include/wx/gtk/slider.h | 2 +- .../wxWidgets3/include/wx/gtk/spinbutt.h | 1 - .../wxWidgets3/include/wx/gtk/spinctrl.h | 24 +- Externals/wxWidgets3/include/wx/gtk/statbmp.h | 1 - Externals/wxWidgets3/include/wx/gtk/statbox.h | 1 - .../wxWidgets3/include/wx/gtk/statline.h | 1 - .../wxWidgets3/include/wx/gtk/stattext.h | 5 - Externals/wxWidgets3/include/wx/gtk/taskbar.h | 3 +- .../wxWidgets3/include/wx/gtk/textctrl.h | 17 +- .../wxWidgets3/include/wx/gtk/textentry.h | 15 +- Externals/wxWidgets3/include/wx/gtk/tglbtn.h | 8 - Externals/wxWidgets3/include/wx/gtk/toolbar.h | 4 +- Externals/wxWidgets3/include/wx/gtk/tooltip.h | 1 - .../wxWidgets3/include/wx/gtk/toplevel.h | 20 +- .../include/wx/gtk/webview_webkit.h | 50 +- .../wx/gtk/webviewhistoryitem_webkit.h | 3 +- Externals/wxWidgets3/include/wx/gtk/window.h | 126 +- Externals/wxWidgets3/include/wx/hash.h | 1 - Externals/wxWidgets3/include/wx/hashmap.h | 27 +- Externals/wxWidgets3/include/wx/hashset.h | 28 +- Externals/wxWidgets3/include/wx/headercol.h | 1 - Externals/wxWidgets3/include/wx/headerctrl.h | 55 +- Externals/wxWidgets3/include/wx/help.h | 1 - Externals/wxWidgets3/include/wx/helpbase.h | 1 - Externals/wxWidgets3/include/wx/helphtml.h | 1 - Externals/wxWidgets3/include/wx/helpwin.h | 1 - Externals/wxWidgets3/include/wx/htmllbox.h | 1 - Externals/wxWidgets3/include/wx/hyperlink.h | 9 +- Externals/wxWidgets3/include/wx/icon.h | 7 +- Externals/wxWidgets3/include/wx/iconbndl.h | 1 - Externals/wxWidgets3/include/wx/iconloc.h | 1 - Externals/wxWidgets3/include/wx/imagbmp.h | 1 - Externals/wxWidgets3/include/wx/image.h | 3 +- Externals/wxWidgets3/include/wx/imaggif.h | 1 - Externals/wxWidgets3/include/wx/imagiff.h | 1 - Externals/wxWidgets3/include/wx/imagjpeg.h | 1 - Externals/wxWidgets3/include/wx/imaglist.h | 1 - Externals/wxWidgets3/include/wx/imagpcx.h | 1 - Externals/wxWidgets3/include/wx/imagpng.h | 1 - Externals/wxWidgets3/include/wx/imagpnm.h | 1 - Externals/wxWidgets3/include/wx/imagtga.h | 1 - Externals/wxWidgets3/include/wx/imagtiff.h | 1 - Externals/wxWidgets3/include/wx/imagxpm.h | 1 - Externals/wxWidgets3/include/wx/infobar.h | 1 - Externals/wxWidgets3/include/wx/init.h | 7 +- Externals/wxWidgets3/include/wx/intl.h | 7 - Externals/wxWidgets3/include/wx/iosfwrap.h | 1 - Externals/wxWidgets3/include/wx/ioswrap.h | 1 - Externals/wxWidgets3/include/wx/ipc.h | 1 - Externals/wxWidgets3/include/wx/ipcbase.h | 1 - Externals/wxWidgets3/include/wx/itemid.h | 1 - Externals/wxWidgets3/include/wx/joystick.h | 1 - Externals/wxWidgets3/include/wx/kbdstate.h | 10 +- Externals/wxWidgets3/include/wx/language.h | 1 - Externals/wxWidgets3/include/wx/layout.h | 1 - Externals/wxWidgets3/include/wx/laywin.h | 1 - Externals/wxWidgets3/include/wx/link.h | 1 - Externals/wxWidgets3/include/wx/list.h | 30 +- Externals/wxWidgets3/include/wx/listbase.h | 86 +- Externals/wxWidgets3/include/wx/listbook.h | 21 +- Externals/wxWidgets3/include/wx/listbox.h | 1 - Externals/wxWidgets3/include/wx/listctrl.h | 1 - Externals/wxWidgets3/include/wx/listimpl.cpp | 3 +- Externals/wxWidgets3/include/wx/log.h | 38 +- Externals/wxWidgets3/include/wx/longlong.h | 3 +- Externals/wxWidgets3/include/wx/math.h | 94 +- Externals/wxWidgets3/include/wx/matrix.h | 1 - Externals/wxWidgets3/include/wx/mdi.h | 30 +- Externals/wxWidgets3/include/wx/mediactrl.h | 5 +- Externals/wxWidgets3/include/wx/memconf.h | 1 - Externals/wxWidgets3/include/wx/memory.h | 9 +- Externals/wxWidgets3/include/wx/menu.h | 1 - Externals/wxWidgets3/include/wx/menuitem.h | 9 +- .../wxWidgets3/include/wx/meta/convertible.h | 1 - Externals/wxWidgets3/include/wx/meta/if.h | 1 - .../include/wx/meta/implicitconversion.h | 1 - .../wxWidgets3/include/wx/meta/int2type.h | 1 - .../wxWidgets3/include/wx/meta/movable.h | 1 - Externals/wxWidgets3/include/wx/meta/pod.h | 1 - .../wxWidgets3/include/wx/meta/removeref.h | 36 + Externals/wxWidgets3/include/wx/metafile.h | 1 - Externals/wxWidgets3/include/wx/mimetype.h | 1 - Externals/wxWidgets3/include/wx/minifram.h | 1 - Externals/wxWidgets3/include/wx/modalhook.h | 104 + Externals/wxWidgets3/include/wx/module.h | 1 - .../wxWidgets3/include/wx/mousemanager.h | 1 - Externals/wxWidgets3/include/wx/mousestate.h | 11 +- Externals/wxWidgets3/include/wx/msgdlg.h | 14 +- Externals/wxWidgets3/include/wx/msgout.h | 1 - Externals/wxWidgets3/include/wx/msgqueue.h | 1 - Externals/wxWidgets3/include/wx/mstream.h | 1 - Externals/wxWidgets3/include/wx/msw/accel.h | 1 - .../wxWidgets3/include/wx/msw/anybutton.h | 1 - Externals/wxWidgets3/include/wx/msw/app.h | 77 - .../wxWidgets3/include/wx/msw/apptbase.h | 1 - .../wxWidgets3/include/wx/msw/apptrait.h | 35 +- Externals/wxWidgets3/include/wx/msw/bitmap.h | 18 +- .../wxWidgets3/include/wx/msw/bmpbuttn.h | 1 - Externals/wxWidgets3/include/wx/msw/bmpcbox.h | 1 - Externals/wxWidgets3/include/wx/msw/brush.h | 1 - Externals/wxWidgets3/include/wx/msw/button.h | 1 - Externals/wxWidgets3/include/wx/msw/calctrl.h | 1 - Externals/wxWidgets3/include/wx/msw/caret.h | 1 - .../wxWidgets3/include/wx/msw/checkbox.h | 12 +- .../wxWidgets3/include/wx/msw/checklst.h | 3 +- Externals/wxWidgets3/include/wx/msw/chkconf.h | 7 - Externals/wxWidgets3/include/wx/msw/choice.h | 27 +- Externals/wxWidgets3/include/wx/msw/clipbrd.h | 1 - .../wxWidgets3/include/wx/msw/colordlg.h | 1 - Externals/wxWidgets3/include/wx/msw/colour.h | 1 - Externals/wxWidgets3/include/wx/msw/combo.h | 1 - .../wxWidgets3/include/wx/msw/combobox.h | 5 +- .../include/wx/msw/commandlinkbutton.h | 1 - Externals/wxWidgets3/include/wx/msw/control.h | 1 - .../wxWidgets3/include/wx/msw/crashrpt.h | 1 - Externals/wxWidgets3/include/wx/msw/ctrlsub.h | 1 - Externals/wxWidgets3/include/wx/msw/cursor.h | 1 - .../wxWidgets3/include/wx/msw/custombgwin.h | 1 - .../wxWidgets3/include/wx/msw/datectrl.h | 1 - .../wxWidgets3/include/wx/msw/datetimectrl.h | 1 - Externals/wxWidgets3/include/wx/msw/dc.h | 9 +- .../wxWidgets3/include/wx/msw/dcclient.h | 21 +- .../wxWidgets3/include/wx/msw/dcmemory.h | 1 - Externals/wxWidgets3/include/wx/msw/dcprint.h | 1 - .../wxWidgets3/include/wx/msw/dcscreen.h | 1 - Externals/wxWidgets3/include/wx/msw/dde.h | 1 - .../wxWidgets3/include/wx/msw/debughlp.h | 26 +- Externals/wxWidgets3/include/wx/msw/dialog.h | 1 - Externals/wxWidgets3/include/wx/msw/dib.h | 10 +- Externals/wxWidgets3/include/wx/msw/dirdlg.h | 6 +- .../wxWidgets3/include/wx/msw/dragimag.h | 1 - Externals/wxWidgets3/include/wx/msw/enhmeta.h | 1 - Externals/wxWidgets3/include/wx/msw/evtloop.h | 49 +- .../include/wx/msw/evtloopconsole.h | 51 + .../wxWidgets3/include/wx/msw/fdrepdlg.h | 1 - Externals/wxWidgets3/include/wx/msw/filedlg.h | 4 +- Externals/wxWidgets3/include/wx/msw/font.h | 9 +- Externals/wxWidgets3/include/wx/msw/fontdlg.h | 1 - Externals/wxWidgets3/include/wx/msw/frame.h | 17 +- .../wxWidgets3/include/wx/msw/fswatcher.h | 1 - Externals/wxWidgets3/include/wx/msw/gauge.h | 1 - Externals/wxWidgets3/include/wx/msw/gccpriv.h | 10 - .../wxWidgets3/include/wx/msw/gdiimage.h | 1 - .../wxWidgets3/include/wx/msw/genrcdefs.h | 7 +- .../wxWidgets3/include/wx/msw/glcanvas.h | 1 - .../wxWidgets3/include/wx/msw/headerctrl.h | 19 +- .../wxWidgets3/include/wx/msw/helpbest.h | 1 - Externals/wxWidgets3/include/wx/msw/helpchm.h | 3 +- Externals/wxWidgets3/include/wx/msw/helpwin.h | 1 - .../wxWidgets3/include/wx/msw/hyperlink.h | 1 - Externals/wxWidgets3/include/wx/msw/icon.h | 3 +- .../wxWidgets3/include/wx/msw/imaglist.h | 1 - Externals/wxWidgets3/include/wx/msw/iniconf.h | 1 - Externals/wxWidgets3/include/wx/msw/init.h | 90 + .../wxWidgets3/include/wx/msw/joystick.h | 1 - .../wxWidgets3/include/wx/msw/libraries.h | 1 - Externals/wxWidgets3/include/wx/msw/listbox.h | 7 - .../wxWidgets3/include/wx/msw/listctrl.h | 12 +- Externals/wxWidgets3/include/wx/msw/mdi.h | 4 - Externals/wxWidgets3/include/wx/msw/menu.h | 1 - .../wxWidgets3/include/wx/msw/menuitem.h | 1 - .../wxWidgets3/include/wx/msw/metafile.h | 1 - .../wxWidgets3/include/wx/msw/microwin.h | 1 - .../wxWidgets3/include/wx/msw/mimetype.h | 1 - .../wxWidgets3/include/wx/msw/minifram.h | 1 - Externals/wxWidgets3/include/wx/msw/missing.h | 11 +- Externals/wxWidgets3/include/wx/msw/msgdlg.h | 3 +- Externals/wxWidgets3/include/wx/msw/mslu.h | 1 - Externals/wxWidgets3/include/wx/msw/msvcrt.h | 1 - .../wxWidgets3/include/wx/msw/nonownedwnd.h | 1 - .../wxWidgets3/include/wx/msw/notebook.h | 1 - .../wxWidgets3/include/wx/msw/notifmsg.h | 6 +- .../wxWidgets3/include/wx/msw/ole/access.h | 1 - .../wxWidgets3/include/wx/msw/ole/activex.h | 1 - .../wxWidgets3/include/wx/msw/ole/automtn.h | 16 +- .../wxWidgets3/include/wx/msw/ole/dataform.h | 1 - .../wxWidgets3/include/wx/msw/ole/dataobj.h | 1 - .../wxWidgets3/include/wx/msw/ole/dataobj2.h | 1 - .../wxWidgets3/include/wx/msw/ole/dropsrc.h | 1 - .../wxWidgets3/include/wx/msw/ole/droptgt.h | 20 +- .../wxWidgets3/include/wx/msw/ole/oleutils.h | 86 +- .../wxWidgets3/include/wx/msw/ole/safearray.h | 394 ++++ .../wxWidgets3/include/wx/msw/ole/uuid.h | 1 - .../wxWidgets3/include/wx/msw/ownerdrw.h | 1 - Externals/wxWidgets3/include/wx/msw/palette.h | 1 - Externals/wxWidgets3/include/wx/msw/panel.h | 1 - Externals/wxWidgets3/include/wx/msw/pen.h | 1 - .../wxWidgets3/include/wx/msw/popupwin.h | 2 +- .../wxWidgets3/include/wx/msw/printdlg.h | 1 - .../wxWidgets3/include/wx/msw/printwin.h | 1 - Externals/wxWidgets3/include/wx/msw/private.h | 34 +- .../include/wx/msw/private/button.h | 1 - .../include/wx/msw/private/comptr.h | 129 ++ .../include/wx/msw/private/datecontrols.h | 1 - .../wxWidgets3/include/wx/msw/private/dc.h | 1 - .../include/wx/msw/private/fswatcher.h | 1 - .../include/wx/msw/private/hiddenwin.h | 1 - .../include/wx/msw/private/keyboard.h | 1 - .../include/wx/msw/private/metrics.h | 1 - .../include/wx/msw/private/msgdlg.h | 6 +- .../include/wx/msw/private/pipestream.h | 50 + .../include/wx/msw/private/sockmsw.h | 1 - .../include/wx/msw/private/textmeasure.h | 63 + .../wxWidgets3/include/wx/msw/private/timer.h | 1 - Externals/wxWidgets3/include/wx/msw/progdlg.h | 1 - .../wxWidgets3/include/wx/msw/radiobox.h | 6 +- .../wxWidgets3/include/wx/msw/radiobut.h | 1 - Externals/wxWidgets3/include/wx/msw/rcdefs.h | 30 +- Externals/wxWidgets3/include/wx/msw/regconf.h | 1 - Externals/wxWidgets3/include/wx/msw/region.h | 1 - .../wxWidgets3/include/wx/msw/registry.h | 1 - .../wxWidgets3/include/wx/msw/richmsgdlg.h | 1 - .../wxWidgets3/include/wx/msw/scrolbar.h | 1 - Externals/wxWidgets3/include/wx/msw/seh.h | 7 +- Externals/wxWidgets3/include/wx/msw/setup0.h | 24 +- .../wxWidgets3/include/wx/msw/setup_inc.h | 1 - Externals/wxWidgets3/include/wx/msw/slider.h | 1 - Externals/wxWidgets3/include/wx/msw/sound.h | 1 - .../wxWidgets3/include/wx/msw/spinbutt.h | 1 - .../wxWidgets3/include/wx/msw/spinctrl.h | 13 +- .../wxWidgets3/include/wx/msw/stackwalk.h | 1 - Externals/wxWidgets3/include/wx/msw/statbmp.h | 5 +- Externals/wxWidgets3/include/wx/msw/statbox.h | 1 - .../wxWidgets3/include/wx/msw/statline.h | 1 - .../wxWidgets3/include/wx/msw/stattext.h | 1 - .../wxWidgets3/include/wx/msw/statusbar.h | 1 - .../wxWidgets3/include/wx/msw/stdpaths.h | 12 +- Externals/wxWidgets3/include/wx/msw/subwin.h | 1 - Externals/wxWidgets3/include/wx/msw/taskbar.h | 3 +- .../wxWidgets3/include/wx/msw/textctrl.h | 2 +- .../wxWidgets3/include/wx/msw/textentry.h | 3 +- Externals/wxWidgets3/include/wx/msw/tglbtn.h | 1 - .../wxWidgets3/include/wx/msw/timectrl.h | 1 - Externals/wxWidgets3/include/wx/msw/tls.h | 1 - Externals/wxWidgets3/include/wx/msw/toolbar.h | 6 +- Externals/wxWidgets3/include/wx/msw/tooltip.h | 5 +- .../wxWidgets3/include/wx/msw/toplevel.h | 21 +- .../wxWidgets3/include/wx/msw/treectrl.h | 12 +- Externals/wxWidgets3/include/wx/msw/uxtheme.h | 1 - .../wxWidgets3/include/wx/msw/webview_ie.h | 302 +-- .../include/wx/msw/webview_missing.h | 947 +++++++++ .../include/wx/msw/webviewhistoryitem_ie.h | 3 +- .../include/wx/msw/wince/checklst.h | 1 - .../wxWidgets3/include/wx/msw/wince/chkconf.h | 1 - .../include/wx/msw/wince/choicece.h | 1 - .../wxWidgets3/include/wx/msw/wince/helpwce.h | 1 - .../include/wx/msw/wince/libraries.h | 1 - .../wxWidgets3/include/wx/msw/wince/missing.h | 1 - .../include/wx/msw/wince/resources.h | 1 - .../wxWidgets3/include/wx/msw/wince/setup.h | 24 +- .../include/wx/msw/wince/smartphone.rc | 1 - .../wxWidgets3/include/wx/msw/wince/tbarwce.h | 9 +- .../include/wx/msw/wince/textctrlce.h | 1 - Externals/wxWidgets3/include/wx/msw/window.h | 20 +- .../wxWidgets3/include/wx/msw/winundef.h | 25 +- .../wxWidgets3/include/wx/msw/wrapcctl.h | 1 - .../wxWidgets3/include/wx/msw/wrapcdlg.h | 1 - .../wxWidgets3/include/wx/msw/wrapgdip.h | 1 - Externals/wxWidgets3/include/wx/msw/wrapshl.h | 1 - Externals/wxWidgets3/include/wx/msw/wrapwin.h | 3 +- Externals/wxWidgets3/include/wx/msw/wx.rc | 25 +- Externals/wxWidgets3/include/wx/nativewin.h | 10 +- Externals/wxWidgets3/include/wx/nonownedwnd.h | 1 - Externals/wxWidgets3/include/wx/notebook.h | 15 +- Externals/wxWidgets3/include/wx/notifmsg.h | 12 +- Externals/wxWidgets3/include/wx/numdlg.h | 1 - Externals/wxWidgets3/include/wx/object.h | 12 +- Externals/wxWidgets3/include/wx/odcombo.h | 5 +- Externals/wxWidgets3/include/wx/osx/accel.h | 1 - .../wxWidgets3/include/wx/osx/anybutton.h | 1 - Externals/wxWidgets3/include/wx/osx/app.h | 34 +- Externals/wxWidgets3/include/wx/osx/bitmap.h | 23 +- .../wxWidgets3/include/wx/osx/bmpbuttn.h | 1 - Externals/wxWidgets3/include/wx/osx/brush.h | 1 - Externals/wxWidgets3/include/wx/osx/button.h | 5 +- .../include/wx/osx/carbon/chkconf.h | 1 - .../include/wx/osx/carbon/dataview.h | 1 - .../wxWidgets3/include/wx/osx/carbon/drawer.h | 1 - .../include/wx/osx/carbon/evtloop.h | 6 +- .../include/wx/osx/carbon/mimetype.h | 1 - .../include/wx/osx/carbon/private.h | 2 - .../include/wx/osx/carbon/private/mactext.h | 1 - .../include/wx/osx/carbon/private/overlay.h | 1 - .../include/wx/osx/carbon/private/print.h | 1 - .../include/wx/osx/carbon/private/timer.h | 1 - .../wxWidgets3/include/wx/osx/carbon/region.h | 4 +- .../include/wx/osx/carbon/statbmp.h | 1 - .../wxWidgets3/include/wx/osx/carbon/uma.h | 1 - .../wxWidgets3/include/wx/osx/checkbox.h | 1 - .../wxWidgets3/include/wx/osx/checklst.h | 1 - Externals/wxWidgets3/include/wx/osx/chkconf.h | 22 - Externals/wxWidgets3/include/wx/osx/choice.h | 5 +- Externals/wxWidgets3/include/wx/osx/clipbrd.h | 1 - .../wxWidgets3/include/wx/osx/cocoa/chkconf.h | 19 +- .../include/wx/osx/cocoa/dataview.h | 1 - .../wxWidgets3/include/wx/osx/cocoa/evtloop.h | 11 +- .../wxWidgets3/include/wx/osx/cocoa/private.h | 63 +- .../include/wx/osx/cocoa/private/date.h | 1 - .../wx/osx/cocoa/private/markuptoattr.h | 1 - .../include/wx/osx/cocoa/private/overlay.h | 1 - .../include/wx/osx/cocoa/private/textimpl.h | 9 +- .../wxWidgets3/include/wx/osx/colordlg.h | 1 - .../wxWidgets3/include/wx/osx/combobox.h | 3 +- .../wxWidgets3/include/wx/osx/config_xcode.h | 6 +- Externals/wxWidgets3/include/wx/osx/control.h | 1 - .../include/wx/osx/core/cfdataref.h | 1 - .../wxWidgets3/include/wx/osx/core/cfref.h | 1 - .../wxWidgets3/include/wx/osx/core/cfstring.h | 3 +- .../wxWidgets3/include/wx/osx/core/colour.h | 1 - .../wxWidgets3/include/wx/osx/core/dataview.h | 1 - .../wxWidgets3/include/wx/osx/core/evtloop.h | 114 + .../wxWidgets3/include/wx/osx/core/hid.h | 2 - .../wxWidgets3/include/wx/osx/core/joystick.h | 1 - .../wxWidgets3/include/wx/osx/core/mimetype.h | 1 - .../wxWidgets3/include/wx/osx/core/objcid.h | 23 + .../wxWidgets3/include/wx/osx/core/private.h | 40 +- .../wx/osx/core/private/datetimectrl.h | 1 - .../include/wx/osx/core/private/strconv_cf.h | 1 - .../include/wx/osx/core/private/timer.h | 1 - .../wxWidgets3/include/wx/osx/core/stdpaths.h | 6 +- Externals/wxWidgets3/include/wx/osx/cursor.h | 1 - .../wxWidgets3/include/wx/osx/dataform.h | 1 - Externals/wxWidgets3/include/wx/osx/dataobj.h | 7 +- .../wxWidgets3/include/wx/osx/dataobj2.h | 1 - .../wxWidgets3/include/wx/osx/dataview.h | 3 +- .../wxWidgets3/include/wx/osx/datectrl.h | 1 - .../wxWidgets3/include/wx/osx/datetimectrl.h | 1 - Externals/wxWidgets3/include/wx/osx/dc.h | 1 - .../wxWidgets3/include/wx/osx/dcclient.h | 1 - .../wxWidgets3/include/wx/osx/dcmemory.h | 1 - Externals/wxWidgets3/include/wx/osx/dcprint.h | 1 - .../wxWidgets3/include/wx/osx/dcscreen.h | 1 - Externals/wxWidgets3/include/wx/osx/dialog.h | 1 - Externals/wxWidgets3/include/wx/osx/dirdlg.h | 37 +- Externals/wxWidgets3/include/wx/osx/dnd.h | 1 - .../wxWidgets3/include/wx/osx/dvrenderer.h | 1 - .../wxWidgets3/include/wx/osx/dvrenderers.h | 7 +- Externals/wxWidgets3/include/wx/osx/evtloop.h | 95 +- .../wxWidgets3/include/wx/osx/evtloopsrc.h | 17 +- Externals/wxWidgets3/include/wx/osx/filedlg.h | 21 +- Externals/wxWidgets3/include/wx/osx/font.h | 30 +- Externals/wxWidgets3/include/wx/osx/fontdlg.h | 15 +- Externals/wxWidgets3/include/wx/osx/frame.h | 1 - Externals/wxWidgets3/include/wx/osx/gauge.h | 1 - .../wxWidgets3/include/wx/osx/glcanvas.h | 1 - .../wxWidgets3/include/wx/osx/helpxxxx.h | 1 - Externals/wxWidgets3/include/wx/osx/icon.h | 1 - .../include/wx/osx/iphone/chkconf.h | 3 +- .../include/wx/osx/iphone/private.h | 8 +- .../include/wx/osx/iphone/private/textimpl.h | 1 - .../wxWidgets3/include/wx/osx/joystick.h | 1 - Externals/wxWidgets3/include/wx/osx/listbox.h | 1 - .../wxWidgets3/include/wx/osx/listctrl.h | 4 - Externals/wxWidgets3/include/wx/osx/mdi.h | 1 - Externals/wxWidgets3/include/wx/osx/menu.h | 13 +- .../wxWidgets3/include/wx/osx/menuitem.h | 19 +- .../wxWidgets3/include/wx/osx/metafile.h | 1 - .../wxWidgets3/include/wx/osx/minifram.h | 1 - Externals/wxWidgets3/include/wx/osx/msgdlg.h | 1 - .../wxWidgets3/include/wx/osx/nonownedwnd.h | 5 +- .../wxWidgets3/include/wx/osx/notebook.h | 1 - Externals/wxWidgets3/include/wx/osx/palette.h | 1 - Externals/wxWidgets3/include/wx/osx/pen.h | 1 - Externals/wxWidgets3/include/wx/osx/pnghand.h | 1 - .../wxWidgets3/include/wx/osx/popupwin.h | 3 - .../wxWidgets3/include/wx/osx/printdlg.h | 1 - .../wxWidgets3/include/wx/osx/printmac.h | 1 - .../include/wx/osx/private/glgrab.h | 2 +- .../wxWidgets3/include/wx/osx/radiobox.h | 1 - .../wxWidgets3/include/wx/osx/radiobut.h | 1 - .../wxWidgets3/include/wx/osx/scrolbar.h | 1 - Externals/wxWidgets3/include/wx/osx/setup0.h | 41 +- Externals/wxWidgets3/include/wx/osx/slider.h | 1 - Externals/wxWidgets3/include/wx/osx/sound.h | 1 - .../wxWidgets3/include/wx/osx/spinbutt.h | 1 - .../wxWidgets3/include/wx/osx/srchctrl.h | 1 - Externals/wxWidgets3/include/wx/osx/statbox.h | 1 - .../wxWidgets3/include/wx/osx/statline.h | 1 - .../wxWidgets3/include/wx/osx/stattext.h | 1 - .../wxWidgets3/include/wx/osx/statusbr.h | 1 - .../wxWidgets3/include/wx/osx/taskbarosx.h | 17 +- .../wxWidgets3/include/wx/osx/textctrl.h | 1 - .../wxWidgets3/include/wx/osx/textentry.h | 3 +- Externals/wxWidgets3/include/wx/osx/tglbtn.h | 1 - .../wxWidgets3/include/wx/osx/timectrl.h | 1 - Externals/wxWidgets3/include/wx/osx/toolbar.h | 9 +- Externals/wxWidgets3/include/wx/osx/tooltip.h | 1 - .../wxWidgets3/include/wx/osx/toplevel.h | 4 +- .../wxWidgets3/include/wx/osx/treectrl.h | 73 +- .../include/wx/osx/webview_webkit.h | 51 +- .../wx/osx/webviewhistoryitem_webkit.h | 7 +- Externals/wxWidgets3/include/wx/osx/window.h | 15 +- Externals/wxWidgets3/include/wx/overlay.h | 1 - Externals/wxWidgets3/include/wx/ownerdrw.h | 1 - Externals/wxWidgets3/include/wx/palette.h | 1 - Externals/wxWidgets3/include/wx/panel.h | 1 - Externals/wxWidgets3/include/wx/paper.h | 1 - Externals/wxWidgets3/include/wx/pen.h | 18 +- Externals/wxWidgets3/include/wx/persist.h | 1 - .../wxWidgets3/include/wx/persist/bookctrl.h | 1 - .../wxWidgets3/include/wx/persist/splitter.h | 1 - .../wxWidgets3/include/wx/persist/toplevel.h | 1 - .../wxWidgets3/include/wx/persist/treebook.h | 1 - .../wxWidgets3/include/wx/persist/window.h | 1 - Externals/wxWidgets3/include/wx/pickerbase.h | 6 +- Externals/wxWidgets3/include/wx/platform.h | 240 +-- Externals/wxWidgets3/include/wx/platinfo.h | 1 - Externals/wxWidgets3/include/wx/popupwin.h | 3 +- Externals/wxWidgets3/include/wx/position.h | 1 - Externals/wxWidgets3/include/wx/power.h | 1 - Externals/wxWidgets3/include/wx/preferences.h | 145 ++ Externals/wxWidgets3/include/wx/print.h | 1 - Externals/wxWidgets3/include/wx/printdlg.h | 1 - .../wx/private/eventloopsourcesmanager.h | 25 + Externals/wxWidgets3/include/wx/private/fd.h | 1 - .../include/wx/private/fdiodispatcher.h | 1 - .../wx/private/fdioeventloopsourcehandler.h | 38 + .../include/wx/private/fdiohandler.h | 1 - .../include/wx/private/fdiomanager.h | 1 - .../wxWidgets3/include/wx/private/fileback.h | 1 - .../wxWidgets3/include/wx/private/filename.h | 1 - .../include/wx/private/flagscheck.h | 1 - .../wxWidgets3/include/wx/private/fontmgr.h | 1 - .../wxWidgets3/include/wx/private/fswatcher.h | 25 +- .../wxWidgets3/include/wx/private/graphics.h | 13 +- .../include/wx/private/markupparser.h | 1 - .../include/wx/private/markupparserattr.h | 1 - .../wxWidgets3/include/wx/private/overlay.h | 1 - .../include/wx/private/pipestream.h | 29 + .../include/wx/private/preferences.h | 40 + .../include/wx/private/richtooltip.h | 6 +- .../wxWidgets3/include/wx/private/sckaddr.h | 1 - .../include/wx/private/selectdispatcher.h | 1 - .../wxWidgets3/include/wx/private/socket.h | 9 +- .../include/wx/private/streamtempinput.h | 134 ++ .../include/wx/private/textmeasure.h | 174 ++ .../include/wx/private/threadinfo.h | 49 +- .../wxWidgets3/include/wx/private/timer.h | 1 - .../wxWidgets3/include/wx/private/window.h | 1 - .../wxWidgets3/include/wx/private/wxprintf.h | 6 - Externals/wxWidgets3/include/wx/prntbase.h | 25 +- Externals/wxWidgets3/include/wx/process.h | 12 +- Externals/wxWidgets3/include/wx/progdlg.h | 1 - Externals/wxWidgets3/include/wx/propdlg.h | 1 - .../wxWidgets3/include/wx/protocol/file.h | 1 - .../wxWidgets3/include/wx/protocol/ftp.h | 1 - .../wxWidgets3/include/wx/protocol/http.h | 12 +- .../wxWidgets3/include/wx/protocol/log.h | 1 - .../wxWidgets3/include/wx/protocol/protocol.h | 1 - Externals/wxWidgets3/include/wx/ptr_scpd.h | 1 - Externals/wxWidgets3/include/wx/ptr_shrd.h | 1 - Externals/wxWidgets3/include/wx/quantize.h | 1 - Externals/wxWidgets3/include/wx/radiobox.h | 1 - Externals/wxWidgets3/include/wx/radiobut.h | 1 - Externals/wxWidgets3/include/wx/range.h | 1 - Externals/wxWidgets3/include/wx/rawbmp.h | 1 - .../wxWidgets3/include/wx/rearrangectrl.h | 1 - Externals/wxWidgets3/include/wx/recguard.h | 1 - Externals/wxWidgets3/include/wx/regex.h | 1 - Externals/wxWidgets3/include/wx/region.h | 1 - Externals/wxWidgets3/include/wx/renderer.h | 1 - Externals/wxWidgets3/include/wx/richmsgdlg.h | 5 +- Externals/wxWidgets3/include/wx/richtooltip.h | 8 +- Externals/wxWidgets3/include/wx/rtti.h | 1 - Externals/wxWidgets3/include/wx/sashwin.h | 1 - Externals/wxWidgets3/include/wx/sckaddr.h | 1 - Externals/wxWidgets3/include/wx/sckipc.h | 1 - Externals/wxWidgets3/include/wx/sckstrm.h | 1 - Externals/wxWidgets3/include/wx/scopedarray.h | 1 - Externals/wxWidgets3/include/wx/scopedptr.h | 1 - Externals/wxWidgets3/include/wx/scopeguard.h | 1 - Externals/wxWidgets3/include/wx/scrolbar.h | 1 - Externals/wxWidgets3/include/wx/scrolwin.h | 121 +- Externals/wxWidgets3/include/wx/selstore.h | 1 - Externals/wxWidgets3/include/wx/settings.h | 1 - Externals/wxWidgets3/include/wx/setup_inc.h | 24 +- .../wxWidgets3/include/wx/setup_redirect.h | 1 - Externals/wxWidgets3/include/wx/sharedptr.h | 40 +- Externals/wxWidgets3/include/wx/simplebook.h | 212 ++ Externals/wxWidgets3/include/wx/sizer.h | 24 +- Externals/wxWidgets3/include/wx/slider.h | 1 - Externals/wxWidgets3/include/wx/snglinst.h | 1 - Externals/wxWidgets3/include/wx/socket.h | 38 +- Externals/wxWidgets3/include/wx/sound.h | 1 - Externals/wxWidgets3/include/wx/spinbutt.h | 1 - Externals/wxWidgets3/include/wx/spinctrl.h | 33 +- Externals/wxWidgets3/include/wx/splash.h | 1 - Externals/wxWidgets3/include/wx/splitter.h | 9 +- Externals/wxWidgets3/include/wx/srchctrl.h | 13 +- Externals/wxWidgets3/include/wx/sstream.h | 1 - Externals/wxWidgets3/include/wx/stackwalk.h | 1 - Externals/wxWidgets3/include/wx/statbmp.h | 1 - Externals/wxWidgets3/include/wx/statbox.h | 7 +- Externals/wxWidgets3/include/wx/statline.h | 1 - Externals/wxWidgets3/include/wx/stattext.h | 1 - Externals/wxWidgets3/include/wx/statusbr.h | 11 +- Externals/wxWidgets3/include/wx/stdpaths.h | 14 +- Externals/wxWidgets3/include/wx/stdstream.h | 1 - Externals/wxWidgets3/include/wx/stockitem.h | 3 +- Externals/wxWidgets3/include/wx/stopwatch.h | 1 - Externals/wxWidgets3/include/wx/strconv.h | 1 - Externals/wxWidgets3/include/wx/stream.h | 67 +- Externals/wxWidgets3/include/wx/string.h | 101 +- Externals/wxWidgets3/include/wx/stringimpl.h | 1 - Externals/wxWidgets3/include/wx/stringops.h | 1 - Externals/wxWidgets3/include/wx/strvararg.h | 6 +- Externals/wxWidgets3/include/wx/sysopt.h | 1 - Externals/wxWidgets3/include/wx/tarstrm.h | 1 - Externals/wxWidgets3/include/wx/taskbar.h | 16 +- Externals/wxWidgets3/include/wx/tbarbase.h | 4 +- Externals/wxWidgets3/include/wx/testing.h | 351 ++++ Externals/wxWidgets3/include/wx/textbuf.h | 2 +- .../wxWidgets3/include/wx/textcompleter.h | 1 - Externals/wxWidgets3/include/wx/textctrl.h | 58 +- Externals/wxWidgets3/include/wx/textdlg.h | 1 - Externals/wxWidgets3/include/wx/textentry.h | 9 +- Externals/wxWidgets3/include/wx/textfile.h | 1 - Externals/wxWidgets3/include/wx/textwrapper.h | 1 - Externals/wxWidgets3/include/wx/tglbtn.h | 8 +- Externals/wxWidgets3/include/wx/thread.h | 39 +- Externals/wxWidgets3/include/wx/thrimpl.cpp | 9 +- Externals/wxWidgets3/include/wx/time.h | 1 - Externals/wxWidgets3/include/wx/timectrl.h | 38 +- Externals/wxWidgets3/include/wx/timer.h | 5 +- Externals/wxWidgets3/include/wx/tipdlg.h | 1 - Externals/wxWidgets3/include/wx/tipwin.h | 1 - Externals/wxWidgets3/include/wx/tls.h | 9 +- Externals/wxWidgets3/include/wx/tokenzr.h | 1 - Externals/wxWidgets3/include/wx/toolbar.h | 5 +- Externals/wxWidgets3/include/wx/toolbook.h | 18 +- Externals/wxWidgets3/include/wx/tooltip.h | 1 - Externals/wxWidgets3/include/wx/toplevel.h | 17 +- Externals/wxWidgets3/include/wx/tracker.h | 1 - Externals/wxWidgets3/include/wx/translation.h | 39 +- Externals/wxWidgets3/include/wx/treebase.h | 76 +- Externals/wxWidgets3/include/wx/treebook.h | 28 +- Externals/wxWidgets3/include/wx/treectrl.h | 9 +- Externals/wxWidgets3/include/wx/treelist.h | 19 +- Externals/wxWidgets3/include/wx/txtstrm.h | 1 - Externals/wxWidgets3/include/wx/typeinfo.h | 1 - Externals/wxWidgets3/include/wx/types.h | 1 - Externals/wxWidgets3/include/wx/uiaction.h | 5 +- Externals/wxWidgets3/include/wx/unichar.h | 113 +- Externals/wxWidgets3/include/wx/unix/app.h | 20 +- .../wxWidgets3/include/wx/unix/apptbase.h | 42 +- .../wxWidgets3/include/wx/unix/apptrait.h | 10 +- .../wxWidgets3/include/wx/unix/chkconf.h | 1 - .../wxWidgets3/include/wx/unix/evtloop.h | 19 +- .../wxWidgets3/include/wx/unix/evtloopsrc.h | 1 - .../wxWidgets3/include/wx/unix/execute.h | 96 +- .../wxWidgets3/include/wx/unix/fontutil.h | 1 - .../include/wx/unix/fswatcher_inotify.h | 3 +- .../include/wx/unix/fswatcher_kqueue.h | 1 - Externals/wxWidgets3/include/wx/unix/glx11.h | 1 - .../wxWidgets3/include/wx/unix/joystick.h | 1 - .../wxWidgets3/include/wx/unix/mimetype.h | 1 - Externals/wxWidgets3/include/wx/unix/pipe.h | 40 +- .../wxWidgets3/include/wx/unix/private.h | 1 - .../include/wx/unix/private/epolldispatcher.h | 1 - .../wx/unix/private/executeiohandler.h | 136 ++ .../include/wx/unix/private/fdiounix.h | 1 - .../wx/unix/private/fswatcher_inotify.h | 1 - .../wx/unix/private/fswatcher_kqueue.h | 1 - .../include/wx/unix/private/pipestream.h | 37 + .../include/wx/unix/private/sockunix.h | 1 - .../include/wx/unix/private/timer.h | 1 - .../include/wx/unix/private/wakeuppipe.h | 101 + Externals/wxWidgets3/include/wx/unix/sound.h | 1 - .../wxWidgets3/include/wx/unix/stackwalk.h | 1 - .../wxWidgets3/include/wx/unix/stdpaths.h | 6 +- .../wxWidgets3/include/wx/unix/taskbarx11.h | 1 - Externals/wxWidgets3/include/wx/unix/tls.h | 1 - .../wxWidgets3/include/wx/unix/utilsx11.h | 1 - Externals/wxWidgets3/include/wx/uri.h | 1 - Externals/wxWidgets3/include/wx/url.h | 1 - Externals/wxWidgets3/include/wx/ustring.h | 1 - Externals/wxWidgets3/include/wx/utils.h | 22 +- Externals/wxWidgets3/include/wx/valgen.h | 1 - Externals/wxWidgets3/include/wx/validate.h | 8 +- Externals/wxWidgets3/include/wx/valtext.h | 1 - Externals/wxWidgets3/include/wx/variant.h | 7 +- Externals/wxWidgets3/include/wx/variantbase.h | 1 - Externals/wxWidgets3/include/wx/vector.h | 96 +- Externals/wxWidgets3/include/wx/version.h | 9 +- Externals/wxWidgets3/include/wx/versioninfo.h | 1 - Externals/wxWidgets3/include/wx/vidmode.h | 1 - Externals/wxWidgets3/include/wx/vlbox.h | 3 +- Externals/wxWidgets3/include/wx/volume.h | 1 - Externals/wxWidgets3/include/wx/vscroll.h | 19 +- Externals/wxWidgets3/include/wx/weakref.h | 5 +- Externals/wxWidgets3/include/wx/webview.h | 174 +- .../include/wx/webviewarchivehandler.h | 9 +- .../wxWidgets3/include/wx/webviewfshandler.h | 37 + Externals/wxWidgets3/include/wx/wfstream.h | 9 +- Externals/wxWidgets3/include/wx/window.h | 115 +- Externals/wxWidgets3/include/wx/windowid.h | 5 +- Externals/wxWidgets3/include/wx/windowptr.h | 63 + Externals/wxWidgets3/include/wx/withimages.h | 1 - Externals/wxWidgets3/include/wx/wizard.h | 13 +- Externals/wxWidgets3/include/wx/wrapsizer.h | 1 - Externals/wxWidgets3/include/wx/wupdlock.h | 1 - Externals/wxWidgets3/include/wx/wx.h | 1 - Externals/wxWidgets3/include/wx/wxchar.h | 1 - Externals/wxWidgets3/include/wx/wxcrt.h | 1 - Externals/wxWidgets3/include/wx/wxcrtbase.h | 67 +- Externals/wxWidgets3/include/wx/wxcrtvararg.h | 7 +- Externals/wxWidgets3/include/wx/wxhtml.h | 1 - Externals/wxWidgets3/include/wx/wxprec.h | 8 +- .../include/wx/x11/private/wrapxkb.h | 24 + Externals/wxWidgets3/include/wx/xlocale.h | 1 - Externals/wxWidgets3/include/wx/xpmdecod.h | 1 - Externals/wxWidgets3/include/wx/xpmhand.h | 1 - Externals/wxWidgets3/include/wx/xti.h | 1 - Externals/wxWidgets3/include/wx/xti2.h | 3 +- Externals/wxWidgets3/include/wx/xtictor.h | 1 - Externals/wxWidgets3/include/wx/xtihandler.h | 3 +- Externals/wxWidgets3/include/wx/xtiprop.h | 17 +- Externals/wxWidgets3/include/wx/xtistrm.h | 1 - Externals/wxWidgets3/include/wx/xtitypes.h | 3 +- Externals/wxWidgets3/include/wx/xtixml.h | 1 - Externals/wxWidgets3/include/wx/zipstrm.h | 1 - Externals/wxWidgets3/include/wx/zstream.h | 1 - Externals/wxWidgets3/src/aui/auibar.cpp | 225 +- Externals/wxWidgets3/src/aui/auibook.cpp | 1538 ++------------ Externals/wxWidgets3/src/aui/descrip.mms | 7 +- Externals/wxWidgets3/src/aui/dockart.cpp | 33 +- Externals/wxWidgets3/src/aui/floatpane.cpp | 12 +- Externals/wxWidgets3/src/aui/framemanager.cpp | 77 +- Externals/wxWidgets3/src/aui/tabart.cpp | 1319 ++++++++++++ Externals/wxWidgets3/src/aui/tabartgtk.cpp | 512 +++++ Externals/wxWidgets3/src/aui/tabmdi.cpp | 68 +- Externals/wxWidgets3/src/common/accelcmn.cpp | 32 +- Externals/wxWidgets3/src/common/accesscmn.cpp | 1 - .../wxWidgets3/src/common/affinematrix2d.cpp | 24 +- Externals/wxWidgets3/src/common/anidecod.cpp | 1 - .../wxWidgets3/src/common/animatecmn.cpp | 1 - Externals/wxWidgets3/src/common/any.cpp | 9 +- Externals/wxWidgets3/src/common/appbase.cpp | 73 +- Externals/wxWidgets3/src/common/appcmn.cpp | 22 +- Externals/wxWidgets3/src/common/arcall.cpp | 1 - Externals/wxWidgets3/src/common/arcfind.cpp | 1 - Externals/wxWidgets3/src/common/archive.cpp | 1 - Externals/wxWidgets3/src/common/arrstr.cpp | 1 - Externals/wxWidgets3/src/common/artprov.cpp | 1 - Externals/wxWidgets3/src/common/artstd.cpp | 1 - Externals/wxWidgets3/src/common/arttango.cpp | 1 - Externals/wxWidgets3/src/common/base64.cpp | 1 - Externals/wxWidgets3/src/common/bmpbase.cpp | 32 +- Externals/wxWidgets3/src/common/bmpbtncmn.cpp | 67 +- .../wxWidgets3/src/common/bmpcboxcmn.cpp | 1 - Externals/wxWidgets3/src/common/bookctrl.cpp | 89 +- Externals/wxWidgets3/src/common/btncmn.cpp | 3 +- Externals/wxWidgets3/src/common/cairo.cpp | 16 +- .../wxWidgets3/src/common/calctrlcmn.cpp | 1 - .../wxWidgets3/src/common/checkboxcmn.cpp | 3 +- .../wxWidgets3/src/common/checklstcmn.cpp | 21 +- Externals/wxWidgets3/src/common/choiccmn.cpp | 20 +- Externals/wxWidgets3/src/common/clipcmn.cpp | 1 - Externals/wxWidgets3/src/common/clntdata.cpp | 1 - .../wxWidgets3/src/common/clrpickercmn.cpp | 20 +- Externals/wxWidgets3/src/common/cmdline.cpp | 32 +- Externals/wxWidgets3/src/common/cmdproc.cpp | 1 - Externals/wxWidgets3/src/common/cmndata.cpp | 1 - Externals/wxWidgets3/src/common/colourcmn.cpp | 11 +- .../wxWidgets3/src/common/colourdata.cpp | 61 +- Externals/wxWidgets3/src/common/combocmn.cpp | 151 +- Externals/wxWidgets3/src/common/config.cpp | 1 - Externals/wxWidgets3/src/common/containr.cpp | 88 +- Externals/wxWidgets3/src/common/convauto.cpp | 1 - Externals/wxWidgets3/src/common/cshelp.cpp | 1 - Externals/wxWidgets3/src/common/ctrlcmn.cpp | 27 +- Externals/wxWidgets3/src/common/ctrlsub.cpp | 16 +- Externals/wxWidgets3/src/common/datavcmn.cpp | 198 +- Externals/wxWidgets3/src/common/datetime.cpp | 113 +- .../wxWidgets3/src/common/datetimefmt.cpp | 141 +- Externals/wxWidgets3/src/common/datstrm.cpp | 228 +- Externals/wxWidgets3/src/common/dcbase.cpp | 178 +- Externals/wxWidgets3/src/common/dcbufcmn.cpp | 33 +- Externals/wxWidgets3/src/common/dcgraph.cpp | 143 +- Externals/wxWidgets3/src/common/dcsvg.cpp | 130 +- Externals/wxWidgets3/src/common/debugrpt.cpp | 55 +- Externals/wxWidgets3/src/common/descrip.mms | 12 +- Externals/wxWidgets3/src/common/dircmn.cpp | 30 +- .../wxWidgets3/src/common/dirctrlcmn.cpp | 1 - Externals/wxWidgets3/src/common/dlgcmn.cpp | 16 +- Externals/wxWidgets3/src/common/dndcmn.cpp | 1 - Externals/wxWidgets3/src/common/dobjcmn.cpp | 147 +- Externals/wxWidgets3/src/common/docmdi.cpp | 1 - Externals/wxWidgets3/src/common/docview.cpp | 144 +- Externals/wxWidgets3/src/common/dpycmn.cpp | 1 - Externals/wxWidgets3/src/common/dseldlg.cpp | 1 - Externals/wxWidgets3/src/common/dynarray.cpp | 9 +- Externals/wxWidgets3/src/common/dynlib.cpp | 52 +- Externals/wxWidgets3/src/common/dynload.cpp | 67 +- Externals/wxWidgets3/src/common/effects.cpp | 1 - Externals/wxWidgets3/src/common/event.cpp | 142 +- .../wxWidgets3/src/common/evtloopcmn.cpp | 122 +- Externals/wxWidgets3/src/common/extended.c | 1 - Externals/wxWidgets3/src/common/fddlgcmn.cpp | 21 +- .../wxWidgets3/src/common/fdiodispatcher.cpp | 1 - Externals/wxWidgets3/src/common/ffile.cpp | 19 +- Externals/wxWidgets3/src/common/file.cpp | 51 +- Externals/wxWidgets3/src/common/fileback.cpp | 1 - Externals/wxWidgets3/src/common/fileconf.cpp | 6 +- .../wxWidgets3/src/common/filectrlcmn.cpp | 1 - Externals/wxWidgets3/src/common/filefn.cpp | 62 +- .../wxWidgets3/src/common/filehistorycmn.cpp | 1 - Externals/wxWidgets3/src/common/filename.cpp | 307 ++- .../wxWidgets3/src/common/filepickercmn.cpp | 47 +- Externals/wxWidgets3/src/common/filesys.cpp | 27 +- Externals/wxWidgets3/src/common/filtall.cpp | 1 - Externals/wxWidgets3/src/common/filtfind.cpp | 1 - Externals/wxWidgets3/src/common/fldlgcmn.cpp | 1 - Externals/wxWidgets3/src/common/fmapbase.cpp | 17 +- Externals/wxWidgets3/src/common/fontcmn.cpp | 3 +- Externals/wxWidgets3/src/common/fontdata.cpp | 27 +- .../wxWidgets3/src/common/fontenumcmn.cpp | 1 - Externals/wxWidgets3/src/common/fontmap.cpp | 9 +- .../wxWidgets3/src/common/fontmgrcmn.cpp | 1 - .../wxWidgets3/src/common/fontpickercmn.cpp | 20 +- .../wxWidgets3/src/common/fontutilcmn.cpp | 1 - Externals/wxWidgets3/src/common/framecmn.cpp | 68 +- Externals/wxWidgets3/src/common/fs_arc.cpp | 3 +- Externals/wxWidgets3/src/common/fs_filter.cpp | 1 - Externals/wxWidgets3/src/common/fs_inet.cpp | 1 - Externals/wxWidgets3/src/common/fs_mem.cpp | 1 - .../wxWidgets3/src/common/fswatchercmn.cpp | 152 +- Externals/wxWidgets3/src/common/ftp.cpp | 11 +- Externals/wxWidgets3/src/common/gaugecmn.cpp | 1 - Externals/wxWidgets3/src/common/gbsizer.cpp | 18 +- Externals/wxWidgets3/src/common/gdicmn.cpp | 25 +- Externals/wxWidgets3/src/common/geometry.cpp | 48 +- Externals/wxWidgets3/src/common/gifdecod.cpp | 3 +- Externals/wxWidgets3/src/common/glcmn.cpp | 1 - Externals/wxWidgets3/src/common/graphcmn.cpp | 6 +- Externals/wxWidgets3/src/common/gridcmn.cpp | 1 - Externals/wxWidgets3/src/common/hash.cpp | 1 - Externals/wxWidgets3/src/common/hashmap.cpp | 1 - .../wxWidgets3/src/common/headercolcmn.cpp | 1 - .../wxWidgets3/src/common/headerctrlcmn.cpp | 27 +- Externals/wxWidgets3/src/common/helpbase.cpp | 1 - Externals/wxWidgets3/src/common/http.cpp | 71 +- .../wxWidgets3/src/common/hyperlnkcmn.cpp | 3 +- Externals/wxWidgets3/src/common/iconbndl.cpp | 1 - Externals/wxWidgets3/src/common/imagall.cpp | 1 - Externals/wxWidgets3/src/common/imagbmp.cpp | 160 +- Externals/wxWidgets3/src/common/image.cpp | 427 ++-- Externals/wxWidgets3/src/common/imagfill.cpp | 1 - Externals/wxWidgets3/src/common/imaggif.cpp | 1 - Externals/wxWidgets3/src/common/imagiff.cpp | 1 - Externals/wxWidgets3/src/common/imagjpeg.cpp | 1 - Externals/wxWidgets3/src/common/imagpcx.cpp | 1 - Externals/wxWidgets3/src/common/imagpng.cpp | 17 +- Externals/wxWidgets3/src/common/imagpnm.cpp | 1 - Externals/wxWidgets3/src/common/imagtga.cpp | 13 +- Externals/wxWidgets3/src/common/imagtiff.cpp | 3 +- Externals/wxWidgets3/src/common/imagxpm.cpp | 44 +- Externals/wxWidgets3/src/common/init.cpp | 27 +- Externals/wxWidgets3/src/common/intl.cpp | 93 +- Externals/wxWidgets3/src/common/ipcbase.cpp | 1 - .../wxWidgets3/src/common/languageinfo.cpp | 1 - Externals/wxWidgets3/src/common/layout.cpp | 1 - Externals/wxWidgets3/src/common/lboxcmn.cpp | 15 +- Externals/wxWidgets3/src/common/list.cpp | 3 +- .../wxWidgets3/src/common/listctrlcmn.cpp | 100 +- Externals/wxWidgets3/src/common/log.cpp | 18 +- Externals/wxWidgets3/src/common/longlong.cpp | 1 - .../wxWidgets3/src/common/markupparser.cpp | 9 +- Externals/wxWidgets3/src/common/matrix.cpp | 1 - .../wxWidgets3/src/common/mediactrlcmn.cpp | 9 +- Externals/wxWidgets3/src/common/memory.cpp | 4 +- Externals/wxWidgets3/src/common/menucmn.cpp | 40 +- Externals/wxWidgets3/src/common/mimecmn.cpp | 3 +- Externals/wxWidgets3/src/common/modalhook.cpp | 119 ++ Externals/wxWidgets3/src/common/module.cpp | 3 +- .../wxWidgets3/src/common/mousemanager.cpp | 1 - Externals/wxWidgets3/src/common/msgout.cpp | 3 +- Externals/wxWidgets3/src/common/mstream.cpp | 1 - Externals/wxWidgets3/src/common/nbkbase.cpp | 13 +- .../wxWidgets3/src/common/numformatter.cpp | 9 +- Externals/wxWidgets3/src/common/object.cpp | 1 - .../wxWidgets3/src/common/odcombocmn.cpp | 1 - .../wxWidgets3/src/common/overlaycmn.cpp | 1 - .../wxWidgets3/src/common/ownerdrwcmn.cpp | 1 - Externals/wxWidgets3/src/common/panelcmn.cpp | 1 - Externals/wxWidgets3/src/common/paper.cpp | 1 - Externals/wxWidgets3/src/common/persist.cpp | 1 - .../wxWidgets3/src/common/pickerbase.cpp | 5 +- Externals/wxWidgets3/src/common/platinfo.cpp | 1 - Externals/wxWidgets3/src/common/popupcmn.cpp | 78 +- Externals/wxWidgets3/src/common/powercmn.cpp | 1 - .../wxWidgets3/src/common/preferencescmn.cpp | 72 + Externals/wxWidgets3/src/common/prntbase.cpp | 70 +- Externals/wxWidgets3/src/common/process.cpp | 9 +- Externals/wxWidgets3/src/common/protocol.cpp | 27 +- Externals/wxWidgets3/src/common/quantize.cpp | 1 - .../wxWidgets3/src/common/radiobtncmn.cpp | 3 +- Externals/wxWidgets3/src/common/radiocmn.cpp | 3 +- .../wxWidgets3/src/common/rearrangectrl.cpp | 1 - Externals/wxWidgets3/src/common/regex.cpp | 1 - Externals/wxWidgets3/src/common/rendcmn.cpp | 1 - Externals/wxWidgets3/src/common/rgncmn.cpp | 3 +- .../wxWidgets3/src/common/richtooltipcmn.cpp | 15 +- Externals/wxWidgets3/src/common/sckaddr.cpp | 30 +- Externals/wxWidgets3/src/common/sckfile.cpp | 1 - Externals/wxWidgets3/src/common/sckipc.cpp | 5 +- Externals/wxWidgets3/src/common/sckstrm.cpp | 1 - .../wxWidgets3/src/common/scrolbarcmn.cpp | 1 - .../src/common/selectdispatcher.cpp | 1 - Externals/wxWidgets3/src/common/settcmn.cpp | 1 - Externals/wxWidgets3/src/common/sizer.cpp | 159 +- Externals/wxWidgets3/src/common/slidercmn.cpp | 3 +- Externals/wxWidgets3/src/common/socket.cpp | 61 +- .../wxWidgets3/src/common/socketiohandler.cpp | 1 - .../wxWidgets3/src/common/spinbtncmn.cpp | 1 - .../wxWidgets3/src/common/spinctrlcmn.cpp | 24 +- Externals/wxWidgets3/src/common/srchcmn.cpp | 5 +- Externals/wxWidgets3/src/common/sstream.cpp | 1 - Externals/wxWidgets3/src/common/statbar.cpp | 1 - .../wxWidgets3/src/common/statbmpcmn.cpp | 1 - .../wxWidgets3/src/common/statboxcmn.cpp | 8 +- .../wxWidgets3/src/common/statlinecmn.cpp | 1 - .../wxWidgets3/src/common/stattextcmn.cpp | 1 - Externals/wxWidgets3/src/common/stdpbase.cpp | 17 +- Externals/wxWidgets3/src/common/stdstream.cpp | 1 - Externals/wxWidgets3/src/common/stockitem.cpp | 3 +- Externals/wxWidgets3/src/common/stopwatch.cpp | 1 - Externals/wxWidgets3/src/common/strconv.cpp | 2 - Externals/wxWidgets3/src/common/stream.cpp | 185 +- Externals/wxWidgets3/src/common/string.cpp | 9 +- .../wxWidgets3/src/common/stringimpl.cpp | 1 - Externals/wxWidgets3/src/common/stringops.cpp | 4 +- Externals/wxWidgets3/src/common/strvararg.cpp | 5 +- Externals/wxWidgets3/src/common/sysopt.cpp | 1 - Externals/wxWidgets3/src/common/tarstrm.cpp | 1 - .../wxWidgets3/src/common/taskbarcmn.cpp | 1 - Externals/wxWidgets3/src/common/tbarbase.cpp | 7 +- Externals/wxWidgets3/src/common/textbuf.cpp | 6 - Externals/wxWidgets3/src/common/textcmn.cpp | 260 ++- .../wxWidgets3/src/common/textentrycmn.cpp | 23 +- Externals/wxWidgets3/src/common/textfile.cpp | 1 - .../wxWidgets3/src/common/textmeasurecmn.cpp | 280 +++ .../wxWidgets3/src/common/threadinfo.cpp | 81 + Externals/wxWidgets3/src/common/time.cpp | 23 +- Externals/wxWidgets3/src/common/timercmn.cpp | 1 - Externals/wxWidgets3/src/common/timerimpl.cpp | 1 - Externals/wxWidgets3/src/common/tokenzr.cpp | 1 - Externals/wxWidgets3/src/common/toplvcmn.cpp | 9 +- .../wxWidgets3/src/common/translation.cpp | 300 ++- Externals/wxWidgets3/src/common/treebase.cpp | 49 +- Externals/wxWidgets3/src/common/txtstrm.cpp | 1 - .../wxWidgets3/src/common/uiactioncmn.cpp | 10 +- Externals/wxWidgets3/src/common/unichar.cpp | 1 - Externals/wxWidgets3/src/common/unictabl.inc | 1 - Externals/wxWidgets3/src/common/uri.cpp | 3 +- Externals/wxWidgets3/src/common/url.cpp | 1 - Externals/wxWidgets3/src/common/ustring.cpp | 1 - Externals/wxWidgets3/src/common/utilscmn.cpp | 136 +- Externals/wxWidgets3/src/common/valgen.cpp | 77 +- Externals/wxWidgets3/src/common/validate.cpp | 1 - Externals/wxWidgets3/src/common/valtext.cpp | 7 +- Externals/wxWidgets3/src/common/variant.cpp | 6 - Externals/wxWidgets3/src/common/webview.cpp | 124 +- .../src/common/webviewarchivehandler.cpp | 1 - .../src/common/webviewfshandler.cpp | 37 + Externals/wxWidgets3/src/common/wfstream.cpp | 1 - Externals/wxWidgets3/src/common/wincmn.cpp | 460 ++-- Externals/wxWidgets3/src/common/windowid.cpp | 1 - Externals/wxWidgets3/src/common/wrapsizer.cpp | 23 +- Externals/wxWidgets3/src/common/wxcrt.cpp | 51 +- Externals/wxWidgets3/src/common/wxprintf.cpp | 1 - Externals/wxWidgets3/src/common/xlocale.cpp | 1 - Externals/wxWidgets3/src/common/xpmdecod.cpp | 1 - Externals/wxWidgets3/src/common/xti.cpp | 3 +- Externals/wxWidgets3/src/common/xtistrm.cpp | 3 +- Externals/wxWidgets3/src/common/xtixml.cpp | 1 - Externals/wxWidgets3/src/common/zipstrm.cpp | 1 - Externals/wxWidgets3/src/common/zstream.cpp | 17 +- Externals/wxWidgets3/src/cwcopysetup.bat | 32 + Externals/wxWidgets3/src/cwdcopysetup.bat | 32 + .../wxWidgets3/src/generic/aboutdlgg.cpp | 6 +- Externals/wxWidgets3/src/generic/accel.cpp | 1 - Externals/wxWidgets3/src/generic/animateg.cpp | 1 - .../wxWidgets3/src/generic/bannerwindow.cpp | 1 - Externals/wxWidgets3/src/generic/bmpcboxg.cpp | 1 - Externals/wxWidgets3/src/generic/busyinfo.cpp | 1 - .../wxWidgets3/src/generic/buttonbar.cpp | 3 +- Externals/wxWidgets3/src/generic/calctrlg.cpp | 7 +- Externals/wxWidgets3/src/generic/caret.cpp | 14 +- Externals/wxWidgets3/src/generic/choicbkg.cpp | 26 +- Externals/wxWidgets3/src/generic/choicdgg.cpp | 1 - .../wxWidgets3/src/generic/clrpickerg.cpp | 3 +- .../wxWidgets3/src/generic/collpaneg.cpp | 5 +- Externals/wxWidgets3/src/generic/colour.cpp | 1 - Externals/wxWidgets3/src/generic/colrdlgg.cpp | 9 +- Externals/wxWidgets3/src/generic/combog.cpp | 3 +- .../src/generic/commandlinkbuttong.cpp | 1 - Externals/wxWidgets3/src/generic/datavgen.cpp | 598 ++++-- Externals/wxWidgets3/src/generic/datectlg.cpp | 17 +- Externals/wxWidgets3/src/generic/dbgrptg.cpp | 14 +- Externals/wxWidgets3/src/generic/dcpsg.cpp | 58 +- Externals/wxWidgets3/src/generic/descrip.mms | 17 +- Externals/wxWidgets3/src/generic/dirctrlg.cpp | 89 +- Externals/wxWidgets3/src/generic/dirdlgg.cpp | 1 - Externals/wxWidgets3/src/generic/dragimgg.cpp | 3 +- Externals/wxWidgets3/src/generic/editlbox.cpp | 35 +- Externals/wxWidgets3/src/generic/fdrepdlg.cpp | 11 +- .../wxWidgets3/src/generic/filectrlg.cpp | 52 +- Externals/wxWidgets3/src/generic/filedlgg.cpp | 4 +- .../wxWidgets3/src/generic/filepickerg.cpp | 55 +- Externals/wxWidgets3/src/generic/fontdlgg.cpp | 1 - .../wxWidgets3/src/generic/fontpickerg.cpp | 3 +- .../wxWidgets3/src/generic/fswatcherg.cpp | 1 - Externals/wxWidgets3/src/generic/graphicc.cpp | 605 +++--- Externals/wxWidgets3/src/generic/grid.cpp | 805 +++++-- Externals/wxWidgets3/src/generic/gridctrl.cpp | 188 +- .../wxWidgets3/src/generic/grideditors.cpp | 132 +- Externals/wxWidgets3/src/generic/gridsel.cpp | 1 - .../wxWidgets3/src/generic/headerctrlg.cpp | 27 +- Externals/wxWidgets3/src/generic/helpext.cpp | 1 - Externals/wxWidgets3/src/generic/htmllbox.cpp | 1 - .../wxWidgets3/src/generic/hyperlinkg.cpp | 3 +- Externals/wxWidgets3/src/generic/icon.cpp | 1 - Externals/wxWidgets3/src/generic/imaglist.cpp | 9 +- Externals/wxWidgets3/src/generic/infobar.cpp | 56 +- Externals/wxWidgets3/src/generic/laywin.cpp | 3 +- Externals/wxWidgets3/src/generic/listbkg.cpp | 147 +- Externals/wxWidgets3/src/generic/listctrl.cpp | 371 ++-- Externals/wxWidgets3/src/generic/logg.cpp | 18 +- .../wxWidgets3/src/generic/markuptext.cpp | 1 - Externals/wxWidgets3/src/generic/mask.cpp | 1 - Externals/wxWidgets3/src/generic/mdig.cpp | 5 +- Externals/wxWidgets3/src/generic/msgdlgg.cpp | 8 +- Externals/wxWidgets3/src/generic/notebook.cpp | 5 +- .../wxWidgets3/src/generic/notifmsgg.cpp | 1 - Externals/wxWidgets3/src/generic/numdlgg.cpp | 1 - Externals/wxWidgets3/src/generic/odcombo.cpp | 37 +- Externals/wxWidgets3/src/generic/paletteg.cpp | 1 - .../wxWidgets3/src/generic/preferencesg.cpp | 260 +++ Externals/wxWidgets3/src/generic/printps.cpp | 1 - Externals/wxWidgets3/src/generic/prntdlgg.cpp | 1 - Externals/wxWidgets3/src/generic/progdlgg.cpp | 1 - Externals/wxWidgets3/src/generic/propdlg.cpp | 1 - Externals/wxWidgets3/src/generic/regiong.cpp | 1 - Externals/wxWidgets3/src/generic/renderg.cpp | 1 - .../wxWidgets3/src/generic/richmsgdlgg.cpp | 1 - .../wxWidgets3/src/generic/richtooltipg.cpp | 70 +- Externals/wxWidgets3/src/generic/sashwin.cpp | 5 +- Externals/wxWidgets3/src/generic/scrlwing.cpp | 118 +- Externals/wxWidgets3/src/generic/selstore.cpp | 1 - Externals/wxWidgets3/src/generic/spinctlg.cpp | 231 +- Externals/wxWidgets3/src/generic/splash.cpp | 1 - Externals/wxWidgets3/src/generic/splitter.cpp | 30 +- Externals/wxWidgets3/src/generic/srchctlg.cpp | 35 +- Externals/wxWidgets3/src/generic/statbmpg.cpp | 1 - Externals/wxWidgets3/src/generic/statline.cpp | 1 - .../wxWidgets3/src/generic/stattextg.cpp | 1 - Externals/wxWidgets3/src/generic/statusbr.cpp | 113 +- Externals/wxWidgets3/src/generic/tabg.cpp | 5 +- Externals/wxWidgets3/src/generic/textdlgg.cpp | 56 +- .../wxWidgets3/src/generic/textmeasure.cpp | 68 + .../wxWidgets3/src/generic/timectrlg.cpp | 19 +- Externals/wxWidgets3/src/generic/timer.cpp | 1 - Externals/wxWidgets3/src/generic/tipdlg.cpp | 1 - Externals/wxWidgets3/src/generic/tipwin.cpp | 7 +- Externals/wxWidgets3/src/generic/toolbkg.cpp | 26 +- Externals/wxWidgets3/src/generic/treebkg.cpp | 17 +- Externals/wxWidgets3/src/generic/treectlg.cpp | 195 +- Externals/wxWidgets3/src/generic/treelist.cpp | 25 +- Externals/wxWidgets3/src/generic/vlbox.cpp | 5 +- Externals/wxWidgets3/src/generic/vscroll.cpp | 83 +- Externals/wxWidgets3/src/generic/wizard.cpp | 1 - Externals/wxWidgets3/src/gtk/aboutdlg.cpp | 235 ++- Externals/wxWidgets3/src/gtk/animate.cpp | 18 +- Externals/wxWidgets3/src/gtk/anybutton.cpp | 30 +- Externals/wxWidgets3/src/gtk/app.cpp | 92 +- Externals/wxWidgets3/src/gtk/artgtk.cpp | 78 +- .../wxWidgets3/src/gtk/assertdlg_gtk.cpp | 106 +- Externals/wxWidgets3/src/gtk/bitmap.cpp | 764 ++++++- Externals/wxWidgets3/src/gtk/bmpbuttn.cpp | 1 - Externals/wxWidgets3/src/gtk/bmpcbox.cpp | 15 +- Externals/wxWidgets3/src/gtk/brush.cpp | 1 - Externals/wxWidgets3/src/gtk/button.cpp | 19 +- Externals/wxWidgets3/src/gtk/calctrl.cpp | 1 - Externals/wxWidgets3/src/gtk/checkbox.cpp | 29 +- Externals/wxWidgets3/src/gtk/checklst.cpp | 10 +- Externals/wxWidgets3/src/gtk/choice.cpp | 107 +- Externals/wxWidgets3/src/gtk/clipbrd.cpp | 13 +- Externals/wxWidgets3/src/gtk/clrpicker.cpp | 16 +- Externals/wxWidgets3/src/gtk/collpane.cpp | 14 +- Externals/wxWidgets3/src/gtk/colordlg.cpp | 34 +- Externals/wxWidgets3/src/gtk/colour.cpp | 98 +- Externals/wxWidgets3/src/gtk/combobox.cpp | 67 +- Externals/wxWidgets3/src/gtk/control.cpp | 194 +- Externals/wxWidgets3/src/gtk/cursor.cpp | 243 +-- Externals/wxWidgets3/src/gtk/dataobj.cpp | 136 +- Externals/wxWidgets3/src/gtk/dataview.cpp | 485 +++-- Externals/wxWidgets3/src/gtk/dc.cpp | 346 ++- Externals/wxWidgets3/src/gtk/dcclient.cpp | 502 ++--- Externals/wxWidgets3/src/gtk/dcmemory.cpp | 6 +- Externals/wxWidgets3/src/gtk/dcscreen.cpp | 1 - Externals/wxWidgets3/src/gtk/descrip.mms | 7 +- Externals/wxWidgets3/src/gtk/dialog.cpp | 70 +- Externals/wxWidgets3/src/gtk/dirdlg.cpp | 76 +- Externals/wxWidgets3/src/gtk/dnd.cpp | 56 +- Externals/wxWidgets3/src/gtk/evtloop.cpp | 156 +- Externals/wxWidgets3/src/gtk/filectrl.cpp | 53 +- Externals/wxWidgets3/src/gtk/filedlg.cpp | 107 +- Externals/wxWidgets3/src/gtk/filehistory.cpp | 6 +- Externals/wxWidgets3/src/gtk/filepicker.cpp | 50 +- Externals/wxWidgets3/src/gtk/font.cpp | 57 +- Externals/wxWidgets3/src/gtk/fontdlg.cpp | 124 +- Externals/wxWidgets3/src/gtk/fontpicker.cpp | 1 - Externals/wxWidgets3/src/gtk/frame.cpp | 77 +- Externals/wxWidgets3/src/gtk/gauge.cpp | 8 +- Externals/wxWidgets3/src/gtk/glcanvas.cpp | 49 +- Externals/wxWidgets3/src/gtk/gnome/gprint.cpp | 16 +- Externals/wxWidgets3/src/gtk/gnome/gvfs.cpp | 1 - .../wxWidgets3/src/gtk/hildon/notifmsg.cpp | 1 - Externals/wxWidgets3/src/gtk/hyperlink.cpp | 7 +- Externals/wxWidgets3/src/gtk/infobar.cpp | 9 +- Externals/wxWidgets3/src/gtk/listbox.cpp | 169 +- Externals/wxWidgets3/src/gtk/mdi.cpp | 13 +- Externals/wxWidgets3/src/gtk/menu.cpp | 175 +- Externals/wxWidgets3/src/gtk/minifram.cpp | 128 +- Externals/wxWidgets3/src/gtk/mnemonics.cpp | 1 - Externals/wxWidgets3/src/gtk/msgdlg.cpp | 19 +- Externals/wxWidgets3/src/gtk/nativewin.cpp | 12 +- Externals/wxWidgets3/src/gtk/nonownedwnd.cpp | 31 +- Externals/wxWidgets3/src/gtk/notebook.cpp | 23 +- Externals/wxWidgets3/src/gtk/notifmsg.cpp | 217 ++ Externals/wxWidgets3/src/gtk/pen.cpp | 1 - Externals/wxWidgets3/src/gtk/popupwin.cpp | 25 +- Externals/wxWidgets3/src/gtk/print.cpp | 78 +- Externals/wxWidgets3/src/gtk/private.cpp | 47 +- Externals/wxWidgets3/src/gtk/radiobox.cpp | 27 +- Externals/wxWidgets3/src/gtk/radiobut.cpp | 43 +- Externals/wxWidgets3/src/gtk/region.cpp | 211 +- Externals/wxWidgets3/src/gtk/renderer.cpp | 309 ++- Externals/wxWidgets3/src/gtk/scrolbar.cpp | 8 +- Externals/wxWidgets3/src/gtk/scrolwin.cpp | 18 +- Externals/wxWidgets3/src/gtk/settings.cpp | 213 +- Externals/wxWidgets3/src/gtk/slider.cpp | 63 +- Externals/wxWidgets3/src/gtk/sockgtk.cpp | 5 +- Externals/wxWidgets3/src/gtk/spinbutt.cpp | 12 +- Externals/wxWidgets3/src/gtk/spinctrl.cpp | 177 +- Externals/wxWidgets3/src/gtk/statbmp.cpp | 4 +- Externals/wxWidgets3/src/gtk/statbox.cpp | 20 +- Externals/wxWidgets3/src/gtk/statline.cpp | 15 +- Externals/wxWidgets3/src/gtk/stattext.cpp | 67 +- Externals/wxWidgets3/src/gtk/taskbar.cpp | 48 +- Externals/wxWidgets3/src/gtk/textctrl.cpp | 255 ++- Externals/wxWidgets3/src/gtk/textentry.cpp | 220 +- Externals/wxWidgets3/src/gtk/textmeasure.cpp | 204 ++ Externals/wxWidgets3/src/gtk/tglbtn.cpp | 14 +- Externals/wxWidgets3/src/gtk/timer.cpp | 1 - Externals/wxWidgets3/src/gtk/toolbar.cpp | 76 +- Externals/wxWidgets3/src/gtk/tooltip.cpp | 1 - Externals/wxWidgets3/src/gtk/toplevel.cpp | 431 ++-- Externals/wxWidgets3/src/gtk/treeentry_gtk.c | 106 +- Externals/wxWidgets3/src/gtk/utilsgtk.cpp | 154 +- .../wxWidgets3/src/gtk/webview_webkit.cpp | 300 ++- Externals/wxWidgets3/src/gtk/win_gtk.cpp | 289 ++- Externals/wxWidgets3/src/gtk/window.cpp | 1854 +++++++++-------- Externals/wxWidgets3/src/msw/aboutdlg.cpp | 1 - Externals/wxWidgets3/src/msw/accel.cpp | 3 +- Externals/wxWidgets3/src/msw/anybutton.cpp | 63 +- Externals/wxWidgets3/src/msw/app.cpp | 33 +- Externals/wxWidgets3/src/msw/artmsw.cpp | 200 +- Externals/wxWidgets3/src/msw/basemsw.cpp | 1 - Externals/wxWidgets3/src/msw/bitmap.cpp | 172 +- Externals/wxWidgets3/src/msw/bmpbuttn.cpp | 1 - Externals/wxWidgets3/src/msw/bmpcbox.cpp | 35 +- Externals/wxWidgets3/src/msw/brush.cpp | 1 - Externals/wxWidgets3/src/msw/button.cpp | 38 +- Externals/wxWidgets3/src/msw/calctrl.cpp | 7 +- Externals/wxWidgets3/src/msw/caret.cpp | 1 - Externals/wxWidgets3/src/msw/checkbox.cpp | 67 +- Externals/wxWidgets3/src/msw/checklst.cpp | 3 +- Externals/wxWidgets3/src/msw/choice.cpp | 193 +- Externals/wxWidgets3/src/msw/clipbrd.cpp | 18 +- Externals/wxWidgets3/src/msw/colordlg.cpp | 6 +- Externals/wxWidgets3/src/msw/colour.cpp | 1 - Externals/wxWidgets3/src/msw/combo.cpp | 15 +- Externals/wxWidgets3/src/msw/combobox.cpp | 224 +- .../wxWidgets3/src/msw/commandlinkbutton.cpp | 3 +- Externals/wxWidgets3/src/msw/control.cpp | 25 +- Externals/wxWidgets3/src/msw/crashrpt.cpp | 3 +- Externals/wxWidgets3/src/msw/cursor.cpp | 51 +- Externals/wxWidgets3/src/msw/data.cpp | 1 - Externals/wxWidgets3/src/msw/datecontrols.cpp | 1 - Externals/wxWidgets3/src/msw/datectrl.cpp | 1 - Externals/wxWidgets3/src/msw/datetimectrl.cpp | 1 - Externals/wxWidgets3/src/msw/dc.cpp | 221 +- Externals/wxWidgets3/src/msw/dcclient.cpp | 256 ++- Externals/wxWidgets3/src/msw/dcmemory.cpp | 1 - Externals/wxWidgets3/src/msw/dcprint.cpp | 11 +- Externals/wxWidgets3/src/msw/dcscreen.cpp | 1 - Externals/wxWidgets3/src/msw/dde.cpp | 7 +- Externals/wxWidgets3/src/msw/debughlp.cpp | 3 +- Externals/wxWidgets3/src/msw/dialog.cpp | 8 +- Externals/wxWidgets3/src/msw/dialup.cpp | 3 +- Externals/wxWidgets3/src/msw/dib.cpp | 7 +- Externals/wxWidgets3/src/msw/dir.cpp | 93 +- Externals/wxWidgets3/src/msw/dirdlg.cpp | 278 ++- Externals/wxWidgets3/src/msw/display.cpp | 31 +- Externals/wxWidgets3/src/msw/dlmsw.cpp | 28 +- Externals/wxWidgets3/src/msw/dragimag.cpp | 3 +- Externals/wxWidgets3/src/msw/enhmeta.cpp | 5 +- Externals/wxWidgets3/src/msw/evtloop.cpp | 170 +- .../wxWidgets3/src/msw/evtloopconsole.cpp | 165 ++ Externals/wxWidgets3/src/msw/fdrepdlg.cpp | 11 +- Externals/wxWidgets3/src/msw/filedlg.cpp | 53 +- Externals/wxWidgets3/src/msw/font.cpp | 25 +- Externals/wxWidgets3/src/msw/fontdlg.cpp | 4 +- Externals/wxWidgets3/src/msw/fontenum.cpp | 12 +- Externals/wxWidgets3/src/msw/fontutil.cpp | 9 +- Externals/wxWidgets3/src/msw/frame.cpp | 118 +- Externals/wxWidgets3/src/msw/fswatcher.cpp | 13 +- Externals/wxWidgets3/src/msw/gauge.cpp | 1 - Externals/wxWidgets3/src/msw/gdiimage.cpp | 129 +- Externals/wxWidgets3/src/msw/gdiobj.cpp | 1 - Externals/wxWidgets3/src/msw/gdiplus.cpp | 1 - Externals/wxWidgets3/src/msw/glcanvas.cpp | 1 - Externals/wxWidgets3/src/msw/graphics.cpp | 134 +- Externals/wxWidgets3/src/msw/headerctrl.cpp | 58 +- Externals/wxWidgets3/src/msw/helpbest.cpp | 1 - Externals/wxWidgets3/src/msw/helpchm.cpp | 7 +- Externals/wxWidgets3/src/msw/helpwin.cpp | 11 +- Externals/wxWidgets3/src/msw/hyperlink.cpp | 1 - Externals/wxWidgets3/src/msw/icon.cpp | 12 +- Externals/wxWidgets3/src/msw/imaglist.cpp | 1 - Externals/wxWidgets3/src/msw/iniconf.cpp | 43 +- Externals/wxWidgets3/src/msw/joystick.cpp | 1 - Externals/wxWidgets3/src/msw/listbox.cpp | 54 +- Externals/wxWidgets3/src/msw/listctrl.cpp | 129 +- Externals/wxWidgets3/src/msw/main.cpp | 9 +- Externals/wxWidgets3/src/msw/mdi.cpp | 76 +- Externals/wxWidgets3/src/msw/mediactrl_am.cpp | 5 +- Externals/wxWidgets3/src/msw/mediactrl_qt.cpp | 1 - .../wxWidgets3/src/msw/mediactrl_wmp10.cpp | 7 +- Externals/wxWidgets3/src/msw/menu.cpp | 43 +- Externals/wxWidgets3/src/msw/menuitem.cpp | 42 +- Externals/wxWidgets3/src/msw/metafile.cpp | 15 +- Externals/wxWidgets3/src/msw/microwin.c | 1 - Externals/wxWidgets3/src/msw/mimetype.cpp | 86 +- Externals/wxWidgets3/src/msw/minifram.cpp | 1 - Externals/wxWidgets3/src/msw/msgdlg.cpp | 46 +- Externals/wxWidgets3/src/msw/mslu.cpp | 9 +- Externals/wxWidgets3/src/msw/nativdlg.cpp | 1 - Externals/wxWidgets3/src/msw/nativewin.cpp | 1 - Externals/wxWidgets3/src/msw/nonownedwnd.cpp | 1 - Externals/wxWidgets3/src/msw/notebook.cpp | 130 +- Externals/wxWidgets3/src/msw/notifmsg.cpp | 133 +- Externals/wxWidgets3/src/msw/ole/access.cpp | 1 - Externals/wxWidgets3/src/msw/ole/activex.cpp | 25 +- Externals/wxWidgets3/src/msw/ole/automtn.cpp | 92 +- Externals/wxWidgets3/src/msw/ole/dataobj.cpp | 313 ++- Externals/wxWidgets3/src/msw/ole/dropsrc.cpp | 1 - Externals/wxWidgets3/src/msw/ole/droptgt.cpp | 164 +- Externals/wxWidgets3/src/msw/ole/oleutils.cpp | 352 +++- .../wxWidgets3/src/msw/ole/safearray.cpp | 135 ++ Externals/wxWidgets3/src/msw/ole/uuid.cpp | 3 +- Externals/wxWidgets3/src/msw/ownerdrw.cpp | 3 +- Externals/wxWidgets3/src/msw/palette.cpp | 1 - Externals/wxWidgets3/src/msw/panel.cpp | 1 - Externals/wxWidgets3/src/msw/pen.cpp | 1 - Externals/wxWidgets3/src/msw/penwin.cpp | 1 - Externals/wxWidgets3/src/msw/popupwin.cpp | 10 +- Externals/wxWidgets3/src/msw/power.cpp | 1 - Externals/wxWidgets3/src/msw/printdlg.cpp | 16 +- Externals/wxWidgets3/src/msw/printwin.cpp | 20 +- Externals/wxWidgets3/src/msw/progdlg.cpp | 13 +- Externals/wxWidgets3/src/msw/radiobox.cpp | 34 +- Externals/wxWidgets3/src/msw/radiobut.cpp | 47 +- Externals/wxWidgets3/src/msw/regconf.cpp | 3 +- Externals/wxWidgets3/src/msw/region.cpp | 1 - Externals/wxWidgets3/src/msw/registry.cpp | 5 +- Externals/wxWidgets3/src/msw/renderer.cpp | 151 +- Externals/wxWidgets3/src/msw/richmsgdlg.cpp | 8 +- Externals/wxWidgets3/src/msw/richtooltip.cpp | 17 +- Externals/wxWidgets3/src/msw/scrolbar.cpp | 1 - Externals/wxWidgets3/src/msw/settings.cpp | 1 - Externals/wxWidgets3/src/msw/slider.cpp | 9 +- Externals/wxWidgets3/src/msw/snglinst.cpp | 1 - Externals/wxWidgets3/src/msw/sockmsw.cpp | 3 +- Externals/wxWidgets3/src/msw/sound.cpp | 1 - Externals/wxWidgets3/src/msw/spinbutt.cpp | 7 +- Externals/wxWidgets3/src/msw/spinctrl.cpp | 161 +- Externals/wxWidgets3/src/msw/stackwalk.cpp | 1 - Externals/wxWidgets3/src/msw/statbmp.cpp | 42 +- Externals/wxWidgets3/src/msw/statbox.cpp | 69 +- Externals/wxWidgets3/src/msw/statline.cpp | 1 - Externals/wxWidgets3/src/msw/stattext.cpp | 1 - Externals/wxWidgets3/src/msw/statusbar.cpp | 7 +- Externals/wxWidgets3/src/msw/stdpaths.cpp | 1 - Externals/wxWidgets3/src/msw/taskbar.cpp | 9 +- Externals/wxWidgets3/src/msw/textctrl.cpp | 89 +- Externals/wxWidgets3/src/msw/textentry.cpp | 23 +- Externals/wxWidgets3/src/msw/textmeasure.cpp | 189 ++ Externals/wxWidgets3/src/msw/tglbtn.cpp | 5 +- Externals/wxWidgets3/src/msw/thread.cpp | 34 +- Externals/wxWidgets3/src/msw/timectrl.cpp | 1 - Externals/wxWidgets3/src/msw/timer.cpp | 1 - Externals/wxWidgets3/src/msw/toolbar.cpp | 32 +- Externals/wxWidgets3/src/msw/tooltip.cpp | 19 +- Externals/wxWidgets3/src/msw/toplevel.cpp | 190 +- Externals/wxWidgets3/src/msw/treectrl.cpp | 219 +- Externals/wxWidgets3/src/msw/uiaction.cpp | 7 +- Externals/wxWidgets3/src/msw/urlmsw.cpp | 1 - Externals/wxWidgets3/src/msw/utils.cpp | 24 +- Externals/wxWidgets3/src/msw/utilsexc.cpp | 100 +- Externals/wxWidgets3/src/msw/utilsgui.cpp | 144 +- Externals/wxWidgets3/src/msw/utilswin.cpp | 138 ++ Externals/wxWidgets3/src/msw/uxtheme.cpp | 1 - Externals/wxWidgets3/src/msw/version.rc | 50 +- Externals/wxWidgets3/src/msw/volume.cpp | 17 +- Externals/wxWidgets3/src/msw/webview_ie.cpp | 934 ++++++--- .../wxWidgets3/src/msw/wince/checklst.cpp | 5 +- .../wxWidgets3/src/msw/wince/choicece.cpp | 5 +- .../wxWidgets3/src/msw/wince/clean_vcp.py | 5 +- Externals/wxWidgets3/src/msw/wince/crt.cpp | 1 - .../wxWidgets3/src/msw/wince/filedlgwce.cpp | 4 +- .../wxWidgets3/src/msw/wince/filefnwce.cpp | 7 +- .../wxWidgets3/src/msw/wince/helpwce.cpp | 1 - Externals/wxWidgets3/src/msw/wince/menuce.cpp | 3 +- Externals/wxWidgets3/src/msw/wince/net.cpp | 1 - .../wxWidgets3/src/msw/wince/tbarwce.cpp | 7 +- .../wxWidgets3/src/msw/wince/textctrlce.cpp | 9 +- Externals/wxWidgets3/src/msw/wince/time.cpp | 1 - Externals/wxWidgets3/src/msw/window.cpp | 306 +-- Externals/wxWidgets3/src/msw/winestub.c | 1 - Externals/wxWidgets3/src/osx/accel.cpp | 1 - .../wxWidgets3/src/osx/anybutton_osx.cpp | 1 - Externals/wxWidgets3/src/osx/artmac.cpp | 1 - Externals/wxWidgets3/src/osx/bmpbuttn_osx.cpp | 1 - Externals/wxWidgets3/src/osx/brush.cpp | 1 - Externals/wxWidgets3/src/osx/button_osx.cpp | 20 +- .../wxWidgets3/src/osx/carbon/Info.plist.in | 8 +- .../wxWidgets3/src/osx/carbon/aboutdlg.cpp | 1 - .../wxWidgets3/src/osx/carbon/anybutton.cpp | 13 +- Externals/wxWidgets3/src/osx/carbon/app.cpp | 225 +- .../wxWidgets3/src/osx/carbon/bmpbuttn.cpp | 1 - .../wxWidgets3/src/osx/carbon/button.cpp | 1 - .../wxWidgets3/src/osx/carbon/checkbox.cpp | 1 - .../wxWidgets3/src/osx/carbon/choice.cpp | 1 - .../wxWidgets3/src/osx/carbon/clipbrd.cpp | 1 - .../wxWidgets3/src/osx/carbon/colordlg.cpp | 4 +- .../wxWidgets3/src/osx/carbon/colordlgosx.mm | 12 +- .../wxWidgets3/src/osx/carbon/combobox.cpp | 13 +- .../wxWidgets3/src/osx/carbon/combobxc.cpp | 13 +- .../wxWidgets3/src/osx/carbon/control.cpp | 3 +- .../wxWidgets3/src/osx/carbon/cursor.cpp | 1 - .../wxWidgets3/src/osx/carbon/dataobj.cpp | 152 +- .../wxWidgets3/src/osx/carbon/dataview.cpp | 33 +- .../wxWidgets3/src/osx/carbon/dcclient.cpp | 15 +- .../wxWidgets3/src/osx/carbon/dcprint.cpp | 1 - .../wxWidgets3/src/osx/carbon/dcscreen.cpp | 14 +- .../wxWidgets3/src/osx/carbon/dialog.cpp | 1 - .../wxWidgets3/src/osx/carbon/dirdlg.cpp | 10 +- .../wxWidgets3/src/osx/carbon/dirmac.cpp | 1 - Externals/wxWidgets3/src/osx/carbon/dnd.cpp | 1 - .../wxWidgets3/src/osx/carbon/drawer.cpp | 1 - .../wxWidgets3/src/osx/carbon/evtloop.cpp | 19 +- .../wxWidgets3/src/osx/carbon/filedlg.cpp | 13 +- Externals/wxWidgets3/src/osx/carbon/font.cpp | 38 +- .../wxWidgets3/src/osx/carbon/fontdlg.cpp | 24 +- .../wxWidgets3/src/osx/carbon/fontdlgosx.mm | 4 +- Externals/wxWidgets3/src/osx/carbon/frame.cpp | 5 +- Externals/wxWidgets3/src/osx/carbon/gauge.cpp | 1 - .../wxWidgets3/src/osx/carbon/gdiobj.cpp | 1 - .../wxWidgets3/src/osx/carbon/glcanvas.cpp | 1 - .../wxWidgets3/src/osx/carbon/graphics.cpp | 109 +- .../wxWidgets3/src/osx/carbon/helpxxxx.cpp | 1 - Externals/wxWidgets3/src/osx/carbon/icon.cpp | 3 +- .../wxWidgets3/src/osx/carbon/listbox.cpp | 5 +- .../src/osx/carbon/listctrl_mac.cpp | 58 +- Externals/wxWidgets3/src/osx/carbon/main.cpp | 1 - Externals/wxWidgets3/src/osx/carbon/mdi.cpp | 1 - .../wxWidgets3/src/osx/carbon/mediactrl.cpp | 1 - Externals/wxWidgets3/src/osx/carbon/menu.cpp | 1 - .../wxWidgets3/src/osx/carbon/menuitem.cpp | 1 - .../wxWidgets3/src/osx/carbon/metafile.cpp | 1 - .../wxWidgets3/src/osx/carbon/mimetmac.cpp | 3 +- .../wxWidgets3/src/osx/carbon/msgdlg.cpp | 4 +- .../wxWidgets3/src/osx/carbon/nonownedwnd.cpp | 26 +- .../wxWidgets3/src/osx/carbon/notebmac.cpp | 231 +- .../wxWidgets3/src/osx/carbon/overlay.cpp | 1 - .../wxWidgets3/src/osx/carbon/popupwin.cpp | 22 - .../wxWidgets3/src/osx/carbon/printdlg.cpp | 6 +- .../wxWidgets3/src/osx/carbon/radiobut.cpp | 1 - .../wxWidgets3/src/osx/carbon/region.cpp | 967 ++++++++- .../wxWidgets3/src/osx/carbon/renderer.cpp | 66 +- .../wxWidgets3/src/osx/carbon/scrolbar.cpp | 1 - .../wxWidgets3/src/osx/carbon/settings.cpp | 1 - .../wxWidgets3/src/osx/carbon/slider.cpp | 3 +- Externals/wxWidgets3/src/osx/carbon/sound.cpp | 1 - .../wxWidgets3/src/osx/carbon/spinbutt.cpp | 1 - .../wxWidgets3/src/osx/carbon/srchctrl.cpp | 1 - .../wxWidgets3/src/osx/carbon/statbmp.cpp | 1 - .../wxWidgets3/src/osx/carbon/statbox.cpp | 1 - .../wxWidgets3/src/osx/carbon/statbrma.cpp | 5 +- .../wxWidgets3/src/osx/carbon/statline.cpp | 1 - .../wxWidgets3/src/osx/carbon/statlmac.cpp | 1 - .../wxWidgets3/src/osx/carbon/stattext.cpp | 1 - .../wxWidgets3/src/osx/carbon/taskbar.cpp | 11 +- .../wxWidgets3/src/osx/carbon/textctrl.cpp | 3 +- .../wxWidgets3/src/osx/carbon/tglbtn.cpp | 1 - .../wxWidgets3/src/osx/carbon/thread.cpp | 30 +- Externals/wxWidgets3/src/osx/carbon/timer.cpp | 1 - .../wxWidgets3/src/osx/carbon/toolbar.cpp | 12 +- .../wxWidgets3/src/osx/carbon/tooltip.cpp | 1 - Externals/wxWidgets3/src/osx/carbon/uma.cpp | 1 - Externals/wxWidgets3/src/osx/carbon/utils.cpp | 13 +- .../wxWidgets3/src/osx/carbon/utilscocoa.mm | 97 +- .../wxWidgets3/src/osx/carbon/window.cpp | 27 +- Externals/wxWidgets3/src/osx/checkbox_osx.cpp | 3 +- Externals/wxWidgets3/src/osx/checklst_osx.cpp | 3 +- Externals/wxWidgets3/src/osx/choice_osx.cpp | 68 +- .../wxWidgets3/src/osx/cocoa/aboutdlg.mm | 4 +- .../wxWidgets3/src/osx/cocoa/anybutton.mm | 1 - Externals/wxWidgets3/src/osx/cocoa/button.mm | 353 ++-- .../wxWidgets3/src/osx/cocoa/checkbox.mm | 1 - Externals/wxWidgets3/src/osx/cocoa/choice.mm | 1 - Externals/wxWidgets3/src/osx/cocoa/colour.mm | 3 +- .../wxWidgets3/src/osx/cocoa/combobox.mm | 82 +- .../wxWidgets3/src/osx/cocoa/dataview.mm | 94 +- .../wxWidgets3/src/osx/cocoa/datetimectrl.mm | 10 +- Externals/wxWidgets3/src/osx/cocoa/dialog.mm | 1 - Externals/wxWidgets3/src/osx/cocoa/dirdlg.mm | 66 +- Externals/wxWidgets3/src/osx/cocoa/dnd.mm | 1 - Externals/wxWidgets3/src/osx/cocoa/evtloop.mm | 123 +- Externals/wxWidgets3/src/osx/cocoa/filedlg.mm | 84 +- Externals/wxWidgets3/src/osx/cocoa/gauge.mm | 1 - .../wxWidgets3/src/osx/cocoa/glcanvas.mm | 3 +- Externals/wxWidgets3/src/osx/cocoa/listbox.mm | 63 +- .../wxWidgets3/src/osx/cocoa/mediactrl.mm | 65 +- Externals/wxWidgets3/src/osx/cocoa/menu.mm | 8 +- .../wxWidgets3/src/osx/cocoa/menuitem.mm | 5 +- Externals/wxWidgets3/src/osx/cocoa/msgdlg.mm | 7 +- .../wxWidgets3/src/osx/cocoa/nonownedwnd.mm | 93 +- .../wxWidgets3/src/osx/cocoa/notebook.mm | 105 +- Externals/wxWidgets3/src/osx/cocoa/overlay.mm | 1 - .../wxWidgets3/src/osx/cocoa/preferences.mm | 261 +++ .../wxWidgets3/src/osx/cocoa/printdlg.mm | 11 +- .../wxWidgets3/src/osx/cocoa/radiobut.mm | 90 +- .../wxWidgets3/src/osx/cocoa/scrolbar.mm | 1 - Externals/wxWidgets3/src/osx/cocoa/slider.mm | 1 - .../wxWidgets3/src/osx/cocoa/spinbutt.mm | 1 - .../wxWidgets3/src/osx/cocoa/srchctrl.mm | 1 - Externals/wxWidgets3/src/osx/cocoa/statbox.mm | 3 +- .../wxWidgets3/src/osx/cocoa/statline.mm | 1 - .../wxWidgets3/src/osx/cocoa/stattext.mm | 3 +- Externals/wxWidgets3/src/osx/cocoa/taskbar.mm | 10 +- .../wxWidgets3/src/osx/cocoa/textctrl.mm | 180 +- Externals/wxWidgets3/src/osx/cocoa/tglbtn.mm | 23 +- Externals/wxWidgets3/src/osx/cocoa/toolbar.mm | 101 +- Externals/wxWidgets3/src/osx/cocoa/tooltip.mm | 1 - Externals/wxWidgets3/src/osx/cocoa/utils.mm | 104 +- Externals/wxWidgets3/src/osx/cocoa/window.mm | 565 +++-- Externals/wxWidgets3/src/osx/combobox_osx.cpp | 20 +- Externals/wxWidgets3/src/osx/core/bitmap.cpp | 390 +++- .../wxWidgets3/src/osx/core/cfstring.cpp | 20 +- Externals/wxWidgets3/src/osx/core/colour.cpp | 14 +- .../wxWidgets3/src/osx/core/dcmemory.cpp | 10 +- Externals/wxWidgets3/src/osx/core/display.cpp | 1 - .../wxWidgets3/src/osx/core/evtloop_cf.cpp | 173 +- .../wxWidgets3/src/osx/core/fontenum.cpp | 131 +- Externals/wxWidgets3/src/osx/core/glgrab.cpp | 3 +- Externals/wxWidgets3/src/osx/core/hid.cpp | 78 +- .../wxWidgets3/src/osx/core/hidjoystick.cpp | 5 +- .../wxWidgets3/src/osx/core/mimetype.cpp | 3 +- .../wxWidgets3/src/osx/core/printmac.cpp | 1 - Externals/wxWidgets3/src/osx/core/sockosx.cpp | 1 - Externals/wxWidgets3/src/osx/core/sound.cpp | 3 +- .../wxWidgets3/src/osx/core/stdpaths_cf.cpp | 3 +- .../wxWidgets3/src/osx/core/strconv_cf.cpp | 1 - Externals/wxWidgets3/src/osx/core/timer.cpp | 1 - .../wxWidgets3/src/osx/core/utilsexc_base.cpp | 7 - .../wxWidgets3/src/osx/core/utilsexc_cf.cpp | 200 +- Externals/wxWidgets3/src/osx/dataview_osx.cpp | 24 +- Externals/wxWidgets3/src/osx/datectrl_osx.cpp | 1 - .../wxWidgets3/src/osx/datetimectrl_osx.cpp | 16 +- Externals/wxWidgets3/src/osx/dialog_osx.cpp | 12 +- Externals/wxWidgets3/src/osx/dnd_osx.cpp | 1 - Externals/wxWidgets3/src/osx/fontutil.cpp | 1 - Externals/wxWidgets3/src/osx/gauge_osx.cpp | 1 - Externals/wxWidgets3/src/osx/glcanvas_osx.cpp | 1 - Externals/wxWidgets3/src/osx/imaglist.cpp | 1 - .../wxWidgets3/src/osx/iphone/anybutton.mm | 1 - Externals/wxWidgets3/src/osx/iphone/button.mm | 1 - .../wxWidgets3/src/osx/iphone/checkbox.mm | 1 - Externals/wxWidgets3/src/osx/iphone/dialog.mm | 1 - .../wxWidgets3/src/osx/iphone/evtloop.mm | 13 +- Externals/wxWidgets3/src/osx/iphone/gauge.mm | 1 - .../wxWidgets3/src/osx/iphone/glcanvas.mm | 9 +- Externals/wxWidgets3/src/osx/iphone/msgdlg.mm | 4 +- .../wxWidgets3/src/osx/iphone/nonownedwnd.mm | 27 +- .../wxWidgets3/src/osx/iphone/scrolbar.mm | 1 - Externals/wxWidgets3/src/osx/iphone/slider.mm | 1 - .../wxWidgets3/src/osx/iphone/stattext.mm | 1 - .../wxWidgets3/src/osx/iphone/textctrl.mm | 6 +- .../wxWidgets3/src/osx/iphone/toolbar.mm | 2 +- Externals/wxWidgets3/src/osx/iphone/utils.mm | 34 +- Externals/wxWidgets3/src/osx/iphone/window.mm | 19 +- Externals/wxWidgets3/src/osx/listbox_osx.cpp | 10 +- Externals/wxWidgets3/src/osx/menu_osx.cpp | 257 ++- Externals/wxWidgets3/src/osx/menuitem_osx.cpp | 26 +- Externals/wxWidgets3/src/osx/minifram.cpp | 1 - .../wxWidgets3/src/osx/nonownedwnd_osx.cpp | 24 +- Externals/wxWidgets3/src/osx/notebook_osx.cpp | 86 +- Externals/wxWidgets3/src/osx/palette.cpp | 1 - Externals/wxWidgets3/src/osx/pen.cpp | 1 - Externals/wxWidgets3/src/osx/printdlg_osx.cpp | 1 - Externals/wxWidgets3/src/osx/radiobox_osx.cpp | 5 +- Externals/wxWidgets3/src/osx/radiobut_osx.cpp | 3 +- Externals/wxWidgets3/src/osx/scrolbar_osx.cpp | 1 - Externals/wxWidgets3/src/osx/slider_osx.cpp | 10 +- Externals/wxWidgets3/src/osx/sound_osx.cpp | 1 - Externals/wxWidgets3/src/osx/spinbutt_osx.cpp | 1 - Externals/wxWidgets3/src/osx/srchctrl_osx.cpp | 5 +- Externals/wxWidgets3/src/osx/statbox_osx.cpp | 28 +- Externals/wxWidgets3/src/osx/statline_osx.cpp | 1 - Externals/wxWidgets3/src/osx/stattext_osx.cpp | 9 +- Externals/wxWidgets3/src/osx/textctrl_osx.cpp | 13 +- .../wxWidgets3/src/osx/textentry_osx.cpp | 18 +- Externals/wxWidgets3/src/osx/tglbtn_osx.cpp | 5 +- Externals/wxWidgets3/src/osx/timectrl_osx.cpp | 1 - Externals/wxWidgets3/src/osx/toolbar_osx.cpp | 1 - Externals/wxWidgets3/src/osx/toplevel_osx.cpp | 12 +- Externals/wxWidgets3/src/osx/uiaction_osx.cpp | 137 +- Externals/wxWidgets3/src/osx/utils_osx.cpp | 35 +- .../wxWidgets3/src/osx/webview_webkit.mm | 182 +- Externals/wxWidgets3/src/osx/window_osx.cpp | 161 +- Externals/wxWidgets3/src/unix/apptraits.cpp | 46 +- Externals/wxWidgets3/src/unix/appunix.cpp | 96 +- Externals/wxWidgets3/src/unix/descrip.mms | 7 +- Externals/wxWidgets3/src/unix/dialup.cpp | 2 - Externals/wxWidgets3/src/unix/dir.cpp | 32 +- Externals/wxWidgets3/src/unix/displayx11.cpp | 60 +- Externals/wxWidgets3/src/unix/dlunix.cpp | 10 - .../wxWidgets3/src/unix/epolldispatcher.cpp | 1 - Externals/wxWidgets3/src/unix/evtloopunix.cpp | 222 +- Externals/wxWidgets3/src/unix/fdiounix.cpp | 1 - Externals/wxWidgets3/src/unix/fontenum.cpp | 1 - Externals/wxWidgets3/src/unix/fontutil.cpp | 91 +- .../wxWidgets3/src/unix/fswatcher_inotify.cpp | 318 ++- .../wxWidgets3/src/unix/fswatcher_kqueue.cpp | 4 +- Externals/wxWidgets3/src/unix/glx11.cpp | 1 - Externals/wxWidgets3/src/unix/joystick.cpp | 10 +- Externals/wxWidgets3/src/unix/mediactrl.cpp | 149 +- Externals/wxWidgets3/src/unix/mimetype.cpp | 1 - Externals/wxWidgets3/src/unix/net.cpp | 1 - Externals/wxWidgets3/src/unix/snglinst.cpp | 1 - Externals/wxWidgets3/src/unix/sockunix.cpp | 1 - Externals/wxWidgets3/src/unix/sound.cpp | 1 - Externals/wxWidgets3/src/unix/sound_sdl.cpp | 5 +- Externals/wxWidgets3/src/unix/stackwalk.cpp | 145 +- Externals/wxWidgets3/src/unix/stdpaths.cpp | 3 +- Externals/wxWidgets3/src/unix/taskbarx11.cpp | 1 - Externals/wxWidgets3/src/unix/threadpsx.cpp | 322 +-- Externals/wxWidgets3/src/unix/timerunx.cpp | 1 - Externals/wxWidgets3/src/unix/uiactionx11.cpp | 12 +- Externals/wxWidgets3/src/unix/utilsunx.cpp | 663 +++--- Externals/wxWidgets3/src/unix/utilsx11.cpp | 8 +- Externals/wxWidgets3/src/unix/wakeuppipe.cpp | 128 ++ Externals/wxWidgets3/wx/wxcocoa.h | 3 + Externals/wxWidgets3/wx/wxgtk.h | 3 + Externals/wxWidgets3/wx/wxmsw.h | 3 + 1935 files changed, 45373 insertions(+), 22739 deletions(-) create mode 100644 Externals/wxWidgets3/include/msvc/wx/setup.h create mode 100644 Externals/wxWidgets3/include/wx/aui/tabart.h create mode 100644 Externals/wxWidgets3/include/wx/aui/tabartgtk.h create mode 100644 Externals/wxWidgets3/include/wx/compiler.h create mode 100644 Externals/wxWidgets3/include/wx/generic/private/textmeasure.h create mode 100644 Externals/wxWidgets3/include/wx/gtk/notifmsg.h create mode 100644 Externals/wxWidgets3/include/wx/gtk/private/dialogcount.h create mode 100644 Externals/wxWidgets3/include/wx/gtk/private/error.h create mode 100644 Externals/wxWidgets3/include/wx/gtk/private/textmeasure.h create mode 100644 Externals/wxWidgets3/include/wx/gtk/private/treeentry_gtk.h create mode 100644 Externals/wxWidgets3/include/wx/gtk/setup0.h create mode 100644 Externals/wxWidgets3/include/wx/meta/removeref.h create mode 100644 Externals/wxWidgets3/include/wx/modalhook.h create mode 100644 Externals/wxWidgets3/include/wx/msw/evtloopconsole.h create mode 100644 Externals/wxWidgets3/include/wx/msw/init.h create mode 100644 Externals/wxWidgets3/include/wx/msw/ole/safearray.h create mode 100644 Externals/wxWidgets3/include/wx/msw/private/comptr.h create mode 100644 Externals/wxWidgets3/include/wx/msw/private/pipestream.h create mode 100644 Externals/wxWidgets3/include/wx/msw/private/textmeasure.h create mode 100644 Externals/wxWidgets3/include/wx/msw/webview_missing.h create mode 100644 Externals/wxWidgets3/include/wx/osx/core/evtloop.h create mode 100644 Externals/wxWidgets3/include/wx/osx/core/objcid.h create mode 100644 Externals/wxWidgets3/include/wx/preferences.h create mode 100644 Externals/wxWidgets3/include/wx/private/eventloopsourcesmanager.h create mode 100644 Externals/wxWidgets3/include/wx/private/fdioeventloopsourcehandler.h create mode 100644 Externals/wxWidgets3/include/wx/private/pipestream.h create mode 100644 Externals/wxWidgets3/include/wx/private/preferences.h create mode 100644 Externals/wxWidgets3/include/wx/private/streamtempinput.h create mode 100644 Externals/wxWidgets3/include/wx/private/textmeasure.h create mode 100644 Externals/wxWidgets3/include/wx/simplebook.h create mode 100644 Externals/wxWidgets3/include/wx/testing.h create mode 100644 Externals/wxWidgets3/include/wx/unix/private/executeiohandler.h create mode 100644 Externals/wxWidgets3/include/wx/unix/private/pipestream.h create mode 100644 Externals/wxWidgets3/include/wx/unix/private/wakeuppipe.h create mode 100644 Externals/wxWidgets3/include/wx/webviewfshandler.h create mode 100644 Externals/wxWidgets3/include/wx/windowptr.h create mode 100644 Externals/wxWidgets3/include/wx/x11/private/wrapxkb.h mode change 100755 => 100644 Externals/wxWidgets3/src/aui/descrip.mms create mode 100644 Externals/wxWidgets3/src/aui/tabart.cpp create mode 100644 Externals/wxWidgets3/src/aui/tabartgtk.cpp create mode 100644 Externals/wxWidgets3/src/common/modalhook.cpp create mode 100644 Externals/wxWidgets3/src/common/preferencescmn.cpp create mode 100644 Externals/wxWidgets3/src/common/textmeasurecmn.cpp create mode 100644 Externals/wxWidgets3/src/common/threadinfo.cpp create mode 100644 Externals/wxWidgets3/src/common/webviewfshandler.cpp create mode 100755 Externals/wxWidgets3/src/cwcopysetup.bat create mode 100755 Externals/wxWidgets3/src/cwdcopysetup.bat create mode 100644 Externals/wxWidgets3/src/generic/preferencesg.cpp create mode 100644 Externals/wxWidgets3/src/generic/textmeasure.cpp create mode 100644 Externals/wxWidgets3/src/gtk/notifmsg.cpp create mode 100644 Externals/wxWidgets3/src/gtk/textmeasure.cpp create mode 100644 Externals/wxWidgets3/src/msw/evtloopconsole.cpp create mode 100644 Externals/wxWidgets3/src/msw/ole/safearray.cpp create mode 100644 Externals/wxWidgets3/src/msw/textmeasure.cpp create mode 100644 Externals/wxWidgets3/src/msw/utilswin.cpp create mode 100644 Externals/wxWidgets3/src/osx/cocoa/preferences.mm create mode 100644 Externals/wxWidgets3/src/unix/wakeuppipe.cpp diff --git a/Externals/wxWidgets3/CMakeLists.txt b/Externals/wxWidgets3/CMakeLists.txt index 5b9891bb11..1ce7a73418 100644 --- a/Externals/wxWidgets3/CMakeLists.txt +++ b/Externals/wxWidgets3/CMakeLists.txt @@ -1,4 +1,4 @@ -# gtk, msw, osx and shared files as of r70933 +# gtk, msw, osx and shared files as of r74856 set(SRCS_AUI "src/aui/auibar.cpp" @@ -6,6 +6,7 @@ set(SRCS_AUI "src/aui/dockart.cpp" "src/aui/floatpane.cpp" "src/aui/framemanager.cpp" + "src/aui/tabart.cpp" "src/aui/tabmdi.cpp") set(SRCS_COMMON @@ -151,6 +152,7 @@ set(SRCS_COMMON #"src/common/memory.cpp" "src/common/menucmn.cpp" "src/common/mimecmn.cpp" + "src/common/modalhook.cpp" "src/common/module.cpp" "src/common/mousemanager.cpp" "src/common/msgout.cpp" @@ -168,6 +170,7 @@ set(SRCS_COMMON "src/common/platinfo.cpp" "src/common/popupcmn.cpp" "src/common/powercmn.cpp" + "src/common/preferencescmn.cpp" "src/common/prntbase.cpp" "src/common/process.cpp" "src/common/protocol.cpp" @@ -216,6 +219,8 @@ set(SRCS_COMMON "src/common/textcmn.cpp" "src/common/textentrycmn.cpp" "src/common/textfile.cpp" + "src/common/textmeasurecmn.cpp" + "src/common/threadinfo.cpp" "src/common/time.cpp" "src/common/timercmn.cpp" "src/common/timerimpl.cpp" @@ -236,6 +241,7 @@ set(SRCS_COMMON "src/common/valtext.cpp" "src/common/variant.cpp" #"src/common/webview.cpp" + #"src/common/webviewfshandler.cpp" "src/common/wfstream.cpp" "src/common/wincmn.cpp" "src/common/windowid.cpp" @@ -317,6 +323,7 @@ set(SRCS_GENERIC "src/generic/statusbr.cpp" "src/generic/tabg.cpp" "src/generic/textdlgg.cpp" + "src/generic/textmeasure.cpp" "src/generic/timectrlg.cpp" #"src/generic/timer.cpp" "src/generic/tipdlg.cpp" @@ -333,7 +340,8 @@ set(SRCS_GENERICGTK "src/generic/accel.cpp" "src/generic/icon.cpp" "src/generic/imaglist.cpp" - "src/generic/paletteg.cpp") + "src/generic/paletteg.cpp" + "src/generic/preferencesg.cpp") set(SRCS_GENERICOSX "src/generic/animateg.cpp" @@ -345,6 +353,7 @@ set(SRCS_GENERICOSX "src/generic/fontpickerg.cpp") set(SRCS_GTK + "src/aui/tabartgtk.cpp" "src/gtk/aboutdlg.cpp" "src/gtk/animate.cpp" "src/gtk/anybutton.cpp" @@ -403,6 +412,7 @@ set(SRCS_GTK "src/gtk/nativewin.cpp" "src/gtk/nonownedwnd.cpp" "src/gtk/notebook.cpp" + "src/gtk/notifmsg.cpp" "src/gtk/pen.cpp" "src/gtk/popupwin.cpp" #"src/gtk/print.cpp" @@ -425,6 +435,7 @@ set(SRCS_GTK "src/gtk/taskbar.cpp" "src/gtk/textctrl.cpp" "src/gtk/textentry.cpp" + "src/gtk/textmeasure.cpp" "src/gtk/tglbtn.cpp" "src/gtk/timer.cpp" "src/gtk/toolbar.cpp" @@ -483,6 +494,7 @@ set(SRCS_MSW "src/msw/dragimag.cpp" "src/msw/enhmeta.cpp" "src/msw/evtloop.cpp" + #"src/msw/evtloopconsole.cpp" "src/msw/fdrepdlg.cpp" "src/msw/filedlg.cpp" "src/msw/font.cpp" @@ -533,6 +545,7 @@ set(SRCS_MSW "src/msw/ole/dropsrc.cpp" "src/msw/ole/droptgt.cpp" "src/msw/ole/oleutils.cpp" + "src/msw/ole/safearray.cpp" "src/msw/ole/uuid.cpp" "src/msw/ownerdrw.cpp" "src/msw/palette.cpp" @@ -559,7 +572,7 @@ set(SRCS_MSW "src/msw/sound.cpp" "src/msw/spinbutt.cpp" "src/msw/spinctrl.cpp" - #"src/msw/stackwalk.cpp" + "src/msw/stackwalk.cpp" "src/msw/statbmp.cpp" "src/msw/statbox.cpp" "src/msw/statline.cpp" @@ -569,6 +582,7 @@ set(SRCS_MSW "src/msw/taskbar.cpp" "src/msw/textctrl.cpp" "src/msw/textentry.cpp" + "src/msw/textmeasure.cpp" "src/msw/tglbtn.cpp" "src/msw/thread.cpp" "src/msw/timectrl.cpp" @@ -582,6 +596,7 @@ set(SRCS_MSW "src/msw/utils.cpp" "src/msw/utilsexc.cpp" "src/msw/utilsgui.cpp" + "src/msw/utilswin.cpp" "src/msw/uxtheme.cpp" "src/msw/version.rc" "src/msw/volume.cpp" @@ -635,7 +650,6 @@ set(SRCS_OSX "src/osx/slider_osx.cpp" "src/osx/sound_osx.cpp" "src/osx/spinbutt_osx.cpp" - "src/osx/spinctrl_osx.cpp" "src/osx/srchctrl_osx.cpp" "src/osx/statbox_osx.cpp" "src/osx/statline_osx.cpp" @@ -816,11 +830,12 @@ set(SRCS_UNIX #"src/unix/net.cpp" "src/unix/snglinst.cpp" "src/unix/sockunix.cpp" - #"src/unix/stackwalk.cpp" + "src/unix/stackwalk.cpp" "src/unix/stdpaths.cpp" "src/unix/threadpsx.cpp" "src/unix/timerunx.cpp" - "src/unix/utilsunx.cpp") + "src/unix/utilsunx.cpp" + "src/unix/wakeuppipe.cpp") set(SRCS_UNIXGTK "src/unix/dialup.cpp" @@ -890,6 +905,10 @@ endif() add_definitions(-DWXBUILDING) add_definitions(-Wno-deprecated-declarations) add_definitions(-Wno-shadow) +add_definitions(-Wno-parentheses-equality) +add_definitions(-Wno-self-assign) +add_definitions(-Wno-null-conversion) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++98") enable_precompiled_headers(include/wx/wxprec.h src/common/dummy.cpp SRCS) add_library(wx STATIC ${PNG_SRCS} ${SRCS}) diff --git a/Externals/wxWidgets3/art/addbookm.xpm b/Externals/wxWidgets3/art/addbookm.xpm index 0b4f695c2c..fb13ff161d 100644 --- a/Externals/wxWidgets3/art/addbookm.xpm +++ b/Externals/wxWidgets3/art/addbookm.xpm @@ -1,24 +1,24 @@ -/* XPM */ -static const char *const addbookm_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -". c Black", -"X c #00C000", -" c None", -/* pixels */ -" ....... ", -" .XXXXX. ", -" .. .XXXXX. ", -" .. .XXXXX. ", -" ...... .XXXXX. ", -" ...... .XXXXX. ", -" .. .XXXXX. ", -" .. .XXXXX. ", -" .XXXXX. ", -" .XXXXX. ", -" .XXXXX. ", -" .XXXXX. ", -" .XX.XX. ", -" .X. .X. ", -" .. .. " -}; +/* XPM */ +static const char *const addbookm_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +". c Black", +"X c #00C000", +" c None", +/* pixels */ +" ....... ", +" .XXXXX. ", +" .. .XXXXX. ", +" .. .XXXXX. ", +" ...... .XXXXX. ", +" ...... .XXXXX. ", +" .. .XXXXX. ", +" .. .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XXXXX. ", +" .XX.XX. ", +" .X. .X. ", +" .. .. " +}; diff --git a/Externals/wxWidgets3/art/back.xpm b/Externals/wxWidgets3/art/back.xpm index d5c1de519d..38b0f4b7dd 100644 --- a/Externals/wxWidgets3/art/back.xpm +++ b/Externals/wxWidgets3/art/back.xpm @@ -1,21 +1,21 @@ -/* XPM */ -static const char *const back_xpm[] = { -"16 15 3 1", -" c None", -". c Black", -"X c Gray100", -" ", -" ", -" . ", -" .. ", -" .X. ", -" .XX........ ", -" .XXXXXXXXXX. ", -" .XXXXXXXXXXX. ", -" .XXXXXXXXXXX. ", -" .XXXXXXXXXX. ", -" .XX........ ", -" .X. ", -" .. ", -" . ", -" "}; +/* XPM */ +static const char *const back_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ", +" . ", +" .. ", +" .X. ", +" .XX........ ", +" .XXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXX. ", +" .XX........ ", +" .X. ", +" .. ", +" . ", +" "}; diff --git a/Externals/wxWidgets3/art/cdrom.xpm b/Externals/wxWidgets3/art/cdrom.xpm index e3bc19b96b..fecc52ec74 100644 --- a/Externals/wxWidgets3/art/cdrom.xpm +++ b/Externals/wxWidgets3/art/cdrom.xpm @@ -1,57 +1,57 @@ -/* XPM */ -static const char *const cdrom_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 36 1", -"= c #9BACC2", -"y c #547B99", -"$ c #FFFFFF", -"@ c #839CB5", -"o c #547897", -"4 c #4D7492", -"% c #F1F4F7", -"X c #5A809C", -"< c #8497A5", -"0 c #7898AD", -"+ c #CAD2DC", -"r c #ACAEB2", -"2 c #BECAD9", -"* c #65839D", -"e c #DCE2EA", -"- c #ADBED2", -"t c #597B9A", -" c None", -"1 c #467291", -"9 c #D6DFE7", -"O c #7393AB", -"u c #49708B", -"5 c #A0BACB", -"& c #AABFCD", -"8 c #B9CBD5", -"; c #B4C4D3", -": c #6F90A6", -"3 c #A8B6CA", -"# c #ADBACE", -"w c #E4E9ED", -". c #8EA9BC", -"> c #B3BFD1", -", c #C2CBDB", -"6 c #C0D1DC", -"7 c #A2B3C5", -"q c #5D7C93", -/* pixels */ -" .XooOo+ ", -" X@#$$$%o& ", -" *=-;$$$$$o+ ", -" +O#;-$$$$$$: ", -" o=>,-<1<$2-o ", -" o3>--1$122-* ", -" o=--$<4<22-X ", -" o5$$$$$26;7* ", -" X%$$$$2;-X8 ", -" 90*9$$$-7Xqo ", -" wXwe@O44X422222<<*4", -" ttyyyoo4441uuuo", -" t>$$$$$$$$$$$>o", -" XXXtyyyoo44411u" -}; +/* XPM */ +static const char *const cdrom_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 36 1", +"= c #9BACC2", +"y c #547B99", +"$ c #FFFFFF", +"@ c #839CB5", +"o c #547897", +"4 c #4D7492", +"% c #F1F4F7", +"X c #5A809C", +"< c #8497A5", +"0 c #7898AD", +"+ c #CAD2DC", +"r c #ACAEB2", +"2 c #BECAD9", +"* c #65839D", +"e c #DCE2EA", +"- c #ADBED2", +"t c #597B9A", +" c None", +"1 c #467291", +"9 c #D6DFE7", +"O c #7393AB", +"u c #49708B", +"5 c #A0BACB", +"& c #AABFCD", +"8 c #B9CBD5", +"; c #B4C4D3", +": c #6F90A6", +"3 c #A8B6CA", +"# c #ADBACE", +"w c #E4E9ED", +". c #8EA9BC", +"> c #B3BFD1", +", c #C2CBDB", +"6 c #C0D1DC", +"7 c #A2B3C5", +"q c #5D7C93", +/* pixels */ +" .XooOo+ ", +" X@#$$$%o& ", +" *=-;$$$$$o+ ", +" +O#;-$$$$$$: ", +" o=>,-<1<$2-o ", +" o3>--1$122-* ", +" o=--$<4<22-X ", +" o5$$$$$26;7* ", +" X%$$$$2;-X8 ", +" 90*9$$$-7Xqo ", +" wXwe@O44X422222<<*4", +" ttyyyoo4441uuuo", +" t>$$$$$$$$$$$>o", +" XXXtyyyoo44411u" +}; diff --git a/Externals/wxWidgets3/art/copy.xpm b/Externals/wxWidgets3/art/copy.xpm index f393cd23e6..9143caa9b2 100644 --- a/Externals/wxWidgets3/art/copy.xpm +++ b/Externals/wxWidgets3/art/copy.xpm @@ -1,44 +1,44 @@ -/* XPM */ -static const char *const copy_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 23 1", -"o c #97C4E7", -"* c #FFFFFF", -"@ c #60A9DA", -"= c #D1E5F5", -"& c #C3DDF1", -". c #7EA6C0", -" c None", -"X c #2F93CD", -"O c #85BBE2", -", c #EFF6FC", -"; c #DEEDF8", -"+ c #72B2DD", -"3 c #F7FBFD", -"4 c #FAFCFE", -": c #DAEAF7", -"< c #E9F3FA", -"1 c #E2EFF8", -"- c #FDFDFE", -"% c #B6D5EE", -"$ c #A5CCEA", -"> c #E5F0F9", -"# c #AFD1EC", -"2 c #F4F9FD", -/* pixels */ -" .....XX ", -" .oO+@X#X ", -" .$oO+X##X ", -" .%$o........ ", -" .&%$.*=&#o.-. ", -" .=&%.*;=&#.--. ", -" .:=&.*>;=&.... ", -" .>:=.*,>;=&#o. ", -" .<1:.*2,>:=&#. ", -" .2<1.*32,>:=&. ", -" .32<.*432,>:=. ", -" .32<.*-432,>:. ", -" .....**-432,>. ", -" .***-432,. ", -" .......... " -}; +/* XPM */ +static const char *const copy_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 23 1", +"o c #97C4E7", +"* c #FFFFFF", +"@ c #60A9DA", +"= c #D1E5F5", +"& c #C3DDF1", +". c #7EA6C0", +" c None", +"X c #2F93CD", +"O c #85BBE2", +", c #EFF6FC", +"; c #DEEDF8", +"+ c #72B2DD", +"3 c #F7FBFD", +"4 c #FAFCFE", +": c #DAEAF7", +"< c #E9F3FA", +"1 c #E2EFF8", +"- c #FDFDFE", +"% c #B6D5EE", +"$ c #A5CCEA", +"> c #E5F0F9", +"# c #AFD1EC", +"2 c #F4F9FD", +/* pixels */ +" .....XX ", +" .oO+@X#X ", +" .$oO+X##X ", +" .%$o........ ", +" .&%$.*=&#o.-. ", +" .=&%.*;=&#.--. ", +" .:=&.*>;=&.... ", +" .>:=.*,>;=&#o. ", +" .<1:.*2,>:=&#. ", +" .2<1.*32,>:=&. ", +" .32<.*432,>:=. ", +" .32<.*-432,>:. ", +" .....**-432,>. ", +" .***-432,. ", +" .......... " +}; diff --git a/Externals/wxWidgets3/art/cross.xpm b/Externals/wxWidgets3/art/cross.xpm index 407fa9bfa1..20ab3f3466 100644 --- a/Externals/wxWidgets3/art/cross.xpm +++ b/Externals/wxWidgets3/art/cross.xpm @@ -1,17 +1,17 @@ -/* XPM */ -static const char *const cross_xpm[] = { -/* columns rows colors chars-per-pixel */ -"10 10 2 1", -" c Gray0", -"# c None", -/* pixels */ -" ######## ", -" #### ", -"# ## #", -"## ##", -"### ###", -"### ###", -"## ##", -"# ## #", -" #### ", -" ###### "}; +/* XPM */ +static const char *const cross_xpm[] = { +/* columns rows colors chars-per-pixel */ +"10 10 2 1", +" c Gray0", +"# c None", +/* pixels */ +" ######## ", +" #### ", +"# ## #", +"## ##", +"### ###", +"### ###", +"## ##", +"# ## #", +" #### ", +" ###### "}; diff --git a/Externals/wxWidgets3/art/cut.xpm b/Externals/wxWidgets3/art/cut.xpm index e638157f59..eacd7f94b3 100644 --- a/Externals/wxWidgets3/art/cut.xpm +++ b/Externals/wxWidgets3/art/cut.xpm @@ -1,46 +1,46 @@ -/* XPM */ -static const char *const cut_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 25 1", -"6 c #D8BDC0", -": c #C3C3C4", -"- c #FFFFFF", -". c #6C6D70", -"2 c #AD3A45", -"o c #DBDBDB", -"# c #939495", -"< c #E42234", -"& c #C3C5C8", -"; c #C6CCD3", -"% c #B7B7B8", -" c None", -"* c #DFE0E2", -"5 c #B69596", -"3 c #9C2A35", -"1 c #CFCFD0", -", c #AB5C64", -"+ c #D2D3D4", -"$ c #BCBDBE", -"@ c #C6C8CA", -"> c #CDC0C1", -"O c #826F72", -"X c #979BA0", -"4 c #9B8687", -"= c #9FA0A0", -/* pixels */ -" .X .o ", -" O.+ @. ", -" O. .. ", -" O#$ %.& ", -" O.*.. ", -" #%#.. ", -" O=-.. ", -" #%#;. ", -" OO:=O ", -" >,,<, ,<,,1 ", -" ><23<1 1<32<1 ", -" ,2 4< <5 2, ", -" <, ,2 2, ,< ", -" 23,<5 5<,32 ", -" 6225 522> " -}; +/* XPM */ +static const char *const cut_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 25 1", +"6 c #D8BDC0", +": c #C3C3C4", +"- c #FFFFFF", +". c #6C6D70", +"2 c #AD3A45", +"o c #DBDBDB", +"# c #939495", +"< c #E42234", +"& c #C3C5C8", +"; c #C6CCD3", +"% c #B7B7B8", +" c None", +"* c #DFE0E2", +"5 c #B69596", +"3 c #9C2A35", +"1 c #CFCFD0", +", c #AB5C64", +"+ c #D2D3D4", +"$ c #BCBDBE", +"@ c #C6C8CA", +"> c #CDC0C1", +"O c #826F72", +"X c #979BA0", +"4 c #9B8687", +"= c #9FA0A0", +/* pixels */ +" .X .o ", +" O.+ @. ", +" O. .. ", +" O#$ %.& ", +" O.*.. ", +" #%#.. ", +" O=-.. ", +" #%#;. ", +" OO:=O ", +" >,,<, ,<,,1 ", +" ><23<1 1<32<1 ", +" ,2 4< <5 2, ", +" <, ,2 2, ,< ", +" 23,<5 5<,32 ", +" 6225 522> " +}; diff --git a/Externals/wxWidgets3/art/deffile.xpm b/Externals/wxWidgets3/art/deffile.xpm index d7546a53f4..182fbe4180 100644 --- a/Externals/wxWidgets3/art/deffile.xpm +++ b/Externals/wxWidgets3/art/deffile.xpm @@ -1,54 +1,54 @@ -/* XPM */ -static const char *const deffile_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 16 32 1", -"= c #97C4E7", -": c #72A8D2", -"1 c #FFFFFF", -"w c #839CB5", -"X c #6B98B8", -". c #5A89A6", -"@ c #3A749C", -", c #D1E5F5", -"< c #67A1CF", -"> c #F1F4F7", -"e c #85A7BC", -"% c #C3DDF1", -"0 c #749BB4", -"2 c #7EA6C0", -"; c #5F9BC8", -" c None", -"O c #538DB3", -"- c #85BBE2", -"$ c #D6DFE7", -"9 c #EFF6FC", -"o c #6591AE", -"4 c #F7FBFD", -"8 c #FAFCFE", -"6 c #DAEAF7", -"7 c #E9F3FA", -"q c #FDFDFE", -"3 c #E2EFF8", -"# c #8EA9BC", -"& c #B6D5EE", -"* c #A5CCEA", -"5 c #F4F9FD", -"+ c #4581AA", -/* pixels */ -" ..XooO+@#$ ", -" .%%&*=-;:;> ", -" .,,%&*=<1=X> ", -" #%%%%&*211=X ", -" #3----- c #F1F4F7", +"e c #85A7BC", +"% c #C3DDF1", +"0 c #749BB4", +"2 c #7EA6C0", +"; c #5F9BC8", +" c None", +"O c #538DB3", +"- c #85BBE2", +"$ c #D6DFE7", +"9 c #EFF6FC", +"o c #6591AE", +"4 c #F7FBFD", +"8 c #FAFCFE", +"6 c #DAEAF7", +"7 c #E9F3FA", +"q c #FDFDFE", +"3 c #E2EFF8", +"# c #8EA9BC", +"& c #B6D5EE", +"* c #A5CCEA", +"5 c #F4F9FD", +"+ c #4581AA", +/* pixels */ +" ..XooO+@#$ ", +" .%%&*=-;:;> ", +" .,,%&*=<1=X> ", +" #%%%%&*211=X ", +" #3----- c #5A7BB4", -"% c #5F7FB5", -/* pixels */ -" ", -" .Xo OO ", -" +@#. $@% ", -" &@@X .*@*o ", -" =@= .*@*. ", -" -@@X*@*. ", -" .#@@@$. ", -" ;@@: ", -" ;@@@+ ", -" .>@#%@@. ", -" o*@*oO@@, ", -" <#@*. .@@= ", -"&@@$ :@@1 ", -";#& 2#>. ", -" " -}; +/* XPM */ +static const char *const delete_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 21 1", +"2 c #A5AEBD", +"* c #5478B4", +"< c #95A3BB", +"O c #9AA7BC", +"; c #758EB7", +"$ c #6986B6", +"# c #4971B2", +"& c #8A9CBA", +"X c #8598B9", +" c None", +"o c #ABB2BE", +"- c #7F95B9", +"= c #4E74B3", +"1 c #A0ABBC", +"+ c #6F8AB7", +". c #B5B9BF", +"@ c #3E69B1", +", c #90A0BA", +": c #6483B5", +"> c #5A7BB4", +"% c #5F7FB5", +/* pixels */ +" ", +" .Xo OO ", +" +@#. $@% ", +" &@@X .*@*o ", +" =@= .*@*. ", +" -@@X*@*. ", +" .#@@@$. ", +" ;@@: ", +" ;@@@+ ", +" .>@#%@@. ", +" o*@*oO@@, ", +" <#@*. .@@= ", +"&@@$ :@@1 ", +";#& 2#>. ", +" " +}; diff --git a/Externals/wxWidgets3/art/dir_up.xpm b/Externals/wxWidgets3/art/dir_up.xpm index dd85ff25cd..f644d93e6d 100644 --- a/Externals/wxWidgets3/art/dir_up.xpm +++ b/Externals/wxWidgets3/art/dir_up.xpm @@ -1,52 +1,52 @@ -/* XPM */ -static const char *const dir_up_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 31 1", -"6 c #9BACC2", -"o c #9AEA53", -"7 c #94A5BD", -"8 c #547897", -"5 c #839CB5", -"@ c #376485", -"$ c #5A809C", -"# c #7F99B4", -": c #D1D9E5", -"< c #EAEDF3", -"& c #446A8C", -"q c #65839D", -"> c #DCE2EA", -", c #E1E6EE", -"2 c #F5F6F7", -"O c #8DA0B9", -" c None", -"% c #467291", -". c #305F81", -"X c #7393AB", -"+ c #6A89A2", -"4 c #A8B6CA", -"1 c #EEF1F3", -"3 c #F8F9FA", -"0 c #215579", -"9 c #7F97B0", -"* c #B3BFD1", -"w c #7A90AC", -"- c #C2CBDB", -"; c #CAD6E1", -"= c #BBC4D6", -/* pixels */ -" .. ", -" X.o. ", -".... X.ooo. ", -".OO+....ooooo. ", -".OOOOOO@@ooo.. ", -".OOOO#OO@ooo.$ ", -".OOOOOOO@ooo.$ ", -".O%............&", -".O&*=-;:>,<1231.", -".+.4*=-;:>,<12$.", -"..564*=-;:>,<1. ", -".@O764*=-;:>,<. ", -".89O764*=-;:>$$ ", -"0qw9O764*=-;:. ", -"0............. " -}; +/* XPM */ +static const char *const dir_up_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 31 1", +"6 c #9BACC2", +"o c #9AEA53", +"7 c #94A5BD", +"8 c #547897", +"5 c #839CB5", +"@ c #376485", +"$ c #5A809C", +"# c #7F99B4", +": c #D1D9E5", +"< c #EAEDF3", +"& c #446A8C", +"q c #65839D", +"> c #DCE2EA", +", c #E1E6EE", +"2 c #F5F6F7", +"O c #8DA0B9", +" c None", +"% c #467291", +". c #305F81", +"X c #7393AB", +"+ c #6A89A2", +"4 c #A8B6CA", +"1 c #EEF1F3", +"3 c #F8F9FA", +"0 c #215579", +"9 c #7F97B0", +"* c #B3BFD1", +"w c #7A90AC", +"- c #C2CBDB", +"; c #CAD6E1", +"= c #BBC4D6", +/* pixels */ +" .. ", +" X.o. ", +".... X.ooo. ", +".OO+....ooooo. ", +".OOOOOO@@ooo.. ", +".OOOO#OO@ooo.$ ", +".OOOOOOO@ooo.$ ", +".O%............&", +".O&*=-;:>,<1231.", +".+.4*=-;:>,<12$.", +"..564*=-;:>,<1. ", +".@O764*=-;:>,<. ", +".89O764*=-;:>$$ ", +"0qw9O764*=-;:. ", +"0............. " +}; diff --git a/Externals/wxWidgets3/art/down.xpm b/Externals/wxWidgets3/art/down.xpm index 5a0e4c98fb..88b0a9fdc9 100644 --- a/Externals/wxWidgets3/art/down.xpm +++ b/Externals/wxWidgets3/art/down.xpm @@ -1,21 +1,21 @@ -/* XPM */ -static const char *const down_xpm[] = { -"16 15 3 1", -" c None", -". c Black", -"X c Gray100", -" ", -" ...... ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" ....XXXX.... ", -" .XXXXXXXX. ", -" .XXXXXX. ", -" .XXXX. ", -" .XX. ", -" .. ", -" "}; +/* XPM */ +static const char *const down_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ...... ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" ....XXXX.... ", +" .XXXXXXXX. ", +" .XXXXXX. ", +" .XXXX. ", +" .XX. ", +" .. ", +" "}; diff --git a/Externals/wxWidgets3/art/exefile.xpm b/Externals/wxWidgets3/art/exefile.xpm index 54a5e49c33..f814a597e8 100644 --- a/Externals/wxWidgets3/art/exefile.xpm +++ b/Externals/wxWidgets3/art/exefile.xpm @@ -1,73 +1,73 @@ -/* XPM */ -static const char *const exefile_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 16 51 1", -"% c #E8E8EC", -"= c #E8E8ED", -"z c #CACAD4", -"8 c #D9D9E1", -"p c #D2D2DA", -"u c #E1E1E7", -"a c #D2D2DB", -"< c #E9E9ED", -"q c #DADAE1", -"+ c #F1F1F4", -"g c #D3D3DB", -"1 c #E2E2E8", -"x c #D3D3DC", -"5 c #00A5FF", -"$ c #EAEAEE", -"4 c #DBDBE2", -"h c #CCCCD6", -"y c #D4D4DC", -"r c #E3E3E9", -"d c #D4D4DD", -"7 c #DCDCE2", -": c #EBEBEF", -"0 c #DCDCE3", -" c None", -"O c #F3F3F5", -"> c #E4E4E9", -"& c #F3F3F6", -"j c #D5D5DD", -"6 c #E4E4EA", -". c #C6C6D5", -"# c #ECECF0", -"f c #CECED7", -"l c #CECED8", -"e c #D6D6DE", -"; c #EDEDF0", -"3 c #DEDEE4", -", c #EDEDF1", -"c c #CFCFD8", -"o c #F5F5F7", -"- c #E6E6EB", -"w c #D7D7DF", -"v c #C8C8D3", -"i c #DFDFE5", -"@ c #EEEEF2", -"s c #D0D0D9", -"X c #9494AD", -"9 c #D8D8DF", -"t c #D8D8E0", -"* c #EFEFF2", -"2 c #E0E0E6", -"k c #D1D1DA", -/* pixels */ -" ........X ", -" .oO+@#$%XX ", -" .&+*#$=-XXX ", -" .+*;:=->XXXX ", -" .*,:<->1234X ", -" .,5:5612378X ", -" 5,5559530qwX ", -" 55555550q9eX ", -" 5555r5555teyX ", -" 55rui559eypX ", -" 5555i5555yasX ", -" 5555555dasfX ", -" 5355595gsfhX ", -" .3595jgklhzX ", -" .0qwjxkchzvX ", -" XXXXXXXXXXXX " -}; +/* XPM */ +static const char *const exefile_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 16 51 1", +"% c #E8E8EC", +"= c #E8E8ED", +"z c #CACAD4", +"8 c #D9D9E1", +"p c #D2D2DA", +"u c #E1E1E7", +"a c #D2D2DB", +"< c #E9E9ED", +"q c #DADAE1", +"+ c #F1F1F4", +"g c #D3D3DB", +"1 c #E2E2E8", +"x c #D3D3DC", +"5 c #00A5FF", +"$ c #EAEAEE", +"4 c #DBDBE2", +"h c #CCCCD6", +"y c #D4D4DC", +"r c #E3E3E9", +"d c #D4D4DD", +"7 c #DCDCE2", +": c #EBEBEF", +"0 c #DCDCE3", +" c None", +"O c #F3F3F5", +"> c #E4E4E9", +"& c #F3F3F6", +"j c #D5D5DD", +"6 c #E4E4EA", +". c #C6C6D5", +"# c #ECECF0", +"f c #CECED7", +"l c #CECED8", +"e c #D6D6DE", +"; c #EDEDF0", +"3 c #DEDEE4", +", c #EDEDF1", +"c c #CFCFD8", +"o c #F5F5F7", +"- c #E6E6EB", +"w c #D7D7DF", +"v c #C8C8D3", +"i c #DFDFE5", +"@ c #EEEEF2", +"s c #D0D0D9", +"X c #9494AD", +"9 c #D8D8DF", +"t c #D8D8E0", +"* c #EFEFF2", +"2 c #E0E0E6", +"k c #D1D1DA", +/* pixels */ +" ........X ", +" .oO+@#$%XX ", +" .&+*#$=-XXX ", +" .+*;:=->XXXX ", +" .*,:<->1234X ", +" .,5:5612378X ", +" 5,5559530qwX ", +" 55555550q9eX ", +" 5555r5555teyX ", +" 55rui559eypX ", +" 5555i5555yasX ", +" 5555555dasfX ", +" 5355595gsfhX ", +" .3595jgklhzX ", +" .0qwjxkchzvX ", +" XXXXXXXXXXXX " +}; diff --git a/Externals/wxWidgets3/art/fileopen.xpm b/Externals/wxWidgets3/art/fileopen.xpm index 997efdea19..636a904123 100644 --- a/Externals/wxWidgets3/art/fileopen.xpm +++ b/Externals/wxWidgets3/art/fileopen.xpm @@ -1,57 +1,57 @@ -/* XPM */ -static const char *const fileopen_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 36 1", -"6 c #9BACC2", -"< c #9AEA53", -"9 c #94A5BD", -"5 c #839CB5", -"; c #4D7492", -". c #376485", -"$ c #7F99B4", -"r c #D1D9E5", -"7 c #EAEDF3", -"@ c #CAD2DC", -"% c #718BA7", -"t c #BECAD9", -"& c #65839D", -"0 c #DCE2EA", -"4 c #F5F6F7", -"w c #597B9A", -"O c #8DA0B9", -" c None", -"+ c #467291", -"u c #305F81", -"= c #B4C4D3", -"# c #CAE2AA", -"1 c #FAFCFE", -"3 c #A8B6CA", -"q c #E4E9ED", -"8 c #EEF1F3", -"X c #215579", -"2 c #7F97B0", -": c #B3BFD1", -"y c #7A90AC", -", c #C2CBDB", -"- c #ADD668", -"* c #B6D791", -"e c #CAD6E1", -"o c #DFF0D0", -"> c #BBC4D6", -/* pixels */ -" ", -" .... ", -"XXXXX .oo. ", -"XOOOO+@.#o. ", -"XOOOO$%&.*oXXX ", -"XOOOOOOO.*oX=X ", -"XOXXXX...-oXXXX;", -"XOX:>,.<<<<,.<<>.>.X0q7; ", -"Xw2O963:>>er0t; ", -"X&y2O963:>,er; ", -"uXXXXXXXXXXXX; ", -" " -}; +/* XPM */ +static const char *const fileopen_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 36 1", +"6 c #9BACC2", +"< c #9AEA53", +"9 c #94A5BD", +"5 c #839CB5", +"; c #4D7492", +". c #376485", +"$ c #7F99B4", +"r c #D1D9E5", +"7 c #EAEDF3", +"@ c #CAD2DC", +"% c #718BA7", +"t c #BECAD9", +"& c #65839D", +"0 c #DCE2EA", +"4 c #F5F6F7", +"w c #597B9A", +"O c #8DA0B9", +" c None", +"+ c #467291", +"u c #305F81", +"= c #B4C4D3", +"# c #CAE2AA", +"1 c #FAFCFE", +"3 c #A8B6CA", +"q c #E4E9ED", +"8 c #EEF1F3", +"X c #215579", +"2 c #7F97B0", +": c #B3BFD1", +"y c #7A90AC", +", c #C2CBDB", +"- c #ADD668", +"* c #B6D791", +"e c #CAD6E1", +"o c #DFF0D0", +"> c #BBC4D6", +/* pixels */ +" ", +" .... ", +"XXXXX .oo. ", +"XOOOO+@.#o. ", +"XOOOO$%&.*oXXX ", +"XOOOOOOO.*oX=X ", +"XOXXXX...-oXXXX;", +"XOX:>,.<<<<,.<<>.>.X0q7; ", +"Xw2O963:>>er0t; ", +"X&y2O963:>,er; ", +"uXXXXXXXXXXXX; ", +" " +}; diff --git a/Externals/wxWidgets3/art/filesave.xpm b/Externals/wxWidgets3/art/filesave.xpm index f571025cd6..b1ffda3346 100644 --- a/Externals/wxWidgets3/art/filesave.xpm +++ b/Externals/wxWidgets3/art/filesave.xpm @@ -1,42 +1,42 @@ -/* XPM */ -static const char *const filesave_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 21 1", -"O c #FFFFFF", -"> c #D5D6D8", -"; c #446A8C", -"1 c #CAD2DC", -": c #C0C7D1", -" c #5F666D", -"% c #A5B0BA", -"o c #65839D", -", c #DCE2EA", -"< c #C3C5C8", -"- c #E1E6EE", -"* c #C6CCD3", -". c None", -"$ c #305F81", -"2 c #D6DFE7", -"= c #D2D9E0", -"& c #B7BFC7", -"X c #1B4467", -"# c #BCBDBE", -"@ c #7A90AC", -"+ c #5D7C93", -/* pixels */ -" .", -" XoOOOOOOOOO+X .", -" @oO#######O+@ .", -" @oOOOOOOOOO+@ .", -" @oO#######O+@ .", -" @oOOOOOOOOO+@ .", -" @@+++++++++@@ .", -" @@@@@@@@@@@@@ .", -" @@@$$$$$$$$@@ .", -" @@$%%%&*=-O$@ .", -" @@$%X;;*=-O$@ .", -" @@$%X;;:>,O$@ .", -" @@$%X;;<12O$@ .", -" @@$<<2OOOOO$@ .", -". .." -}; +/* XPM */ +static const char *const filesave_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 21 1", +"O c #FFFFFF", +"> c #D5D6D8", +"; c #446A8C", +"1 c #CAD2DC", +": c #C0C7D1", +" c #5F666D", +"% c #A5B0BA", +"o c #65839D", +", c #DCE2EA", +"< c #C3C5C8", +"- c #E1E6EE", +"* c #C6CCD3", +". c None", +"$ c #305F81", +"2 c #D6DFE7", +"= c #D2D9E0", +"& c #B7BFC7", +"X c #1B4467", +"# c #BCBDBE", +"@ c #7A90AC", +"+ c #5D7C93", +/* pixels */ +" .", +" XoOOOOOOOOO+X .", +" @oO#######O+@ .", +" @oOOOOOOOOO+@ .", +" @oO#######O+@ .", +" @oOOOOOOOOO+@ .", +" @@+++++++++@@ .", +" @@@@@@@@@@@@@ .", +" @@@$$$$$$$$@@ .", +" @@$%%%&*=-O$@ .", +" @@$%X;;*=-O$@ .", +" @@$%X;;:>,O$@ .", +" @@$%X;;<12O$@ .", +" @@$<<2OOOOO$@ .", +". .." +}; diff --git a/Externals/wxWidgets3/art/filesaveas.xpm b/Externals/wxWidgets3/art/filesaveas.xpm index 7562f4cc47..4ca8e26227 100644 --- a/Externals/wxWidgets3/art/filesaveas.xpm +++ b/Externals/wxWidgets3/art/filesaveas.xpm @@ -1,44 +1,44 @@ -/* XPM */ -static const char *const filesaveas_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 23 1", -"X c Black", -"+ c #FFFFFF", -"< c #D5D6D8", -"> c #446A8C", -"3 c #CAD2DC", -", c #C0C7D1", -" c #5F666D", -"* c #A5B0BA", -"O c #65839D", -"1 c #DCE2EA", -"2 c #C3C5C8", -": c #E1E6EE", -". c #FFFF00", -"- c #C6CCD3", -"@ c None", -"& c #305F81", -"4 c #D6DFE7", -"; c #D2D9E0", -"= c #B7BFC7", -"o c #1B4467", -"$ c #BCBDBE", -"# c #7A90AC", -"% c #5D7C93", -/* pixels */ -" .X .XX.", -" oO+++++++.X.X.@", -" #O+$$$$$XX...XX", -" #O++++++.......", -" #O+$$$$$XX...XX", -" #O+++++++.X.X.@", -" ##%%%%%%.X%.X .", -" ############# @", -" ###&&&&&&&&## @", -" ##&***=-;:+&# @", -" ##&*o>>-;:+&# @", -" ##&*o>>,<1+&# @", -" ##&*o>>234+&# @", -" ##&224+++++&# @", -"@ @@" -}; +/* XPM */ +static const char *const filesaveas_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 23 1", +"X c Black", +"+ c #FFFFFF", +"< c #D5D6D8", +"> c #446A8C", +"3 c #CAD2DC", +", c #C0C7D1", +" c #5F666D", +"* c #A5B0BA", +"O c #65839D", +"1 c #DCE2EA", +"2 c #C3C5C8", +": c #E1E6EE", +". c #FFFF00", +"- c #C6CCD3", +"@ c None", +"& c #305F81", +"4 c #D6DFE7", +"; c #D2D9E0", +"= c #B7BFC7", +"o c #1B4467", +"$ c #BCBDBE", +"# c #7A90AC", +"% c #5D7C93", +/* pixels */ +" .X .XX.", +" oO+++++++.X.X.@", +" #O+$$$$$XX...XX", +" #O++++++.......", +" #O+$$$$$XX...XX", +" #O+++++++.X.X.@", +" ##%%%%%%.X%.X .", +" ############# @", +" ###&&&&&&&&## @", +" ##&***=-;:+&# @", +" ##&*o>>-;:+&# @", +" ##&*o>>,<1+&# @", +" ##&*o>>234+&# @", +" ##&224+++++&# @", +"@ @@" +}; diff --git a/Externals/wxWidgets3/art/find.xpm b/Externals/wxWidgets3/art/find.xpm index a31ecde63f..d5f24f8e41 100644 --- a/Externals/wxWidgets3/art/find.xpm +++ b/Externals/wxWidgets3/art/find.xpm @@ -1,62 +1,62 @@ -/* XPM */ -static const char *const find_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 41 1", -"y c #A06959", -"9 c #A7DAF2", -"$ c #B5CAD7", -"> c #35B4E1", -"t c #6B98B8", -"w c #B6E0F4", -"q c #AEC9D7", -"1 c #5A89A6", -"+ c #98B3C6", -"4 c #EAF6FC", -"3 c #DEF1FA", -"= c #4CBCE3", -"d c #DB916B", -"X c #85A7BC", -"s c #D8BCA4", -"o c #749BB4", -"e c #BCD9EF", -"* c #62B4DD", -"< c #91D2EF", -"a c #E6DED2", -"0 c #E9F4FB", -" c None", -"@ c #A0BACB", -"O c #AABFCD", -"i c #6591AE", -": c #B9CBD5", -"- c #71C5E7", -"5 c #D3ECF8", -"% c #81A3B9", -"6 c #8AD0EE", -"8 c #FDFDFE", -"p c #8EA9BC", -"r c #B6D5EE", -", c #81CCEB", -". c #ACC4D3", -"; c #AFD1DE", -"7 c #EFF8FC", -"u c #C2CBDB", -"# c #C0D1DC", -"2 c #CAD6E1", -"& c #8FB0C3", -/* pixels */ -" .XooXO ", -" +@###$+% ", -" .&#*==-;@@ ", -" o:*>,<--:X ", -" 12>-345-#% ", -" 12>678392% ", -" %$*,3059q& ", -" @Oq,wwer@@ ", -" t@q22q&+ ", -" yyui+%o%p ", -" yasy ", -" yasdy ", -" yasdy ", -" ysdy ", -" yy " -}; +/* XPM */ +static const char *const find_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 41 1", +"y c #A06959", +"9 c #A7DAF2", +"$ c #B5CAD7", +"> c #35B4E1", +"t c #6B98B8", +"w c #B6E0F4", +"q c #AEC9D7", +"1 c #5A89A6", +"+ c #98B3C6", +"4 c #EAF6FC", +"3 c #DEF1FA", +"= c #4CBCE3", +"d c #DB916B", +"X c #85A7BC", +"s c #D8BCA4", +"o c #749BB4", +"e c #BCD9EF", +"* c #62B4DD", +"< c #91D2EF", +"a c #E6DED2", +"0 c #E9F4FB", +" c None", +"@ c #A0BACB", +"O c #AABFCD", +"i c #6591AE", +": c #B9CBD5", +"- c #71C5E7", +"5 c #D3ECF8", +"% c #81A3B9", +"6 c #8AD0EE", +"8 c #FDFDFE", +"p c #8EA9BC", +"r c #B6D5EE", +", c #81CCEB", +". c #ACC4D3", +"; c #AFD1DE", +"7 c #EFF8FC", +"u c #C2CBDB", +"# c #C0D1DC", +"2 c #CAD6E1", +"& c #8FB0C3", +/* pixels */ +" .XooXO ", +" +@###$+% ", +" .&#*==-;@@ ", +" o:*>,<--:X ", +" 12>-345-#% ", +" 12>678392% ", +" %$*,3059q& ", +" @Oq,wwer@@ ", +" t@q22q&+ ", +" yyui+%o%p ", +" yasy ", +" yasdy ", +" yasdy ", +" ysdy ", +" yy " +}; diff --git a/Externals/wxWidgets3/art/findrepl.xpm b/Externals/wxWidgets3/art/findrepl.xpm index 5d688ba4bc..55380e5c06 100644 --- a/Externals/wxWidgets3/art/findrepl.xpm +++ b/Externals/wxWidgets3/art/findrepl.xpm @@ -1,63 +1,63 @@ -/* XPM */ -static const char *const findrepl_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 42 1", -"y c #A06959", -"9 c #A7DAF2", -"$ c #B5CAD7", -"> c #35B4E1", -"t c #6B98B8", -"w c #B6E0F4", -"q c #AEC9D7", -"1 c #5A89A6", -"+ c #98B3C6", -"4 c #EAF6FC", -"d c #008000", -"3 c #DEF1FA", -"= c #4CBCE3", -"f c #DB916B", -"X c #85A7BC", -"s c #D8BCA4", -"o c #749BB4", -"e c #BCD9EF", -"* c #62B4DD", -"< c #91D2EF", -"a c #E6DED2", -"0 c #E9F4FB", -" c None", -"@ c #A0BACB", -"O c #AABFCD", -"i c #6591AE", -": c #B9CBD5", -"- c #71C5E7", -"5 c #D3ECF8", -"% c #81A3B9", -"6 c #8AD0EE", -"8 c #FDFDFE", -"p c #8EA9BC", -"r c #B6D5EE", -", c #81CCEB", -". c #ACC4D3", -"; c #AFD1DE", -"7 c #EFF8FC", -"u c #C2CBDB", -"# c #C0D1DC", -"2 c #CAD6E1", -"& c #8FB0C3", -/* pixels */ -" .XooXO ", -" +@###$+% ", -" .&#*==-;@@ ", -" o:*>,<--:X ", -" 12>-345-#% ", -" 12>678392% ", -" %$*,3059q& ", -" @Oq,wwer@@ ", -" t@q22q&+ ", -" yyui+%o%p ", -" yasy d d ", -" yasfy dd dd ", -"yasfy ddddddddd", -"ysfy dd dd ", -" yy d d " -}; +/* XPM */ +static const char *const findrepl_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 42 1", +"y c #A06959", +"9 c #A7DAF2", +"$ c #B5CAD7", +"> c #35B4E1", +"t c #6B98B8", +"w c #B6E0F4", +"q c #AEC9D7", +"1 c #5A89A6", +"+ c #98B3C6", +"4 c #EAF6FC", +"d c #008000", +"3 c #DEF1FA", +"= c #4CBCE3", +"f c #DB916B", +"X c #85A7BC", +"s c #D8BCA4", +"o c #749BB4", +"e c #BCD9EF", +"* c #62B4DD", +"< c #91D2EF", +"a c #E6DED2", +"0 c #E9F4FB", +" c None", +"@ c #A0BACB", +"O c #AABFCD", +"i c #6591AE", +": c #B9CBD5", +"- c #71C5E7", +"5 c #D3ECF8", +"% c #81A3B9", +"6 c #8AD0EE", +"8 c #FDFDFE", +"p c #8EA9BC", +"r c #B6D5EE", +", c #81CCEB", +". c #ACC4D3", +"; c #AFD1DE", +"7 c #EFF8FC", +"u c #C2CBDB", +"# c #C0D1DC", +"2 c #CAD6E1", +"& c #8FB0C3", +/* pixels */ +" .XooXO ", +" +@###$+% ", +" .&#*==-;@@ ", +" o:*>,<--:X ", +" 12>-345-#% ", +" 12>678392% ", +" %$*,3059q& ", +" @Oq,wwer@@ ", +" t@q22q&+ ", +" yyui+%o%p ", +" yasy d d ", +" yasfy dd dd ", +"yasfy ddddddddd", +"ysfy dd dd ", +" yy d d " +}; diff --git a/Externals/wxWidgets3/art/floppy.xpm b/Externals/wxWidgets3/art/floppy.xpm index f6057b14fa..0c685efbcb 100644 --- a/Externals/wxWidgets3/art/floppy.xpm +++ b/Externals/wxWidgets3/art/floppy.xpm @@ -1,39 +1,39 @@ -/* XPM */ -static const char *const floppy_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 18 1", -"& c #E3E4E6", -"+ c #FFFFFF", -". c #446A8C", -"o c #697787", -"> c #5F666D", -"* c #B2B3B3", -" c None", -", c #4B4C4D", -"= c #DCDBDA", -"$ c #1B4467", -": c #E4E9ED", -"@ c #979BA0", -"X c #203646", -"O c #215579", -"- c #545B63", -"; c #636465", -"# c #CAD6E1", -"% c #7F8286", -/* pixels */ -" .XoooooooXO ", -" .o+++++++.O ", -" .o+OOOOO+.O ", -" .o+++++++.O ", -" .o@@@@@@@.O ", -" ..........O ", -" ..#+++++#.O ", -" ..+$O+++#.O ", -" ..+$O+++#.O ", -" %&.........*% ", -"%=+++++++++++&% ", -"--------------; ", -"-:::::::::::::- ", -"-:X:XXXXXXXXX:> ", -"-*************, " -}; +/* XPM */ +static const char *const floppy_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 18 1", +"& c #E3E4E6", +"+ c #FFFFFF", +". c #446A8C", +"o c #697787", +"> c #5F666D", +"* c #B2B3B3", +" c None", +", c #4B4C4D", +"= c #DCDBDA", +"$ c #1B4467", +": c #E4E9ED", +"@ c #979BA0", +"X c #203646", +"O c #215579", +"- c #545B63", +"; c #636465", +"# c #CAD6E1", +"% c #7F8286", +/* pixels */ +" .XoooooooXO ", +" .o+++++++.O ", +" .o+OOOOO+.O ", +" .o+++++++.O ", +" .o@@@@@@@.O ", +" ..........O ", +" ..#+++++#.O ", +" ..+$O+++#.O ", +" ..+$O+++#.O ", +" %&.........*% ", +"%=+++++++++++&% ", +"--------------; ", +"-:::::::::::::- ", +"-:X:XXXXXXXXX:> ", +"-*************, " +}; diff --git a/Externals/wxWidgets3/art/folder.xpm b/Externals/wxWidgets3/art/folder.xpm index 98e52a70b8..a116dcbd7b 100644 --- a/Externals/wxWidgets3/art/folder.xpm +++ b/Externals/wxWidgets3/art/folder.xpm @@ -1,43 +1,43 @@ -/* XPM */ -static const char *const folder_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 22 1", -"> c #9BACC2", -". c #547897", -"1 c #7F99B4", -"X c #D1D9E5", -"< c #EAEDF3", -"+ c #CAD2DC", -"3 c #718BA7", -"O c #BECAD9", -"$ c #E1E6EE", -"* c #F5F6F7", -", c #8DA0B9", -" c None", -"# c #D6DFE7", -"@ c #D2D9E0", -"- c #FAFCFE", -"; c #ADBACE", -"& c #EEF1F3", -"= c #F8F9FA", -"o c #B3BFD1", -"2 c #7A90AC", -": c #A2B3C5", -"% c #E5EAF1", -/* pixels */ -" ", -" ..... ", -" .XXXX. ", -" ............. ", -" .oO+@#$%&*=-. ", -" .oO+@#$%&*=-. ", -" .;oO+X#$%&*=. ", -" .:;oO+X#$%&*. ", -" .>:;oO+X#$%&. ", -" .,>:;oO+X#$<. ", -" .1,>:;oO+X#$. ", -" .21,>:;oO+X#. ", -" .321,>:;oO+X. ", -" ............. ", -" " -}; +/* XPM */ +static const char *const folder_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 22 1", +"> c #9BACC2", +". c #547897", +"1 c #7F99B4", +"X c #D1D9E5", +"< c #EAEDF3", +"+ c #CAD2DC", +"3 c #718BA7", +"O c #BECAD9", +"$ c #E1E6EE", +"* c #F5F6F7", +", c #8DA0B9", +" c None", +"# c #D6DFE7", +"@ c #D2D9E0", +"- c #FAFCFE", +"; c #ADBACE", +"& c #EEF1F3", +"= c #F8F9FA", +"o c #B3BFD1", +"2 c #7A90AC", +": c #A2B3C5", +"% c #E5EAF1", +/* pixels */ +" ", +" ..... ", +" .XXXX. ", +" ............. ", +" .oO+@#$%&*=-. ", +" .oO+@#$%&*=-. ", +" .;oO+X#$%&*=. ", +" .:;oO+X#$%&*. ", +" .>:;oO+X#$%&. ", +" .,>:;oO+X#$<. ", +" .1,>:;oO+X#$. ", +" .21,>:;oO+X#. ", +" .321,>:;oO+X. ", +" ............. ", +" " +}; diff --git a/Externals/wxWidgets3/art/folder_open.xpm b/Externals/wxWidgets3/art/folder_open.xpm index 154441d2a9..dd450e73b9 100644 --- a/Externals/wxWidgets3/art/folder_open.xpm +++ b/Externals/wxWidgets3/art/folder_open.xpm @@ -1,52 +1,52 @@ -/* XPM */ -static const char *const folder_open_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 31 1", -"6 c #9BACC2", -"w c #547B99", -"5 c #94A5BD", -". c #376485", -"; c #F1F4F7", -"o c #7F99B4", -"2 c #D1D9E5", -"- c #EAEDF3", -"O c #718BA7", -"0 c #65839D", -"* c #DCE2EA", -": c #F5F6F7", -"7 c #597B9A", -"X c #8DA0B9", -" c None", -"+ c #467291", -"q c #305F81", -"& c #D6DFE7", -"3 c #6A89A2", -"1 c #A8B6CA", -"= c #E4E9ED", -"> c #F8F9FA", -", c #FDFDFE", -"9 c #215579", -"8 c #7F97B0", -"@ c #B3BFD1", -"< c #7A90AC", -"$ c #C2CBDB", -"4 c #A2B3C5", -"% c #CAD6E1", -"# c #BBC4D6", -/* pixels */ -" ", -"..... ", -".XXXo. ", -".XXXXO........ ", -".XXXXXXXXXXXX. ", -".XXXXXXXXXXXX. ", -".X++++++++++++++", -".X+@#$%&*=-;:>,+", -".<.1@#$%2*=-;:23", -"..X41@#$%2*=-;3 ", -"..X561@#$%2*=-3 ", -".78X561@#$%2*%3 ", -"90<8X561@#$%23 ", -"q++++++++++++w ", -" " -}; +/* XPM */ +static const char *const folder_open_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 31 1", +"6 c #9BACC2", +"w c #547B99", +"5 c #94A5BD", +". c #376485", +"; c #F1F4F7", +"o c #7F99B4", +"2 c #D1D9E5", +"- c #EAEDF3", +"O c #718BA7", +"0 c #65839D", +"* c #DCE2EA", +": c #F5F6F7", +"7 c #597B9A", +"X c #8DA0B9", +" c None", +"+ c #467291", +"q c #305F81", +"& c #D6DFE7", +"3 c #6A89A2", +"1 c #A8B6CA", +"= c #E4E9ED", +"> c #F8F9FA", +", c #FDFDFE", +"9 c #215579", +"8 c #7F97B0", +"@ c #B3BFD1", +"< c #7A90AC", +"$ c #C2CBDB", +"4 c #A2B3C5", +"% c #CAD6E1", +"# c #BBC4D6", +/* pixels */ +" ", +"..... ", +".XXXo. ", +".XXXXO........ ", +".XXXXXXXXXXXX. ", +".XXXXXXXXXXXX. ", +".X++++++++++++++", +".X+@#$%&*=-;:>,+", +".<.1@#$%2*=-;:23", +"..X41@#$%2*=-;3 ", +"..X561@#$%2*=-3 ", +".78X561@#$%2*%3 ", +"90<8X561@#$%23 ", +"q++++++++++++w ", +" " +}; diff --git a/Externals/wxWidgets3/art/forward.xpm b/Externals/wxWidgets3/art/forward.xpm index 81f62b0344..d17eef486e 100644 --- a/Externals/wxWidgets3/art/forward.xpm +++ b/Externals/wxWidgets3/art/forward.xpm @@ -1,21 +1,21 @@ -/* XPM */ -static const char *const forward_xpm[] = { -"16 15 3 1", -" c None", -". c Black", -"X c Gray100", -" ", -" ", -" . ", -" .. ", -" .X. ", -" ........XX. ", -" .XXXXXXXXXX. ", -" .XXXXXXXXXXX. ", -" .XXXXXXXXXXX. ", -" .XXXXXXXXXX. ", -" ........XX. ", -" .X. ", -" .. ", -" . ", -" "}; +/* XPM */ +static const char *const forward_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" ", +" . ", +" .. ", +" .X. ", +" ........XX. ", +" .XXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXXX. ", +" .XXXXXXXXXX. ", +" ........XX. ", +" .X. ", +" .. ", +" . ", +" "}; diff --git a/Externals/wxWidgets3/art/gtk/error.xpm b/Externals/wxWidgets3/art/gtk/error.xpm index 559715c64c..2505d3d4a8 100644 --- a/Externals/wxWidgets3/art/gtk/error.xpm +++ b/Externals/wxWidgets3/art/gtk/error.xpm @@ -1,58 +1,58 @@ -/* XPM */ -static const char *const error_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 4 1", -" c None", -"X c #242424", -"o c #DCDF00", -". c #C00000", -/* pixels */ -" ", -" ", -" ", -" ", -" ", -" ..... ", -" ............. ", -" ................. ", -" ................... ", -" ....................... ", -" ......................... ", -" ........................... ", -" ...........................X ", -" .............................X ", -" ............................... ", -" ...............................X ", -" .................................X ", -" .................................X ", -" .................................XX ", -" ...ooooooooooooooooooooooooooo...XX ", -" ....ooooooooooooooooooooooooooo....X ", -" ....ooooooooooooooooooooooooooo....X ", -" ....ooooooooooooooooooooooooooo....XX ", -" ....ooooooooooooooooooooooooooo....XX ", -" ....ooooooooooooooooooooooooooo....XX ", -" ...ooooooooooooooooooooooooooo...XXX ", -" ...ooooooooooooooooooooooooooo...XXX ", -" .................................XX ", -" .................................XX ", -" ...............................XXX ", -" ...............................XXX ", -" .............................XXX ", -" ...........................XXXX ", -" ...........................XXX ", -" .........................XXX ", -" .......................XXXX ", -" X...................XXXXX ", -" X.................XXXXX ", -" X.............XXXXX ", -" XXXX.....XXXXXXXX ", -" XXXXXXXXXXXXX ", -" XXXXX ", -" ", -" ", -" ", -" ", -" ", -" " -}; +/* XPM */ +static const char *const error_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 4 1", +" c None", +"X c #242424", +"o c #DCDF00", +". c #C00000", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ............. ", +" ................. ", +" ................... ", +" ....................... ", +" ......................... ", +" ........................... ", +" ...........................X ", +" .............................X ", +" ............................... ", +" ...............................X ", +" .................................X ", +" .................................X ", +" .................................XX ", +" ...ooooooooooooooooooooooooooo...XX ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" .................................XX ", +" .................................XX ", +" ...............................XXX ", +" ...............................XXX ", +" .............................XXX ", +" ...........................XXXX ", +" ...........................XXX ", +" .........................XXX ", +" .......................XXXX ", +" X...................XXXXX ", +" X.................XXXXX ", +" X.............XXXXX ", +" XXXX.....XXXXXXXX ", +" XXXXXXXXXXXXX ", +" XXXXX ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/Externals/wxWidgets3/art/gtk/info.xpm b/Externals/wxWidgets3/art/gtk/info.xpm index fe32e61982..8883955448 100644 --- a/Externals/wxWidgets3/art/gtk/info.xpm +++ b/Externals/wxWidgets3/art/gtk/info.xpm @@ -1,63 +1,63 @@ -/* XPM */ -static const char *const info_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 9 1", -"$ c Black", -"O c #FFFFFF", -"@ c #808080", -"+ c #000080", -"o c #E8EB01", -" c None", -"X c #FFFF40", -"# c #C0C0C0", -". c #ABAD01", -/* pixels */ -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ..... ", -" ..XXXXX.. ", -" ..XXXXXXXXo.. ", -" .XXXOXXXXXXXoo. ", -" .XOOXXX+XXXXXo. ", -" .XOOOXX+++XXXXoo. ", -" .XOOXXX+++XXXXXo. ", -" .XOOOXXX+++XXXXXXo. ", -" .XOOXXXX+++XXXXXXo. ", -" .XXXXXXX+++XXXXXXX. ", -" .XXXXXXX+++XXXXXXo. ", -" .XXXXXXX+++XXXXXoo. ", -" .XXXXXX+++XXXXXo. ", -" .XXXXXXX+XXXXXXo. ", -" .XXXXXXXXXXXXo. ", -" .XXXXX+++XXXoo. ", -" .XXXX+++XXoo. ", -" .XXXXXXXXo. ", -" ..XXXXXXo.. ", -" .XXXXXo.. ", -" @#######@ ", -" @@@@@@@@@ ", -" @#######@ ", -" @@@@@@@@@ ", -" @#######@ ", -" @@@@@@@ ", -" ### ", -" $$$ ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" " -}; +/* XPM */ +static const char *const info_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"$ c Black", +"O c #FFFFFF", +"@ c #808080", +"+ c #000080", +"o c #E8EB01", +" c None", +"X c #FFFF40", +"# c #C0C0C0", +". c #ABAD01", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ..XXXXX.. ", +" ..XXXXXXXXo.. ", +" .XXXOXXXXXXXoo. ", +" .XOOXXX+XXXXXo. ", +" .XOOOXX+++XXXXoo. ", +" .XOOXXX+++XXXXXo. ", +" .XOOOXXX+++XXXXXXo. ", +" .XOOXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXXX. ", +" .XXXXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXoo. ", +" .XXXXXX+++XXXXXo. ", +" .XXXXXXX+XXXXXXo. ", +" .XXXXXXXXXXXXo. ", +" .XXXXX+++XXXoo. ", +" .XXXX+++XXoo. ", +" .XXXXXXXXo. ", +" ..XXXXXXo.. ", +" .XXXXXo.. ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@ ", +" ### ", +" $$$ ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/Externals/wxWidgets3/art/gtk/question.xpm b/Externals/wxWidgets3/art/gtk/question.xpm index cb0001ec80..701f4457ba 100644 --- a/Externals/wxWidgets3/art/gtk/question.xpm +++ b/Externals/wxWidgets3/art/gtk/question.xpm @@ -1,75 +1,75 @@ -/* XPM */ -static const char *const question_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 21 1", -". c Black", -"> c #696969", -"O c #1F1F00", -"+ c #181818", -"o c #F6F900", -"; c #3F3F00", -"$ c #111111", -" c None", -"& c #202020", -"X c #AAAA00", -"@ c #949400", -": c #303030", -"1 c #383838", -"% c #2A2A00", -", c #404040", -"= c #B4B400", -"- c #484848", -"# c #151500", -"< c #9F9F00", -"2 c #6A6A00", -"* c #353500", -/* pixels */ -" ", -" ", -" ", -" ", -" ......... ", -" ...XXXXXXX.. ", -" ..XXXXoooooXXXO+ ", -" ..XXooooooooooooX@.. ", -" ..XoooooooooooooooXX#. ", -" $%XoooooooooooooooooXX#. ", -" &.XoooooooXXXXXXooooooXX.. ", -" .XooooooXX.$...$XXoooooX*. ", -" $.XoooooX%.$ .*oooooo=.. ", -" .XooooooX.. -.XoooooX.. ", -" .XoooooX..+ .XoooooX;. ", -" ...XXXX..: .XoooooX;. ", -" ........ >.XoooooX;. ", -" +.XoooooX.. ", -" ,.Xoooooo<.. ", -" 1#XooooooXO.. ", -" &#XooooooX2.. ", -" $%XooooooXX.. ", -" $%XooooooXX.. ", -" $%XooooooXX.. ", -" &.XooooooXX.. ", -" .XooooooXX.. ", -" &.XoooooXX.. ", -" ..XooooXX.. ", -" ..XooooX... ", -" ..XXooXX..& ", -" ...XXXXX.. ", -" ........ ", -" ", -" ", -" ....... ", -" ..XXXXX.. ", -" ..XXoooXX.. ", -" ..XoooooX.. ", -" ..XoooooX.. ", -" ..XXoooXX.. ", -" ..XXXXX.. ", -" ....... ", -" ", -" ", -" ", -" ", -" ", -" " -}; +/* XPM */ +static const char *const question_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 21 1", +". c Black", +"> c #696969", +"O c #1F1F00", +"+ c #181818", +"o c #F6F900", +"; c #3F3F00", +"$ c #111111", +" c None", +"& c #202020", +"X c #AAAA00", +"@ c #949400", +": c #303030", +"1 c #383838", +"% c #2A2A00", +", c #404040", +"= c #B4B400", +"- c #484848", +"# c #151500", +"< c #9F9F00", +"2 c #6A6A00", +"* c #353500", +/* pixels */ +" ", +" ", +" ", +" ", +" ......... ", +" ...XXXXXXX.. ", +" ..XXXXoooooXXXO+ ", +" ..XXooooooooooooX@.. ", +" ..XoooooooooooooooXX#. ", +" $%XoooooooooooooooooXX#. ", +" &.XoooooooXXXXXXooooooXX.. ", +" .XooooooXX.$...$XXoooooX*. ", +" $.XoooooX%.$ .*oooooo=.. ", +" .XooooooX.. -.XoooooX.. ", +" .XoooooX..+ .XoooooX;. ", +" ...XXXX..: .XoooooX;. ", +" ........ >.XoooooX;. ", +" +.XoooooX.. ", +" ,.Xoooooo<.. ", +" 1#XooooooXO.. ", +" &#XooooooX2.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" &.XooooooXX.. ", +" .XooooooXX.. ", +" &.XoooooXX.. ", +" ..XooooXX.. ", +" ..XooooX... ", +" ..XXooXX..& ", +" ...XXXXX.. ", +" ........ ", +" ", +" ", +" ....... ", +" ..XXXXX.. ", +" ..XXoooXX.. ", +" ..XoooooX.. ", +" ..XoooooX.. ", +" ..XXoooXX.. ", +" ..XXXXX.. ", +" ....... ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/Externals/wxWidgets3/art/gtk/warning.xpm b/Externals/wxWidgets3/art/gtk/warning.xpm index 58aee153fe..35e60316c3 100644 --- a/Externals/wxWidgets3/art/gtk/warning.xpm +++ b/Externals/wxWidgets3/art/gtk/warning.xpm @@ -1,63 +1,63 @@ -/* XPM */ -static const char *const warning_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 9 1", -"@ c Black", -"o c #A6A800", -"+ c #8A8C00", -"$ c #B8BA00", -" c None", -"O c #6E7000", -"X c #DCDF00", -". c #C00000", -"# c #373800", -/* pixels */ -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" . ", -" ... ", -" ... ", -" ..... ", -" ...X.. ", -" ..XXX.. ", -" ...XXX... ", -" ..XXXXX.. ", -" ..XXXXXX... ", -" ...XXoO+XX.. ", -" ..XXXO@#XXX.. ", -" ..XXXXO@#XXX... ", -" ...XXXXO@#XXXX.. ", -" ..XXXXXO@#XXXX... ", -" ...XXXXXo@OXXXXX.. ", -" ...XXXXXXo@OXXXXXX.. ", -" ..XXXXXXX$@OXXXXXX... ", -" ...XXXXXXXX@XXXXXXXX.. ", -" ...XXXXXXXXXXXXXXXXXX... ", -" ..XXXXXXXXXXOXXXXXXXXX.. ", -" ...XXXXXXXXXO@#XXXXXXXXX.. ", -" ..XXXXXXXXXXX#XXXXXXXXXX... ", -" ...XXXXXXXXXXXXXXXXXXXXXXX.. ", -" ...XXXXXXXXXXXXXXXXXXXXXXXX... ", -" .............................. ", -" .............................. ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" " -}; +/* XPM */ +static const char *const warning_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"@ c Black", +"o c #A6A800", +"+ c #8A8C00", +"$ c #B8BA00", +" c None", +"O c #6E7000", +"X c #DCDF00", +". c #C00000", +"# c #373800", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . ", +" ... ", +" ... ", +" ..... ", +" ...X.. ", +" ..XXX.. ", +" ...XXX... ", +" ..XXXXX.. ", +" ..XXXXXX... ", +" ...XXoO+XX.. ", +" ..XXXO@#XXX.. ", +" ..XXXXO@#XXX... ", +" ...XXXXO@#XXXX.. ", +" ..XXXXXO@#XXXX... ", +" ...XXXXXo@OXXXXX.. ", +" ...XXXXXXo@OXXXXXX.. ", +" ..XXXXXXX$@OXXXXXX... ", +" ...XXXXXXXX@XXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXX... ", +" ..XXXXXXXXXXOXXXXXXXXX.. ", +" ...XXXXXXXXXO@#XXXXXXXXX.. ", +" ..XXXXXXXXXXX#XXXXXXXXXX... ", +" ...XXXXXXXXXXXXXXXXXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXXXXXXXX... ", +" .............................. ", +" .............................. ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/Externals/wxWidgets3/art/harddisk.xpm b/Externals/wxWidgets3/art/harddisk.xpm index d21ebf3c3b..3151a7f308 100644 --- a/Externals/wxWidgets3/art/harddisk.xpm +++ b/Externals/wxWidgets3/art/harddisk.xpm @@ -1,60 +1,60 @@ -/* XPM */ -static const char *const harddisk_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 39 1", -"7 c #E3E4E6", -"4 c #FFFFFF", -"5 c #839CB5", -". c #547897", -"1 c #4D7492", -"@ c #376485", -"o c #7A92A3", -"u c #D1D9E5", -"y c #446A8C", -"i c #51B03D", -"> c #CAD2DC", -"O c #718BA7", -"2 c #65839D", -"6 c #DCE2EA", -"0 c #C3C5C8", -"9 c #F5F6F7", -": c #EBEBEC", -"< c #597B9A", -"t c #C6CCD3", -" c None", -"* c #DFE0E2", -"e c #467291", -"a c #526E8B", -", c #7393AB", -"p c #130A0B", -"# c #AABFCD", -"r c #B4C4D3", -"; c #CFCFD0", -"X c #6F90A6", -"+ c #6A89A2", -"- c #D2D3D4", -"= c #DCDBDA", -"w c #E4E9ED", -"q c #C6C8CA", -"% c #215579", -"$ c #E7E7E7", -"3 c #7F97B0", -"8 c #C0D1DC", -"& c #5D7C93", -/* pixels */ -" ", -" .XoooXO+@ ", -" #$$%%%%$$$X ", -" &$*==-;$$$& ", -" &:>+,<1234o5 ", -" ###+67;;78242 ", -" &4,49*0q*9we4. ", -" &4+49*,,*9wo4. ", -"&4%r,67;;782t%4.", -"&44468rrrr84444,", -"y11111111111111e", -"1uu1:::::::::::1", -"1uu1::::::::ip:1", -"auu&:::::::::::1", -"1111111111111111" -}; +/* XPM */ +static const char *const harddisk_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 39 1", +"7 c #E3E4E6", +"4 c #FFFFFF", +"5 c #839CB5", +". c #547897", +"1 c #4D7492", +"@ c #376485", +"o c #7A92A3", +"u c #D1D9E5", +"y c #446A8C", +"i c #51B03D", +"> c #CAD2DC", +"O c #718BA7", +"2 c #65839D", +"6 c #DCE2EA", +"0 c #C3C5C8", +"9 c #F5F6F7", +": c #EBEBEC", +"< c #597B9A", +"t c #C6CCD3", +" c None", +"* c #DFE0E2", +"e c #467291", +"a c #526E8B", +", c #7393AB", +"p c #130A0B", +"# c #AABFCD", +"r c #B4C4D3", +"; c #CFCFD0", +"X c #6F90A6", +"+ c #6A89A2", +"- c #D2D3D4", +"= c #DCDBDA", +"w c #E4E9ED", +"q c #C6C8CA", +"% c #215579", +"$ c #E7E7E7", +"3 c #7F97B0", +"8 c #C0D1DC", +"& c #5D7C93", +/* pixels */ +" ", +" .XoooXO+@ ", +" #$$%%%%$$$X ", +" &$*==-;$$$& ", +" &:>+,<1234o5 ", +" ###+67;;78242 ", +" &4,49*0q*9we4. ", +" &4+49*,,*9wo4. ", +"&4%r,67;;782t%4.", +"&44468rrrr84444,", +"y11111111111111e", +"1uu1:::::::::::1", +"1uu1::::::::ip:1", +"auu&:::::::::::1", +"1111111111111111" +}; diff --git a/Externals/wxWidgets3/art/helpicon.xpm b/Externals/wxWidgets3/art/helpicon.xpm index 9b4cd44450..356c452399 100644 --- a/Externals/wxWidgets3/art/helpicon.xpm +++ b/Externals/wxWidgets3/art/helpicon.xpm @@ -1,44 +1,44 @@ -/* XPM */ -static const char *const helpicon_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 6 1", -" c Gray0", -". c Blue", -"X c #808080808080", -"o c #c0c0c0c0c0c0", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++XXXXXXXX+++++++++++++", -"++++++++XXXoOOOOOOoXXX++++++++++", -"++++++XXoOOOOOOOOOOOOoXX++++++++", -"+++++XoOOOOOOOOOOOOOOOOoX+++++++", -"++++XOOOOOOOOOOOOOOOOOOOO ++++++", -"+++XOOOOOOOo......oOOOOOOO +++++", -"++XOOOOOOOo.oOO....oOOOOOOO ++++", -"+XoOOOOOOO..OOOO....OOOOOOOo +++", -"+XOOOOOOOO....OO....OOOOOOOO X++", -"XoOOOOOOOO....Oo....OOOOOOOOo X+", -"XOOOOOOOOOo..oO....OOOOOOOOOO X+", -"XOOOOOOOOOOOOOo...OOOOOOOOOOO XX", -"XOOOOOOOOOOOOO...OOOOOOOOOOOO XX", -"XOOOOOOOOOOOOO..oOOOOOOOOOOOO XX", -"XOOOOOOOOOOOOO..OOOOOOOOOOOOO XX", -"XoOOOOOOOOOOOOOOOOOOOOOOOOOOo XX", -"+XOOOOOOOOOOOo..oOOOOOOOOOOO XXX", -"+XoOOOOOOOOOO....OOOOOOOOOOo XXX", -"++XOOOOOOOOOO....OOOOOOOOOO XXX+", -"+++ OOOOOOOOOo..oOOOOOOOOO XXXX+", -"++++ OOOOOOOOOOOOOOOOOOOO XXXX++", -"+++++ oOOOOOOOOOOOOOOOOo XXXX+++", -"++++++ oOOOOOOOOOOOOo XXXX++++", -"+++++++X oOOOOOOo XXXXX+++++", -"++++++++XXX oOOO XXXXXXX++++++", -"++++++++++XXXX OOO XXXXX++++++++", -"+++++++++++++X OOO XX+++++++++++", -"+++++++++++++++ OO XX+++++++++++", -"++++++++++++++++ O XX+++++++++++", -"+++++++++++++++++ XX+++++++++++", -"++++++++++++++++++XXX+++++++++++", -"+++++++++++++++++++XX+++++++++++" -}; +/* XPM */ +static const char *const helpicon_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 6 1", +" c Gray0", +". c Blue", +"X c #808080808080", +"o c #c0c0c0c0c0c0", +"O c Gray100", +"+ c None", +/* pixels */ +"+++++++++++XXXXXXXX+++++++++++++", +"++++++++XXXoOOOOOOoXXX++++++++++", +"++++++XXoOOOOOOOOOOOOoXX++++++++", +"+++++XoOOOOOOOOOOOOOOOOoX+++++++", +"++++XOOOOOOOOOOOOOOOOOOOO ++++++", +"+++XOOOOOOOo......oOOOOOOO +++++", +"++XOOOOOOOo.oOO....oOOOOOOO ++++", +"+XoOOOOOOO..OOOO....OOOOOOOo +++", +"+XOOOOOOOO....OO....OOOOOOOO X++", +"XoOOOOOOOO....Oo....OOOOOOOOo X+", +"XOOOOOOOOOo..oO....OOOOOOOOOO X+", +"XOOOOOOOOOOOOOo...OOOOOOOOOOO XX", +"XOOOOOOOOOOOOO...OOOOOOOOOOOO XX", +"XOOOOOOOOOOOOO..oOOOOOOOOOOOO XX", +"XOOOOOOOOOOOOO..OOOOOOOOOOOOO XX", +"XoOOOOOOOOOOOOOOOOOOOOOOOOOOo XX", +"+XOOOOOOOOOOOo..oOOOOOOOOOOO XXX", +"+XoOOOOOOOOOO....OOOOOOOOOOo XXX", +"++XOOOOOOOOOO....OOOOOOOOOO XXX+", +"+++ OOOOOOOOOo..oOOOOOOOOO XXXX+", +"++++ OOOOOOOOOOOOOOOOOOOO XXXX++", +"+++++ oOOOOOOOOOOOOOOOOo XXXX+++", +"++++++ oOOOOOOOOOOOOo XXXX++++", +"+++++++X oOOOOOOo XXXXX+++++", +"++++++++XXX oOOO XXXXXXX++++++", +"++++++++++XXXX OOO XXXXX++++++++", +"+++++++++++++X OOO XX+++++++++++", +"+++++++++++++++ OO XX+++++++++++", +"++++++++++++++++ O XX+++++++++++", +"+++++++++++++++++ XX+++++++++++", +"++++++++++++++++++XXX+++++++++++", +"+++++++++++++++++++XX+++++++++++" +}; diff --git a/Externals/wxWidgets3/art/home.xpm b/Externals/wxWidgets3/art/home.xpm index d0da8d26b8..d246b1d72e 100644 --- a/Externals/wxWidgets3/art/home.xpm +++ b/Externals/wxWidgets3/art/home.xpm @@ -1,24 +1,24 @@ -/* XPM */ -static const char *const home_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 3 1", -". c Black", -"X c #FFFFFF", -" c None", -/* pixels */ -" .... ", -" .XXXX. ", -" .XXXXXX. ", -" .XXXXXXXX. ", -" .XXXXXXXXXX. ", -" .............. ", -" .XXXXXXXXXXXX. ", -" .XXXXXXXXXXXX. ", -" .XXXXXXXXXXXX. ", -" .X.....X....X. ", -" .X. .X. .X. ", -" .X. .X. .X. ", -" .X.....X. .X. ", -" .XXXXXXX. .X. ", -" ......... ... " -}; +/* XPM */ +static const char *const home_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 3 1", +". c Black", +"X c #FFFFFF", +" c None", +/* pixels */ +" .... ", +" .XXXX. ", +" .XXXXXX. ", +" .XXXXXXXX. ", +" .XXXXXXXXXX. ", +" .............. ", +" .XXXXXXXXXXXX. ", +" .XXXXXXXXXXXX. ", +" .XXXXXXXXXXXX. ", +" .X.....X....X. ", +" .X. .X. .X. ", +" .X. .X. .X. ", +" .X.....X. .X. ", +" .XXXXXXX. .X. ", +" ......... ... " +}; diff --git a/Externals/wxWidgets3/art/htmbook.xpm b/Externals/wxWidgets3/art/htmbook.xpm index d0456ee6d5..e49b4685f9 100644 --- a/Externals/wxWidgets3/art/htmbook.xpm +++ b/Externals/wxWidgets3/art/htmbook.xpm @@ -1,25 +1,25 @@ -/* XPM */ -static const char *const htmbook_xpm[] = { -"16 16 6 1", -" c None", -". c Black", -"X c #000080", -"o c #c0c0c0", -"O c #808080", -"+ c Gray100", -" ", -" .. ", -" ..XX. ", -" ..XXXXX. ", -" ..XXXXXXXX. ", -".oXXXXXXXXXX. ", -".XoXXXXXXXXXX. ", -".XXoXXXXXXXXXX. ", -".XXXoXXXXXXXXX..", -".XXXXoXXXXXX..O ", -" .XXXXoXXX..O+O ", -" .XXXXo..O++o..", -" .XXX.O+++o.. ", -" .XX.o+o.. ", -" .X.o.. ", -" ... "}; +/* XPM */ +static const char *const htmbook_xpm[] = { +"16 16 6 1", +" c None", +". c Black", +"X c #000080", +"o c #c0c0c0", +"O c #808080", +"+ c Gray100", +" ", +" .. ", +" ..XX. ", +" ..XXXXX. ", +" ..XXXXXXXX. ", +".oXXXXXXXXXX. ", +".XoXXXXXXXXXX. ", +".XXoXXXXXXXXXX. ", +".XXXoXXXXXXXXX..", +".XXXXoXXXXXX..O ", +" .XXXXoXXX..O+O ", +" .XXXXo..O++o..", +" .XXX.O+++o.. ", +" .XX.o+o.. ", +" .X.o.. ", +" ... "}; diff --git a/Externals/wxWidgets3/art/htmfoldr.xpm b/Externals/wxWidgets3/art/htmfoldr.xpm index 4f84e8aeff..dacef687b1 100644 --- a/Externals/wxWidgets3/art/htmfoldr.xpm +++ b/Externals/wxWidgets3/art/htmfoldr.xpm @@ -1,25 +1,25 @@ -/* XPM */ -static const char *const htmfoldr_xpm[] = { -"16 16 6 1", -" c None", -". c Black", -"X c #000080", -"o c #c0c0c0", -"O c #808080", -"+ c Gray100", -" ", -" .. ", -" ..XX. ", -" ..XXXXX. ", -" ..XXXXXXXX. ", -".oXXXXXXXXXX. ", -".XoXXXXXXXXXX. ", -".XXoXXXXXXXXXX. ", -".XXXoXXXXXXXXX..", -".XXXXoXXXXXX..O ", -" .XXXXoXXX..O+O ", -" .XXXXo..O++o..", -" .XXX.O+++o.. ", -" .XX.o+o.. ", -" .X.o.. ", -" ... "}; +/* XPM */ +static const char *const htmfoldr_xpm[] = { +"16 16 6 1", +" c None", +". c Black", +"X c #000080", +"o c #c0c0c0", +"O c #808080", +"+ c Gray100", +" ", +" .. ", +" ..XX. ", +" ..XXXXX. ", +" ..XXXXXXXX. ", +".oXXXXXXXXXX. ", +".XoXXXXXXXXXX. ", +".XXoXXXXXXXXXX. ", +".XXXoXXXXXXXXX..", +".XXXXoXXXXXX..O ", +" .XXXXoXXX..O+O ", +" .XXXXo..O++o..", +" .XXX.O+++o.. ", +" .XX.o+o.. ", +" .X.o.. ", +" ... "}; diff --git a/Externals/wxWidgets3/art/htmoptns.xpm b/Externals/wxWidgets3/art/htmoptns.xpm index 0d178ab2e1..8806749ea4 100644 --- a/Externals/wxWidgets3/art/htmoptns.xpm +++ b/Externals/wxWidgets3/art/htmoptns.xpm @@ -1,20 +1,20 @@ -/* XPM */ -static const char *const htmoptns_xpm[] = { -"16 15 2 1", -" c None", -". c #000000", -" ", -" .. ", -" ... ", -" .... ", -" . ... ", -" .. ... ", -" . .. ", -" .. ... ", -" . .. ", -" ......... ", -" .. ... ", -" . ... ", -" .. ... ", -" .... ....... ", -" "}; +/* XPM */ +static const char *const htmoptns_xpm[] = { +"16 15 2 1", +" c None", +". c #000000", +" ", +" .. ", +" ... ", +" .... ", +" . ... ", +" .. ... ", +" . .. ", +" .. ... ", +" . .. ", +" ......... ", +" .. ... ", +" . ... ", +" .. ... ", +" .... ....... ", +" "}; diff --git a/Externals/wxWidgets3/art/htmpage.xpm b/Externals/wxWidgets3/art/htmpage.xpm index f7d9f472ab..e4fa3fbc71 100644 --- a/Externals/wxWidgets3/art/htmpage.xpm +++ b/Externals/wxWidgets3/art/htmpage.xpm @@ -1,23 +1,23 @@ -/* XPM */ -static const char *const htmpage_xpm[] = { -"16 16 4 1", -" c None", -". c #808080", -"X c Gray100", -"o c Black", -" ", -" .......... ", -" .XXXXXXXX.. ", -" .XXXXXXXXooo ", -" .X......XXXo ", -" .XXXXXXXXXXo ", -" .X........Xo ", -" .XXXXXXXXXXo ", -" .X........Xo ", -" .XXXXXXXXXXo ", -" .X........Xo ", -" .XXXXXXXXXXo ", -" .X........Xo ", -" .XXXXXXXXXXo ", -" .XXXXXXXXXXo ", -" oooooooooooo "}; +/* XPM */ +static const char *const htmpage_xpm[] = { +"16 16 4 1", +" c None", +". c #808080", +"X c Gray100", +"o c Black", +" ", +" .......... ", +" .XXXXXXXX.. ", +" .XXXXXXXXooo ", +" .X......XXXo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .X........Xo ", +" .XXXXXXXXXXo ", +" .XXXXXXXXXXo ", +" oooooooooooo "}; diff --git a/Externals/wxWidgets3/art/htmsidep.xpm b/Externals/wxWidgets3/art/htmsidep.xpm index 19bb863730..30f6a92392 100644 --- a/Externals/wxWidgets3/art/htmsidep.xpm +++ b/Externals/wxWidgets3/art/htmsidep.xpm @@ -1,27 +1,27 @@ -/* XPM */ -static const char *const htmsidep_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 6 1", -". c Black", -"X c #FFFFFF", -"+ c #808080", -" c None", -"O c #0000C0", -"o c #C0C0C0", -/* pixels */ -" ", -" .............. ", -" .XXXX.ooooooo. ", -" .XOXX.oo...oo. ", -" .XXOX.ooooooo. ", -" .OOOO.o...+.o. ", -" .XXOX.ooooooo. ", -" .XOXX.ooooooo. ", -" .XXXX.o..+ooo. ", -" .XXOX.ooooooo. ", -" .XOXX.o...+.o. ", -" .OOOO.ooooooo. ", -" .XOXX.o.+...o. ", -" .XXOX.ooooooo. ", -" .............. " -}; +/* XPM */ +static const char *const htmsidep_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 6 1", +". c Black", +"X c #FFFFFF", +"+ c #808080", +" c None", +"O c #0000C0", +"o c #C0C0C0", +/* pixels */ +" ", +" .............. ", +" .XXXX.ooooooo. ", +" .XOXX.oo...oo. ", +" .XXOX.ooooooo. ", +" .OOOO.o...+.o. ", +" .XXOX.ooooooo. ", +" .XOXX.ooooooo. ", +" .XXXX.o..+ooo. ", +" .XXOX.ooooooo. ", +" .XOXX.o...+.o. ", +" .OOOO.ooooooo. ", +" .XOXX.o.+...o. ", +" .XXOX.ooooooo. ", +" .............. " +}; diff --git a/Externals/wxWidgets3/art/listview.xpm b/Externals/wxWidgets3/art/listview.xpm index 2d8afc4198..30f748abb4 100644 --- a/Externals/wxWidgets3/art/listview.xpm +++ b/Externals/wxWidgets3/art/listview.xpm @@ -1,25 +1,25 @@ -/* XPM */ -static const char *const listview_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 4 1", -" c Black", -". c #FFFFFF", -"X c #000084", -"o c #848484", -/* pixels */ -" ", -" .............. ", -" .XXX.......... ", -" .XXX. o o . ", -" .XXX.......... ", -" .............. ", -" .XXX.......... ", -" .XXX. o . ", -" .XXX.......... ", -" .............. ", -" .XXX.......... ", -" .XXX. o o . ", -" .XXX.......... ", -" .............. ", -" " -}; +/* XPM */ +static const char *const listview_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 4 1", +" c Black", +". c #FFFFFF", +"X c #000084", +"o c #848484", +/* pixels */ +" ", +" .............. ", +" .XXX.......... ", +" .XXX. o o . ", +" .XXX.......... ", +" .............. ", +" .XXX.......... ", +" .XXX. o . ", +" .XXX.......... ", +" .............. ", +" .XXX.......... ", +" .XXX. o o . ", +" .XXX.......... ", +" .............. ", +" " +}; diff --git a/Externals/wxWidgets3/art/missimg.xpm b/Externals/wxWidgets3/art/missimg.xpm index 599aca7896..80eecbcf2a 100644 --- a/Externals/wxWidgets3/art/missimg.xpm +++ b/Externals/wxWidgets3/art/missimg.xpm @@ -1,43 +1,43 @@ -/* XPM */ -static const char *const missimg_xpm[] = { -/* columns rows colors chars-per-pixel */ -"32 32 5 1", -"X c Black", -"o c #FFFFFF", -" c None", -". c #C0C0C0", -"O c #E0E0E0", -/* pixels */ -" .............................X ", -" .ooooooooooooooooooooooooooooX ", -" .ooooooooooooooooooooooooooooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOXOOOOOOOOOOOOOOOOooX ", -" XXXOOOOOXX XOOOOOOOOOOOOOOOooX ", -" XXXXX XOOOOOOOOOOOOOOooX ", -" XOOOXXXOOOOOOOooX ", -" XXX XXOOOOOooX ", -" XOOOOooX ", -" . XOOOooX ", -" .. XXOooX ", -" .o.. XooX ", -" .ooO... XXX ", -" .ooOOOO.......... ", -" .ooOOOOOOOOOOOOOO.. ", -" .ooOOOOOOOOOOOOOOOO.. ", -" .ooOOOOOOOOOOOOOOOOOO......... ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", -" .ooooooooooooooooooooooooooooX ", -" .ooooooooooooooooooooooooooooX ", -" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " -}; +/* XPM */ +static const char *const missimg_xpm[] = { +/* columns rows colors chars-per-pixel */ +"32 32 5 1", +"X c Black", +"o c #FFFFFF", +" c None", +". c #C0C0C0", +"O c #E0E0E0", +/* pixels */ +" .............................X ", +" .ooooooooooooooooooooooooooooX ", +" .ooooooooooooooooooooooooooooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOXOOOOOOOOOOOOOOOOooX ", +" XXXOOOOOXX XOOOOOOOOOOOOOOOooX ", +" XXXXX XOOOOOOOOOOOOOOooX ", +" XOOOXXXOOOOOOOooX ", +" XXX XXOOOOOooX ", +" XOOOOooX ", +" . XOOOooX ", +" .. XXOooX ", +" .o.. XooX ", +" .ooO... XXX ", +" .ooOOOO.......... ", +" .ooOOOOOOOOOOOOOO.. ", +" .ooOOOOOOOOOOOOOOOO.. ", +" .ooOOOOOOOOOOOOOOOOOO......... ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooOOOOOOOOOOOOOOOOOOOOOOOOooX ", +" .ooooooooooooooooooooooooooooX ", +" .ooooooooooooooooooooooooooooX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX " +}; diff --git a/Externals/wxWidgets3/art/motif/error.xpm b/Externals/wxWidgets3/art/motif/error.xpm index 559715c64c..2505d3d4a8 100644 --- a/Externals/wxWidgets3/art/motif/error.xpm +++ b/Externals/wxWidgets3/art/motif/error.xpm @@ -1,58 +1,58 @@ -/* XPM */ -static const char *const error_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 4 1", -" c None", -"X c #242424", -"o c #DCDF00", -". c #C00000", -/* pixels */ -" ", -" ", -" ", -" ", -" ", -" ..... ", -" ............. ", -" ................. ", -" ................... ", -" ....................... ", -" ......................... ", -" ........................... ", -" ...........................X ", -" .............................X ", -" ............................... ", -" ...............................X ", -" .................................X ", -" .................................X ", -" .................................XX ", -" ...ooooooooooooooooooooooooooo...XX ", -" ....ooooooooooooooooooooooooooo....X ", -" ....ooooooooooooooooooooooooooo....X ", -" ....ooooooooooooooooooooooooooo....XX ", -" ....ooooooooooooooooooooooooooo....XX ", -" ....ooooooooooooooooooooooooooo....XX ", -" ...ooooooooooooooooooooooooooo...XXX ", -" ...ooooooooooooooooooooooooooo...XXX ", -" .................................XX ", -" .................................XX ", -" ...............................XXX ", -" ...............................XXX ", -" .............................XXX ", -" ...........................XXXX ", -" ...........................XXX ", -" .........................XXX ", -" .......................XXXX ", -" X...................XXXXX ", -" X.................XXXXX ", -" X.............XXXXX ", -" XXXX.....XXXXXXXX ", -" XXXXXXXXXXXXX ", -" XXXXX ", -" ", -" ", -" ", -" ", -" ", -" " -}; +/* XPM */ +static const char *const error_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 4 1", +" c None", +"X c #242424", +"o c #DCDF00", +". c #C00000", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ............. ", +" ................. ", +" ................... ", +" ....................... ", +" ......................... ", +" ........................... ", +" ...........................X ", +" .............................X ", +" ............................... ", +" ...............................X ", +" .................................X ", +" .................................X ", +" .................................XX ", +" ...ooooooooooooooooooooooooooo...XX ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....X ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ....ooooooooooooooooooooooooooo....XX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" ...ooooooooooooooooooooooooooo...XXX ", +" .................................XX ", +" .................................XX ", +" ...............................XXX ", +" ...............................XXX ", +" .............................XXX ", +" ...........................XXXX ", +" ...........................XXX ", +" .........................XXX ", +" .......................XXXX ", +" X...................XXXXX ", +" X.................XXXXX ", +" X.............XXXXX ", +" XXXX.....XXXXXXXX ", +" XXXXXXXXXXXXX ", +" XXXXX ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/Externals/wxWidgets3/art/motif/info.xpm b/Externals/wxWidgets3/art/motif/info.xpm index fe32e61982..8883955448 100644 --- a/Externals/wxWidgets3/art/motif/info.xpm +++ b/Externals/wxWidgets3/art/motif/info.xpm @@ -1,63 +1,63 @@ -/* XPM */ -static const char *const info_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 9 1", -"$ c Black", -"O c #FFFFFF", -"@ c #808080", -"+ c #000080", -"o c #E8EB01", -" c None", -"X c #FFFF40", -"# c #C0C0C0", -". c #ABAD01", -/* pixels */ -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ..... ", -" ..XXXXX.. ", -" ..XXXXXXXXo.. ", -" .XXXOXXXXXXXoo. ", -" .XOOXXX+XXXXXo. ", -" .XOOOXX+++XXXXoo. ", -" .XOOXXX+++XXXXXo. ", -" .XOOOXXX+++XXXXXXo. ", -" .XOOXXXX+++XXXXXXo. ", -" .XXXXXXX+++XXXXXXX. ", -" .XXXXXXX+++XXXXXXo. ", -" .XXXXXXX+++XXXXXoo. ", -" .XXXXXX+++XXXXXo. ", -" .XXXXXXX+XXXXXXo. ", -" .XXXXXXXXXXXXo. ", -" .XXXXX+++XXXoo. ", -" .XXXX+++XXoo. ", -" .XXXXXXXXo. ", -" ..XXXXXXo.. ", -" .XXXXXo.. ", -" @#######@ ", -" @@@@@@@@@ ", -" @#######@ ", -" @@@@@@@@@ ", -" @#######@ ", -" @@@@@@@ ", -" ### ", -" $$$ ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" " -}; +/* XPM */ +static const char *const info_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"$ c Black", +"O c #FFFFFF", +"@ c #808080", +"+ c #000080", +"o c #E8EB01", +" c None", +"X c #FFFF40", +"# c #C0C0C0", +". c #ABAD01", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ..... ", +" ..XXXXX.. ", +" ..XXXXXXXXo.. ", +" .XXXOXXXXXXXoo. ", +" .XOOXXX+XXXXXo. ", +" .XOOOXX+++XXXXoo. ", +" .XOOXXX+++XXXXXo. ", +" .XOOOXXX+++XXXXXXo. ", +" .XOOXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXXX. ", +" .XXXXXXX+++XXXXXXo. ", +" .XXXXXXX+++XXXXXoo. ", +" .XXXXXX+++XXXXXo. ", +" .XXXXXXX+XXXXXXo. ", +" .XXXXXXXXXXXXo. ", +" .XXXXX+++XXXoo. ", +" .XXXX+++XXoo. ", +" .XXXXXXXXo. ", +" ..XXXXXXo.. ", +" .XXXXXo.. ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@@@ ", +" @#######@ ", +" @@@@@@@ ", +" ### ", +" $$$ ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/Externals/wxWidgets3/art/motif/question.xpm b/Externals/wxWidgets3/art/motif/question.xpm index cb0001ec80..701f4457ba 100644 --- a/Externals/wxWidgets3/art/motif/question.xpm +++ b/Externals/wxWidgets3/art/motif/question.xpm @@ -1,75 +1,75 @@ -/* XPM */ -static const char *const question_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 21 1", -". c Black", -"> c #696969", -"O c #1F1F00", -"+ c #181818", -"o c #F6F900", -"; c #3F3F00", -"$ c #111111", -" c None", -"& c #202020", -"X c #AAAA00", -"@ c #949400", -": c #303030", -"1 c #383838", -"% c #2A2A00", -", c #404040", -"= c #B4B400", -"- c #484848", -"# c #151500", -"< c #9F9F00", -"2 c #6A6A00", -"* c #353500", -/* pixels */ -" ", -" ", -" ", -" ", -" ......... ", -" ...XXXXXXX.. ", -" ..XXXXoooooXXXO+ ", -" ..XXooooooooooooX@.. ", -" ..XoooooooooooooooXX#. ", -" $%XoooooooooooooooooXX#. ", -" &.XoooooooXXXXXXooooooXX.. ", -" .XooooooXX.$...$XXoooooX*. ", -" $.XoooooX%.$ .*oooooo=.. ", -" .XooooooX.. -.XoooooX.. ", -" .XoooooX..+ .XoooooX;. ", -" ...XXXX..: .XoooooX;. ", -" ........ >.XoooooX;. ", -" +.XoooooX.. ", -" ,.Xoooooo<.. ", -" 1#XooooooXO.. ", -" &#XooooooX2.. ", -" $%XooooooXX.. ", -" $%XooooooXX.. ", -" $%XooooooXX.. ", -" &.XooooooXX.. ", -" .XooooooXX.. ", -" &.XoooooXX.. ", -" ..XooooXX.. ", -" ..XooooX... ", -" ..XXooXX..& ", -" ...XXXXX.. ", -" ........ ", -" ", -" ", -" ....... ", -" ..XXXXX.. ", -" ..XXoooXX.. ", -" ..XoooooX.. ", -" ..XoooooX.. ", -" ..XXoooXX.. ", -" ..XXXXX.. ", -" ....... ", -" ", -" ", -" ", -" ", -" ", -" " -}; +/* XPM */ +static const char *const question_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 21 1", +". c Black", +"> c #696969", +"O c #1F1F00", +"+ c #181818", +"o c #F6F900", +"; c #3F3F00", +"$ c #111111", +" c None", +"& c #202020", +"X c #AAAA00", +"@ c #949400", +": c #303030", +"1 c #383838", +"% c #2A2A00", +", c #404040", +"= c #B4B400", +"- c #484848", +"# c #151500", +"< c #9F9F00", +"2 c #6A6A00", +"* c #353500", +/* pixels */ +" ", +" ", +" ", +" ", +" ......... ", +" ...XXXXXXX.. ", +" ..XXXXoooooXXXO+ ", +" ..XXooooooooooooX@.. ", +" ..XoooooooooooooooXX#. ", +" $%XoooooooooooooooooXX#. ", +" &.XoooooooXXXXXXooooooXX.. ", +" .XooooooXX.$...$XXoooooX*. ", +" $.XoooooX%.$ .*oooooo=.. ", +" .XooooooX.. -.XoooooX.. ", +" .XoooooX..+ .XoooooX;. ", +" ...XXXX..: .XoooooX;. ", +" ........ >.XoooooX;. ", +" +.XoooooX.. ", +" ,.Xoooooo<.. ", +" 1#XooooooXO.. ", +" &#XooooooX2.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" $%XooooooXX.. ", +" &.XooooooXX.. ", +" .XooooooXX.. ", +" &.XoooooXX.. ", +" ..XooooXX.. ", +" ..XooooX... ", +" ..XXooXX..& ", +" ...XXXXX.. ", +" ........ ", +" ", +" ", +" ....... ", +" ..XXXXX.. ", +" ..XXoooXX.. ", +" ..XoooooX.. ", +" ..XoooooX.. ", +" ..XXoooXX.. ", +" ..XXXXX.. ", +" ....... ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/Externals/wxWidgets3/art/motif/warning.xpm b/Externals/wxWidgets3/art/motif/warning.xpm index 58aee153fe..35e60316c3 100644 --- a/Externals/wxWidgets3/art/motif/warning.xpm +++ b/Externals/wxWidgets3/art/motif/warning.xpm @@ -1,63 +1,63 @@ -/* XPM */ -static const char *const warning_xpm[] = { -/* columns rows colors chars-per-pixel */ -"48 48 9 1", -"@ c Black", -"o c #A6A800", -"+ c #8A8C00", -"$ c #B8BA00", -" c None", -"O c #6E7000", -"X c #DCDF00", -". c #C00000", -"# c #373800", -/* pixels */ -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" . ", -" ... ", -" ... ", -" ..... ", -" ...X.. ", -" ..XXX.. ", -" ...XXX... ", -" ..XXXXX.. ", -" ..XXXXXX... ", -" ...XXoO+XX.. ", -" ..XXXO@#XXX.. ", -" ..XXXXO@#XXX... ", -" ...XXXXO@#XXXX.. ", -" ..XXXXXO@#XXXX... ", -" ...XXXXXo@OXXXXX.. ", -" ...XXXXXXo@OXXXXXX.. ", -" ..XXXXXXX$@OXXXXXX... ", -" ...XXXXXXXX@XXXXXXXX.. ", -" ...XXXXXXXXXXXXXXXXXX... ", -" ..XXXXXXXXXXOXXXXXXXXX.. ", -" ...XXXXXXXXXO@#XXXXXXXXX.. ", -" ..XXXXXXXXXXX#XXXXXXXXXX... ", -" ...XXXXXXXXXXXXXXXXXXXXXXX.. ", -" ...XXXXXXXXXXXXXXXXXXXXXXXX... ", -" .............................. ", -" .............................. ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" " -}; +/* XPM */ +static const char *const warning_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 9 1", +"@ c Black", +"o c #A6A800", +"+ c #8A8C00", +"$ c #B8BA00", +" c None", +"O c #6E7000", +"X c #DCDF00", +". c #C00000", +"# c #373800", +/* pixels */ +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" . ", +" ... ", +" ... ", +" ..... ", +" ...X.. ", +" ..XXX.. ", +" ...XXX... ", +" ..XXXXX.. ", +" ..XXXXXX... ", +" ...XXoO+XX.. ", +" ..XXXO@#XXX.. ", +" ..XXXXO@#XXX... ", +" ...XXXXO@#XXXX.. ", +" ..XXXXXO@#XXXX... ", +" ...XXXXXo@OXXXXX.. ", +" ...XXXXXXo@OXXXXXX.. ", +" ..XXXXXXX$@OXXXXXX... ", +" ...XXXXXXXX@XXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXX... ", +" ..XXXXXXXXXXOXXXXXXXXX.. ", +" ...XXXXXXXXXO@#XXXXXXXXX.. ", +" ..XXXXXXXXXXX#XXXXXXXXXX... ", +" ...XXXXXXXXXXXXXXXXXXXXXXX.. ", +" ...XXXXXXXXXXXXXXXXXXXXXXXX... ", +" .............................. ", +" .............................. ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" " +}; diff --git a/Externals/wxWidgets3/art/new.xpm b/Externals/wxWidgets3/art/new.xpm index 15826c8d22..6a0b133350 100644 --- a/Externals/wxWidgets3/art/new.xpm +++ b/Externals/wxWidgets3/art/new.xpm @@ -1,50 +1,50 @@ -/* XPM */ -static const char *const new_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 29 1", -"* c #97C4E7", -"- c #72A8D2", -": c #FFFFFF", -"9 c #839CB5", -"o c #6B98B8", -"X c #5A89A6", -"# c #3A749C", -", c #D1E5F5", -"0 c #85A7BC", -"$ c #C3DDF1", -"8 c #749BB4", -"; c #5F9BC8", -" c None", -"+ c #538DB3", -"= c #85BBE2", -"3 c #EFF6FC", -"O c #6591AE", -"5 c #F7FBFD", -"7 c #FAFCFE", -"< c #DAEAF7", -"4 c #E9F3FA", -"6 c #FDFDFE", -"1 c #E2EFF8", -". c #8EA9BC", -"% c #B6D5EE", -"& c #A5CCEA", -"> c #ACE95B", -"2 c #F4F9FD", -"@ c #4581AA", -/* pixels */ -" .XoOO+@#. ", -" .$$%&*=O-; ", -" @@@@$%&*O:*o ", -" @>>@$$%&O::*o ", -"@@@>>@@@$%OOoO+ ", -"@>>>>>>@,$%&*=+ ", -"@>>>>>>@<,$%&*+ ", -"@@@>>@@@1<,$%&O ", -" @>>@2341<,$%O ", -" @@@@52341<,$o ", -" .:6752341<,8 ", -" .::6752341<8 ", -" .:::67523419 ", -" .::::6752340 ", -" ............ " -}; +/* XPM */ +static const char *const new_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 29 1", +"* c #97C4E7", +"- c #72A8D2", +": c #FFFFFF", +"9 c #839CB5", +"o c #6B98B8", +"X c #5A89A6", +"# c #3A749C", +", c #D1E5F5", +"0 c #85A7BC", +"$ c #C3DDF1", +"8 c #749BB4", +"; c #5F9BC8", +" c None", +"+ c #538DB3", +"= c #85BBE2", +"3 c #EFF6FC", +"O c #6591AE", +"5 c #F7FBFD", +"7 c #FAFCFE", +"< c #DAEAF7", +"4 c #E9F3FA", +"6 c #FDFDFE", +"1 c #E2EFF8", +". c #8EA9BC", +"% c #B6D5EE", +"& c #A5CCEA", +"> c #ACE95B", +"2 c #F4F9FD", +"@ c #4581AA", +/* pixels */ +" .XoOO+@#. ", +" .$$%&*=O-; ", +" @@@@$%&*O:*o ", +" @>>@$$%&O::*o ", +"@@@>>@@@$%OOoO+ ", +"@>>>>>>@,$%&*=+ ", +"@>>>>>>@<,$%&*+ ", +"@@@>>@@@1<,$%&O ", +" @>>@2341<,$%O ", +" @@@@52341<,$o ", +" .:6752341<,8 ", +" .::6752341<8 ", +" .:::67523419 ", +" .::::6752340 ", +" ............ " +}; diff --git a/Externals/wxWidgets3/art/new_dir.xpm b/Externals/wxWidgets3/art/new_dir.xpm index f49515e71b..d100eea753 100644 --- a/Externals/wxWidgets3/art/new_dir.xpm +++ b/Externals/wxWidgets3/art/new_dir.xpm @@ -1,43 +1,43 @@ -/* XPM */ -static const char *const new_dir_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 22 1", -"X c Black", -"> c #9BACC2", -"o c #547897", -"1 c #7F99B4", -"O c #D1D9E5", -"< c #EAEDF3", -"# c #CAD2DC", -"3 c #718BA7", -"@ c #BECAD9", -"& c #E1E6EE", -"; c #F5F6F7", -". c #FFFF00", -", c #8DA0B9", -" c None", -"% c #D6DFE7", -"$ c #D2D9E0", -"- c #ADBACE", -"= c #EEF1F3", -"+ c #B3BFD1", -"2 c #7A90AC", -": c #A2B3C5", -"* c #E5EAF1", -/* pixels */ -" .X .XX.", -" ooooo .X.X. ", -" oOOOOo XX...XX", -" oooooooo.......", -" o+@#$%&*XX...XX", -" o+@#$%&*=.X.X. ", -" o-+@#O%&.X;.X .", -" o:-+@#O%&*=;o ", -" o>:-+@#O%&*=o ", -" o,>:-+@#O%&:-+@#O%&o ", -" o21,>:-+@#O%o ", -" o321,>:-+@#Oo ", -" ooooooooooooo ", -" " -}; +/* XPM */ +static const char *const new_dir_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 22 1", +"X c Black", +"> c #9BACC2", +"o c #547897", +"1 c #7F99B4", +"O c #D1D9E5", +"< c #EAEDF3", +"# c #CAD2DC", +"3 c #718BA7", +"@ c #BECAD9", +"& c #E1E6EE", +"; c #F5F6F7", +". c #FFFF00", +", c #8DA0B9", +" c None", +"% c #D6DFE7", +"$ c #D2D9E0", +"- c #ADBACE", +"= c #EEF1F3", +"+ c #B3BFD1", +"2 c #7A90AC", +": c #A2B3C5", +"* c #E5EAF1", +/* pixels */ +" .X .XX.", +" ooooo .X.X. ", +" oOOOOo XX...XX", +" oooooooo.......", +" o+@#$%&*XX...XX", +" o+@#$%&*=.X.X. ", +" o-+@#O%&.X;.X .", +" o:-+@#O%&*=;o ", +" o>:-+@#O%&*=o ", +" o,>:-+@#O%&:-+@#O%&o ", +" o21,>:-+@#O%o ", +" o321,>:-+@#Oo ", +" ooooooooooooo ", +" " +}; diff --git a/Externals/wxWidgets3/art/paste.xpm b/Externals/wxWidgets3/art/paste.xpm index a2155a3e9b..2458378f86 100644 --- a/Externals/wxWidgets3/art/paste.xpm +++ b/Externals/wxWidgets3/art/paste.xpm @@ -1,46 +1,46 @@ -/* XPM */ -static const char *const paste_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 25 1", -"< c #FEECE4", -"> c #FEE3D7", -"O c #FFFFFF", -"o c #7B767D", -"% c #F79586", -"& c #CAE1F3", -"@ c #F08B62", -"# c #FCCBB8", -"- c #FDD8C9", -"4 c #FFF8F4", -"5 c #FFF5F0", -" c None", -"$ c #F8AA8F", -", c #EFF6FC", -"1 c #F7FBFD", -"2 c #FAFCFE", -"; c #DAEAF7", -": c #E9F3FA", -"6 c #FFFAF8", -". c #3C78A6", -"3 c #FFF1ED", -"X c #9B8687", -"+ c #FBBCA4", -"* c #B6D5EE", -"= c #F4F9FD", -/* pixels */ -" ...... ", -" .XoOOOOoo. ", -".+XOOOOOOX@. ", -".+XXXXXXXX@. ", -".#++$$%@..... ", -".##++$$%.&*.=. ", -".-##++$$.;&.==. ", -".--##++$.:;.... ", -".>--##++.,:;&*. ", -".<>--##+.1,:;&. ", -".<<>--##.21,:;. ", -".3<<>--#.O21=:. ", -".45<<>--....... ", -".6453<>----. ", -"............ " -}; +/* XPM */ +static const char *const paste_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 25 1", +"< c #FEECE4", +"> c #FEE3D7", +"O c #FFFFFF", +"o c #7B767D", +"% c #F79586", +"& c #CAE1F3", +"@ c #F08B62", +"# c #FCCBB8", +"- c #FDD8C9", +"4 c #FFF8F4", +"5 c #FFF5F0", +" c None", +"$ c #F8AA8F", +", c #EFF6FC", +"1 c #F7FBFD", +"2 c #FAFCFE", +"; c #DAEAF7", +": c #E9F3FA", +"6 c #FFFAF8", +". c #3C78A6", +"3 c #FFF1ED", +"X c #9B8687", +"+ c #FBBCA4", +"* c #B6D5EE", +"= c #F4F9FD", +/* pixels */ +" ...... ", +" .XoOOOOoo. ", +".+XOOOOOOX@. ", +".+XXXXXXXX@. ", +".#++$$%@..... ", +".##++$$%.&*.=. ", +".-##++$$.;&.==. ", +".--##++$.:;.... ", +".>--##++.,:;&*. ", +".<>--##+.1,:;&. ", +".<<>--##.21,:;. ", +".3<<>--#.O21=:. ", +".45<<>--....... ", +".6453<>----. ", +"............ " +}; diff --git a/Externals/wxWidgets3/art/print.xpm b/Externals/wxWidgets3/art/print.xpm index 9afe540134..dbdfe6b4d9 100644 --- a/Externals/wxWidgets3/art/print.xpm +++ b/Externals/wxWidgets3/art/print.xpm @@ -1,60 +1,60 @@ -/* XPM */ -static const char *const print_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 39 1", -"< c #E3E4E6", -"+ c #C3C3C4", -"i c #FFFFFF", -": c #74879B", -"# c #5A89A6", -"a c #F1F4F7", -"r c #5A809C", -"@ c #BDCCD9", -"e c #7A92A4", -"% c #3F6F93", -"t c #9FA2A6", -"3 c #939495", -"w c #5F666D", -"9 c #65839E", -"5 c #4A7291", -"$ c #4B7F9E", -" c None", -"O c #DFE0E2", -"o c #F3F3F3", -"; c #84A5BB", -"& c #467291", -". c #7897AD", -"* c #407598", -"4 c #CFCFD0", -"7 c #6F90A6", -"y c #6A89A2", -"0 c #AAADB2", -"1 c #D2D3D4", -"u c #4F7592", -", c #BCBDBE", -"p c #57778E", -"q c #979BA0", -"2 c #ABABAC", -"- c #E7E7E7", -"= c #D6DEE6", -"> c #9FA0A0", -"8 c #829EB5", -"X c #8FB0C3", -"6 c #5D7C93", -/* pixels */ -" .XXXXXXXX ", -" .oooooooX ", -" .OOOOOOOX ", -" .+++++++X ", -"@##$%&&&&&%*##@ ", -"$=-;:>,<123$-=$ ", -".44.5678.96$44. ", -"7,,,,,,,,,,,,,7 ", -"900qwwwwwwwe009 ", -"rtt9ryyyyyyuttr ", -"6qq6iiiiiii%qq6 ", -"633paiiiiii%336 ", -"XXX*iiiiiii%XXX ", -" 6iiiiiii% ", -" $XXXXXXX# " -}; +/* XPM */ +static const char *const print_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 39 1", +"< c #E3E4E6", +"+ c #C3C3C4", +"i c #FFFFFF", +": c #74879B", +"# c #5A89A6", +"a c #F1F4F7", +"r c #5A809C", +"@ c #BDCCD9", +"e c #7A92A4", +"% c #3F6F93", +"t c #9FA2A6", +"3 c #939495", +"w c #5F666D", +"9 c #65839E", +"5 c #4A7291", +"$ c #4B7F9E", +" c None", +"O c #DFE0E2", +"o c #F3F3F3", +"; c #84A5BB", +"& c #467291", +". c #7897AD", +"* c #407598", +"4 c #CFCFD0", +"7 c #6F90A6", +"y c #6A89A2", +"0 c #AAADB2", +"1 c #D2D3D4", +"u c #4F7592", +", c #BCBDBE", +"p c #57778E", +"q c #979BA0", +"2 c #ABABAC", +"- c #E7E7E7", +"= c #D6DEE6", +"> c #9FA0A0", +"8 c #829EB5", +"X c #8FB0C3", +"6 c #5D7C93", +/* pixels */ +" .XXXXXXXX ", +" .oooooooX ", +" .OOOOOOOX ", +" .+++++++X ", +"@##$%&&&&&%*##@ ", +"$=-;:>,<123$-=$ ", +".44.5678.96$44. ", +"7,,,,,,,,,,,,,7 ", +"900qwwwwwwwe009 ", +"rtt9ryyyyyyuttr ", +"6qq6iiiiiii%qq6 ", +"633paiiiiii%336 ", +"XXX*iiiiiii%XXX ", +" 6iiiiiii% ", +" $XXXXXXX# " +}; diff --git a/Externals/wxWidgets3/art/quit.xpm b/Externals/wxWidgets3/art/quit.xpm index df8abd675d..885bbd0fa4 100644 --- a/Externals/wxWidgets3/art/quit.xpm +++ b/Externals/wxWidgets3/art/quit.xpm @@ -1,90 +1,90 @@ -/* XPM */ -static const char *const quit_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 69 1", -"@ c Black", -"i c #9AEA53", -"D c #7E9BB1", -"H c #839FB4", -", c #B7C7D3", -"8 c #BCCBD6", -"7 c #C1CFDA", -"v c #92ABBD", -"- c #D0DBE2", -"O c #547897", -"+ c #376485", -"L c #7090A8", -"t c #AEC0CE", -"g c #B3C4D1", -"S c #84A0B4", -"G c #89A4B8", -"> c #BDCCD7", -"F c #5A809C", -"2 c #C2D0DA", -"k c #93ACBE", -"= c #D6E0E6", -"* c #446A8C", -"z c #A5B9C8", -"# c #DEE5EB", -"0 c #AFC1CE", -"r c #B4C5D2", -"p c #B9C9D5", -"A c #8AA5B8", -"M c #92AABD", -"j c #A6BAC9", -"K c #7796AC", -"l c #ABBECC", -"o c #E4EAEF", -"9 c #B5C6D2", -" c None", -"; c #C9D6DF", -"X c #305F81", -"m c #98AFC0", -"V c #9DB3C3", -"% c #D1DBE3", -"u c #A2B7C6", -"y c #A7BBCA", -"h c #ACBFCD", -"4 c #B6C7D3", -"w c #C0CFD9", -"d c #982106", -"B c #85A0B5", -"6 c #C8D4DE", -"c c #99B0C1", -"x c #9EB4C4", -"$ c #D7E0E7", -"q c #A8BCCA", -"s c #ADC0CD", -"3 c #BCCCD7", -"N c #8BA5B9", -": c #C4D1DB", -"1 c #C9D5DE", -"f c #9AB1C2", -"n c #A4B9C8", -"a c #B3C5D1", -". c #215579", -"J c #7D9AB0", -"& c #829EB5", -"e c #BBCAD6", -"b c #8CA6B9", -"Z c #91AABC", -"C c #96AEC0", -"< c #CFDAE2", -"5 c #AFC2CF", -/* pixels */ -" ..XXXXXXXXXX ", -" XoO+X@@@@@@X ", -" X#$%&X*@@@@X ", -" X=-;:>,X@@@X ", -" X<12345X@@@X ", -" X67890qX@XXX ", -" XwertyuX@XiX ", -" XpasddfX++iiX ", -" XghjddkXiiiiiX ", -" XlzxcvbXiiiiiiX", -" XnxmMNBXiiiiiX ", -" XVCZASDXXXiiX ", -" XXFGHJKX XiX ", -" FXXFLX XX ", -" XX* " -}; +/* XPM */ +static const char *const quit_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 69 1", +"@ c Black", +"i c #9AEA53", +"D c #7E9BB1", +"H c #839FB4", +", c #B7C7D3", +"8 c #BCCBD6", +"7 c #C1CFDA", +"v c #92ABBD", +"- c #D0DBE2", +"O c #547897", +"+ c #376485", +"L c #7090A8", +"t c #AEC0CE", +"g c #B3C4D1", +"S c #84A0B4", +"G c #89A4B8", +"> c #BDCCD7", +"F c #5A809C", +"2 c #C2D0DA", +"k c #93ACBE", +"= c #D6E0E6", +"* c #446A8C", +"z c #A5B9C8", +"# c #DEE5EB", +"0 c #AFC1CE", +"r c #B4C5D2", +"p c #B9C9D5", +"A c #8AA5B8", +"M c #92AABD", +"j c #A6BAC9", +"K c #7796AC", +"l c #ABBECC", +"o c #E4EAEF", +"9 c #B5C6D2", +" c None", +"; c #C9D6DF", +"X c #305F81", +"m c #98AFC0", +"V c #9DB3C3", +"% c #D1DBE3", +"u c #A2B7C6", +"y c #A7BBCA", +"h c #ACBFCD", +"4 c #B6C7D3", +"w c #C0CFD9", +"d c #982106", +"B c #85A0B5", +"6 c #C8D4DE", +"c c #99B0C1", +"x c #9EB4C4", +"$ c #D7E0E7", +"q c #A8BCCA", +"s c #ADC0CD", +"3 c #BCCCD7", +"N c #8BA5B9", +": c #C4D1DB", +"1 c #C9D5DE", +"f c #9AB1C2", +"n c #A4B9C8", +"a c #B3C5D1", +". c #215579", +"J c #7D9AB0", +"& c #829EB5", +"e c #BBCAD6", +"b c #8CA6B9", +"Z c #91AABC", +"C c #96AEC0", +"< c #CFDAE2", +"5 c #AFC2CF", +/* pixels */ +" ..XXXXXXXXXX ", +" XoO+X@@@@@@X ", +" X#$%&X*@@@@X ", +" X=-;:>,X@@@X ", +" X<12345X@@@X ", +" X67890qX@XXX ", +" XwertyuX@XiX ", +" XpasddfX++iiX ", +" XghjddkXiiiiiX ", +" XlzxcvbXiiiiiiX", +" XnxmMNBXiiiiiX ", +" XVCZASDXXXiiX ", +" XXFGHJKX XiX ", +" FXXFLX XX ", +" XX* " +}; diff --git a/Externals/wxWidgets3/art/redo.xpm b/Externals/wxWidgets3/art/redo.xpm index d20afdcc8c..84ed3553ca 100644 --- a/Externals/wxWidgets3/art/redo.xpm +++ b/Externals/wxWidgets3/art/redo.xpm @@ -1,58 +1,58 @@ -/* XPM */ -static const char *const redo_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 37 1", -"4 c #9BACC2", -"; c #4C7398", -"3 c #547B99", -"* c #547897", -"# c #5A89A6", -"8 c #3A749C", -"5 c #5A809C", -", c #7F99B4", -"& c #3F6F93", -"9 c #85A7BC", -"+ c #749BB4", -"> c #718BA7", -"e c #A5B3C8", -"w c #BECAD9", -": c #65839D", -"u c #E1E6EE", -"o c #236289", -"r c #ADBED2", -"= c #597B9A", -"2 c #8DA0B9", -" c None", -"% c #467291", -"1 c #7393AB", -"i c #4C809F", -"- c #A0BACB", -"O c #6591AE", -"X c #407598", -"6 c #6F90A6", -"t c #D2D9E0", -"7 c #ADBACE", -"@ c #326A8F", -"0 c #467A9C", -". c #ACC4D3", -"< c #7F97B0", -"y c #B3BFD1", -"q c #A2B3C5", -"$ c #8FB0C3", -/* pixels */ -" .XoooO ", -" +o@@@@@o# +", -" $@%%&@&%%&@ +o", -" X*=@+-+@*=;@#&@", -" @:=+ @=:=*:@", -" &>:$ @:>>>@", -" &,,,,&", -" +123 @<2222&", -" X44X #@56<44X", -" O1748 .9#&o", -" 0qwe8 ", -" 8rty8 ", -" 8wu+ ", -" i## ", -" " -}; +/* XPM */ +static const char *const redo_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 37 1", +"4 c #9BACC2", +"; c #4C7398", +"3 c #547B99", +"* c #547897", +"# c #5A89A6", +"8 c #3A749C", +"5 c #5A809C", +", c #7F99B4", +"& c #3F6F93", +"9 c #85A7BC", +"+ c #749BB4", +"> c #718BA7", +"e c #A5B3C8", +"w c #BECAD9", +": c #65839D", +"u c #E1E6EE", +"o c #236289", +"r c #ADBED2", +"= c #597B9A", +"2 c #8DA0B9", +" c None", +"% c #467291", +"1 c #7393AB", +"i c #4C809F", +"- c #A0BACB", +"O c #6591AE", +"X c #407598", +"6 c #6F90A6", +"t c #D2D9E0", +"7 c #ADBACE", +"@ c #326A8F", +"0 c #467A9C", +". c #ACC4D3", +"< c #7F97B0", +"y c #B3BFD1", +"q c #A2B3C5", +"$ c #8FB0C3", +/* pixels */ +" .XoooO ", +" +o@@@@@o# +", +" $@%%&@&%%&@ +o", +" X*=@+-+@*=;@#&@", +" @:=+ @=:=*:@", +" &>:$ @:>>>@", +" &,,,,&", +" +123 @<2222&", +" X44X #@56<44X", +" O1748 .9#&o", +" 0qwe8 ", +" 8rty8 ", +" 8wu+ ", +" i## ", +" " +}; diff --git a/Externals/wxWidgets3/art/removable.xpm b/Externals/wxWidgets3/art/removable.xpm index 5b1d46b7dd..e066fd4df7 100644 --- a/Externals/wxWidgets3/art/removable.xpm +++ b/Externals/wxWidgets3/art/removable.xpm @@ -1,44 +1,44 @@ -/* XPM */ -static const char *const removable_xpm[] = { -/* columns rows colors chars-per-pixel */ -"16 15 23 1", -"@ c #C3C3C4", -"4 c #FFFFFF", -"o c #D5D6D8", -"> c #7A92A3", -". c #8497A5", -"% c #ACAEB2", -"2 c #4A7898", -": c #DCE2EA", -", c #F5F6F7", -"= c #EBEBEC", -"$ c #B7B7B8", -" c None", -"X c #DFE0E2", -"* c #A6A8AD", -"1 c #4C809F", -"3 c #407598", -"O c #CFCFD0", -"; c #9EA2A8", -"# c #BCBDBE", -"+ c #C6C8CA", -"- c #979BA0", -"& c #E7E7E7", -"< c #8FB0C3", -/* pixels */ -" ......... ", -" .XoO+@#$%. ", -" .XoO+@#$%. ", -" .&XoO+@#$%*. ", -" .&XoO+@#$%*. ", -" .=&XoO+@#$%*-. ", -" .=&XoO+@#$%*;. ", -".:=&XoO+@#$%*;>.", -".,=&XoO+@#$%*;-.", -"<..............<", -"<,=&XoO+@#$%%%%.", -" c #7A92A3", +". c #8497A5", +"% c #ACAEB2", +"2 c #4A7898", +": c #DCE2EA", +", c #F5F6F7", +"= c #EBEBEC", +"$ c #B7B7B8", +" c None", +"X c #DFE0E2", +"* c #A6A8AD", +"1 c #4C809F", +"3 c #407598", +"O c #CFCFD0", +"; c #9EA2A8", +"# c #BCBDBE", +"+ c #C6C8CA", +"- c #979BA0", +"& c #E7E7E7", +"< c #8FB0C3", +/* pixels */ +" ......... ", +" .XoO+@#$%. ", +" .XoO+@#$%. ", +" .&XoO+@#$%*. ", +" .&XoO+@#$%*. ", +" .=&XoO+@#$%*-. ", +" .=&XoO+@#$%*;. ", +".:=&XoO+@#$%*;>.", +".,=&XoO+@#$%*;-.", +"<..............<", +"<,=&XoO+@#$%%%%.", +" c #718BA7", -"0 c #A5B3C8", -"q c #BECAD9", -": c #65839D", -"u c #E1E6EE", -"X c #236289", -"y c #ADBED2", -"= c #597B9A", -"1 c #8DA0B9", -" c None", -"% c #467291", -"3 c #7393AB", -"i c #4C809F", -"; c #A0BACB", -". c #6591AE", -"o c #407598", -"5 c #6F90A6", -"t c #D2D9E0", -"9 c #ADBACE", -"# c #326A8F", -"e c #467A9C", -"O c #ACC4D3", -"< c #7F97B0", -"r c #B3BFD1", -"w c #A2B3C5", -"& c #8FB0C3", -/* pixels */ -" .XXXoO ", -"+ @X#####X+ ", -"X+ #$%%$#$%%#& ", -"#$@#*=-#+;+#=-o ", -"#:-=:=# +=:# ", -"#>>>:# &:>$ ", -"$,,,>o o<,$ ", -"$1111<# 213+ ", -"o44<56#@ o44o ", -"X$@7O 8493. ", -" 80qwe ", -" 8rty8 ", -" +uq8 ", -" @@i ", -" " -}; +/* XPM */ +static const char *const undo_xpm[] = { +/* columns rows colors chars-per-pixel */ +"16 15 37 1", +"4 c #9BACC2", +"* c #4C7398", +"2 c #547B99", +"- c #547897", +"@ c #5A89A6", +"8 c #3A749C", +"6 c #5A809C", +", c #7F99B4", +"$ c #3F6F93", +"7 c #85A7BC", +"+ c #749BB4", +"> c #718BA7", +"0 c #A5B3C8", +"q c #BECAD9", +": c #65839D", +"u c #E1E6EE", +"X c #236289", +"y c #ADBED2", +"= c #597B9A", +"1 c #8DA0B9", +" c None", +"% c #467291", +"3 c #7393AB", +"i c #4C809F", +"; c #A0BACB", +". c #6591AE", +"o c #407598", +"5 c #6F90A6", +"t c #D2D9E0", +"9 c #ADBACE", +"# c #326A8F", +"e c #467A9C", +"O c #ACC4D3", +"< c #7F97B0", +"r c #B3BFD1", +"w c #A2B3C5", +"& c #8FB0C3", +/* pixels */ +" .XXXoO ", +"+ @X#####X+ ", +"X+ #$%%$#$%%#& ", +"#$@#*=-#+;+#=-o ", +"#:-=:=# +=:# ", +"#>>>:# &:>$ ", +"$,,,>o o<,$ ", +"$1111<# 213+ ", +"o44<56#@ o44o ", +"X$@7O 8493. ", +" 80qwe ", +" 8rty8 ", +" +uq8 ", +" @@i ", +" " +}; diff --git a/Externals/wxWidgets3/art/up.xpm b/Externals/wxWidgets3/art/up.xpm index a93009f95c..f29ed3d386 100644 --- a/Externals/wxWidgets3/art/up.xpm +++ b/Externals/wxWidgets3/art/up.xpm @@ -1,21 +1,21 @@ -/* XPM */ -static const char *const up_xpm[] = { -"16 15 3 1", -" c None", -". c Black", -"X c Gray100", -" ", -" .. ", -" .XX. ", -" .XXXX. ", -" .XXXXXX. ", -" .XXXXXXXX. ", -" ....XXXX.... ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" ...... ", -" "}; +/* XPM */ +static const char *const up_xpm[] = { +"16 15 3 1", +" c None", +". c Black", +"X c Gray100", +" ", +" .. ", +" .XX. ", +" .XXXX. ", +" .XXXXXX. ", +" .XXXXXXXX. ", +" ....XXXX.... ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" .XXXX. ", +" ...... ", +" "}; diff --git a/Externals/wxWidgets3/art/wxwin16x16.xpm b/Externals/wxWidgets3/art/wxwin16x16.xpm index ed1848ea75..119185329a 100644 --- a/Externals/wxWidgets3/art/wxwin16x16.xpm +++ b/Externals/wxWidgets3/art/wxwin16x16.xpm @@ -1,161 +1,161 @@ -/* XPM */ -static const char *const wxwin16x16_xpm[] = { -"16 16 142 2", -" c None", -". c #7171C0", -"+ c #7D7DC7", -"@ c #8181CE", -"# c #7979CE", -"$ c #7171CE", -"% c #6868CD", -"& c #5050C0", -"* c #7C7CCB", -"= c #D3D3FC", -"- c #C0C0FF", -"; c #B1B1FF", -"> c #A4A4FF", -", c #9696FF", -"' c #6B6BE3", -") c #3E3EC0", -"! c #7B7BD3", -"~ c #CFCFFF", -"{ c #A7A7FF", -"] c #8989FF", -"^ c #7B7BFF", -"/ c #5E5EEB", -"( c #3333BF", -"_ c #6969D3", -": c #BEBEFF", -"< c #8E8EFF", -"[ c #5E5EFF", -"} c #4C4CFD", -"| c #6464C6", -"1 c #A4A478", -"2 c #BFBF63", -"3 c #BFBF5C", -"4 c #BFBF56", -"5 c #BFBF51", -"6 c #C17474", -"7 c #BF7070", -"8 c #BF6969", -"9 c #BF6363", -"0 c #544AC7", -"a c #A8A8FF", -"b c #7070FF", -"c c #5050FF", -"d c #3F3FFF", -"e c #8C8CBA", -"f c #F6F6C8", -"g c #FBFBBB", -"h c #FBFBAE", -"i c #FBFBA1", -"j c #F9F993", -"k c #D7D760", -"l c #D28D8D", -"m c #EEB8B8", -"n c #EFAAAA", -"o c #EF9E9E", -"p c #7C5ABC", -"q c #8D8DFF", -"r c #4747FF", -"s c #3535FF", -"t c #2B2BFF", -"u c #AAAAA7", -"v c #FFFFD2", -"w c #FFFFA9", -"x c #FFFF9A", -"y c #FFFF8D", -"z c #FFFF80", -"A c #E4E45B", -"B c #E39F9F", -"C c #FFCCCC", -"D c #FFA9A9", -"E c #FF9C9C", -"F c #B469A0", -"G c #3E3DE7", -"H c #2828EF", -"I c #1E1EEF", -"J c #1515EF", -"K c #A5A595", -"L c #FFFFC2", -"M c #FFFF8F", -"N c #F7F765", -"O c #F2F251", -"P c #DBDB3A", -"Q c #E48E8E", -"R c #FFBABA", -"S c #FF8E8E", -"T c #FF8181", -"U c #FF6868", -"V c #E54D60", -"W c #AC2E56", -"X c #0B0BBF", -"Y c #0606BF", -"Z c #C8C85D", -"` c #FEFEB1", -" . c #FEFE74", -".. c #F4F456", -"+. c #EFEF42", -"@. c #EFEF38", -"#. c #D7D725", -"$. c #E47676", -"%. c #FFA8A8", -"&. c #FF7373", -"*. c #FF5555", -"=. c #FF4343", -"-. c #FF3939", -";. c #DA2323", -">. c #CFCF3C", -",. c #F6F694", -"'. c #F0F047", -"). c #EFEF2E", -"!. c #EFEF24", -"~. c #D7D715", -"{. c #E45757", -"]. c #FF8888", -"^. c #FF4646", -"/. c #FF2F2F", -"(. c #FF2525", -"_. c #DA1414", -":. c #C3C328", -"<. c #EBEB55", -"[. c #ECEC2F", -"}. c #ECEC24", -"|. c #ECEC1A", -"1. c #EBEB10", -"2. c #CDCD06", -"3. c #DD3A3A", -"4. c #FF6060", -"5. c #FF1B1B", -"6. c #FE1111", -"7. c #D10707", -"8. c #B8B819", -"9. c #B7B715", -"0. c #B7B710", -"a. c #B7B70B", -"b. c #B7B706", -"c. c #B7B701", -"d. c #B7B700", -"e. c #BF1A1A", -"f. c #CC1919", -"g. c #CE1414", -"h. c #CE0E0E", -"i. c #CE0808", -"j. c #C90202", -"k. c #C00000", -" ", -" ", -" . + @ # $ % & ", -" * = - ; > , ' ) ", -" ! ~ { , ] ^ / ( ", -" _ : < ^ [ } | 1 2 3 4 5 ", -"6 7 8 9 0 a b c d e f g h i j k ", -"l m n o p q r s t u v w x y z A ", -"B C D E F G H I J K L M z N O P ", -"Q R S T U V W X Y Z ` ...+.@.#.", -"$.%.&.*.=.-.;. >.,.'.@.).!.~.", -"{.].^.-./.(._. :.<.[.}.|.1.2.", -"3.4./.(.5.6.7. 8.9.0.a.b.c.d.", -"e.f.g.h.i.j.k. ", -" ", -" "}; +/* XPM */ +static const char *const wxwin16x16_xpm[] = { +"16 16 142 2", +" c None", +". c #7171C0", +"+ c #7D7DC7", +"@ c #8181CE", +"# c #7979CE", +"$ c #7171CE", +"% c #6868CD", +"& c #5050C0", +"* c #7C7CCB", +"= c #D3D3FC", +"- c #C0C0FF", +"; c #B1B1FF", +"> c #A4A4FF", +", c #9696FF", +"' c #6B6BE3", +") c #3E3EC0", +"! c #7B7BD3", +"~ c #CFCFFF", +"{ c #A7A7FF", +"] c #8989FF", +"^ c #7B7BFF", +"/ c #5E5EEB", +"( c #3333BF", +"_ c #6969D3", +": c #BEBEFF", +"< c #8E8EFF", +"[ c #5E5EFF", +"} c #4C4CFD", +"| c #6464C6", +"1 c #A4A478", +"2 c #BFBF63", +"3 c #BFBF5C", +"4 c #BFBF56", +"5 c #BFBF51", +"6 c #C17474", +"7 c #BF7070", +"8 c #BF6969", +"9 c #BF6363", +"0 c #544AC7", +"a c #A8A8FF", +"b c #7070FF", +"c c #5050FF", +"d c #3F3FFF", +"e c #8C8CBA", +"f c #F6F6C8", +"g c #FBFBBB", +"h c #FBFBAE", +"i c #FBFBA1", +"j c #F9F993", +"k c #D7D760", +"l c #D28D8D", +"m c #EEB8B8", +"n c #EFAAAA", +"o c #EF9E9E", +"p c #7C5ABC", +"q c #8D8DFF", +"r c #4747FF", +"s c #3535FF", +"t c #2B2BFF", +"u c #AAAAA7", +"v c #FFFFD2", +"w c #FFFFA9", +"x c #FFFF9A", +"y c #FFFF8D", +"z c #FFFF80", +"A c #E4E45B", +"B c #E39F9F", +"C c #FFCCCC", +"D c #FFA9A9", +"E c #FF9C9C", +"F c #B469A0", +"G c #3E3DE7", +"H c #2828EF", +"I c #1E1EEF", +"J c #1515EF", +"K c #A5A595", +"L c #FFFFC2", +"M c #FFFF8F", +"N c #F7F765", +"O c #F2F251", +"P c #DBDB3A", +"Q c #E48E8E", +"R c #FFBABA", +"S c #FF8E8E", +"T c #FF8181", +"U c #FF6868", +"V c #E54D60", +"W c #AC2E56", +"X c #0B0BBF", +"Y c #0606BF", +"Z c #C8C85D", +"` c #FEFEB1", +" . c #FEFE74", +".. c #F4F456", +"+. c #EFEF42", +"@. c #EFEF38", +"#. c #D7D725", +"$. c #E47676", +"%. c #FFA8A8", +"&. c #FF7373", +"*. c #FF5555", +"=. c #FF4343", +"-. c #FF3939", +";. c #DA2323", +">. c #CFCF3C", +",. c #F6F694", +"'. c #F0F047", +"). c #EFEF2E", +"!. c #EFEF24", +"~. c #D7D715", +"{. c #E45757", +"]. c #FF8888", +"^. c #FF4646", +"/. c #FF2F2F", +"(. c #FF2525", +"_. c #DA1414", +":. c #C3C328", +"<. c #EBEB55", +"[. c #ECEC2F", +"}. c #ECEC24", +"|. c #ECEC1A", +"1. c #EBEB10", +"2. c #CDCD06", +"3. c #DD3A3A", +"4. c #FF6060", +"5. c #FF1B1B", +"6. c #FE1111", +"7. c #D10707", +"8. c #B8B819", +"9. c #B7B715", +"0. c #B7B710", +"a. c #B7B70B", +"b. c #B7B706", +"c. c #B7B701", +"d. c #B7B700", +"e. c #BF1A1A", +"f. c #CC1919", +"g. c #CE1414", +"h. c #CE0E0E", +"i. c #CE0808", +"j. c #C90202", +"k. c #C00000", +" ", +" ", +" . + @ # $ % & ", +" * = - ; > , ' ) ", +" ! ~ { , ] ^ / ( ", +" _ : < ^ [ } | 1 2 3 4 5 ", +"6 7 8 9 0 a b c d e f g h i j k ", +"l m n o p q r s t u v w x y z A ", +"B C D E F G H I J K L M z N O P ", +"Q R S T U V W X Y Z ` ...+.@.#.", +"$.%.&.*.=.-.;. >.,.'.@.).!.~.", +"{.].^.-./.(._. :.<.[.}.|.1.2.", +"3.4./.(.5.6.7. 8.9.0.a.b.c.d.", +"e.f.g.h.i.j.k. ", +" ", +" "}; diff --git a/Externals/wxWidgets3/art/wxwin32x32.xpm b/Externals/wxWidgets3/art/wxwin32x32.xpm index 25aed5e590..d318f0aadb 100644 --- a/Externals/wxWidgets3/art/wxwin32x32.xpm +++ b/Externals/wxWidgets3/art/wxwin32x32.xpm @@ -1,442 +1,442 @@ -/* XPM */ -static const char *const wxwin32x32_xpm[] = { -"32 32 407 2", -" c None", -". c #7373C1", -"+ c #6E6EBF", -"@ c #6B6BBF", -"# c #6868BF", -"$ c #6464BF", -"% c #6161BF", -"& c #5E5EBF", -"* c #5A5ABF", -"= c #5959C0", -"- c #7171C0", -"; c #7272C1", -"> c #8686CE", -", c #8686D0", -"' c #8282D0", -") c #7D7DD0", -"! c #7979D0", -"~ c #7575D0", -"{ c #7171D0", -"] c #6D6DD0", -"^ c #6666CD", -"/ c #5151C1", -"( c #4C4CBF", -"_ c #7171C1", -": c #7272C2", -"< c #C1C1F2", -"[ c #D7D7FF", -"} c #C9C9FF", -"| c #C2C2FF", -"1 c #BBBBFF", -"2 c #B4B4FF", -"3 c #AEAEFF", -"4 c #A7A7FF", -"5 c #A0A0FF", -"6 c #9A9AFF", -"7 c #8484F2", -"8 c #4949C2", -"9 c #4444C1", -"0 c #6A6AC0", -"a c #8989D4", -"b c #DADAFF", -"c c #C0C0FF", -"d c #9393FF", -"e c #8C8CFF", -"f c #8686FF", -"g c #5454D4", -"h c #3E3EC0", -"i c #6363BF", -"j c #8686D8", -"k c #D4D4FF", -"l c #D2D2FF", -"m c #7F7FFF", -"n c #7878FF", -"o c #4F4FD7", -"p c #3737BF", -"q c #5C5CBF", -"r c #7D7DD8", -"s c #CCCCFF", -"t c #CACAFF", -"u c #A8A8FF", -"v c #7070FF", -"w c #6B6BFF", -"x c #4545D7", -"y c #3030BF", -"z c #5555BF", -"A c #7373D8", -"B c #C3C3FF", -"C c #9C9CFF", -"D c #8D8DFF", -"E c #7777FF", -"F c #6262FF", -"G c #5252FF", -"H c #4B4BFF", -"I c #4848FF", -"J c #3232D7", -"K c #2626BF", -"L c #4E4EBF", -"M c #6A6AD8", -"N c #B9B9FF", -"O c #9090FF", -"P c #6F6FFF", -"Q c #5555FF", -"R c #4646FF", -"S c #4B4BF5", -"T c #8282B4", -"U c #93938E", -"V c #B1B173", -"W c #BFBF68", -"X c #BFBF65", -"Y c #BFBF62", -"Z c #BFBF5E", -"` c #BFBF5B", -" . c #BFBF57", -".. c #BFBF54", -"+. c #BFBF51", -"@. c #5858D8", -"#. c #B2B2FF", -"$. c #B1B1FF", -"%. c #8484FF", -"&. c #7272FF", -"*. c #6767FF", -"=. c #4F4FFF", -"-. c #4747FF", -";. c #4242FF", -">. c #4141FA", -",. c #ABAB8A", -"'. c #E4E4AA", -"). c #F5F5C3", -"!. c #F6F6BE", -"~. c #F6F6B7", -"{. c #F6F6B1", -"]. c #F6F6AB", -"^. c #F6F6A5", -"/. c #F6F69E", -"(. c #F6F698", -"_. c #F1F18C", -":. c #D0D05F", -"<. c #BFBF48", -"[. c #C17474", -"}. c #C07171", -"|. c #BF6E6E", -"1. c #BF6B6B", -"2. c #BF6868", -"3. c #BF6464", -"4. c #BF6161", -"5. c #7C498C", -"6. c #4242D8", -"7. c #A4A4FF", -"8. c #5959FF", -"9. c #3D3DFF", -"0. c #3838FF", -"a. c #6666CA", -"b. c #DCDC98", -"c. c #FFFFDD", -"d. c #FFFFD7", -"e. c #FFFFC0", -"f. c #FFFFB8", -"g. c #FFFFB2", -"h. c #FFFFAB", -"i. c #FFFFA4", -"j. c #FFFF9D", -"k. c #FFFF97", -"l. c #FFFF90", -"m. c #FBFB85", -"n. c #C2C244", -"o. c #C37676", -"p. c #DA9B9B", -"q. c #DF9F9F", -"r. c #DF9A9A", -"s. c #DF9494", -"t. c #DF8F8F", -"u. c #DF8A8A", -"v. c #B47094", -"w. c #3B3BD8", -"x. c #9292FF", -"y. c #5656FF", -"z. c #3333FF", -"A. c #2E2EFF", -"B. c #7070B6", -"C. c #E7E79F", -"D. c #FFFFDE", -"E. c #FFFFCF", -"F. c #FFFFB5", -"G. c #FFFF9E", -"H. c #FFFF8A", -"I. c #FFFF83", -"J. c #FFFF7C", -"K. c #C8C843", -"L. c #C06D6D", -"M. c #F1BEBE", -"N. c #FFDBDB", -"O. c #FFCBCB", -"P. c #FFC0C0", -"Q. c #FFBABA", -"R. c #FFB3B3", -"S. c #FFACAC", -"T. c #CE89AC", -"U. c #3333D7", -"V. c #8787FF", -"W. c #4D4DFF", -"X. c #2929FF", -"Y. c #2424FF", -"Z. c #6B6BB3", -"`. c #E7E795", -" + c #FFFFC6", -".+ c #FFFFA8", -"++ c #FFFF76", -"@+ c #FFFF6F", -"#+ c #C8C83C", -"$+ c #C77474", -"%+ c #FFD3D3", -"&+ c #FFDEDE", -"*+ c #FFC4C4", -"=+ c #FFA6A6", -"-+ c #FF9F9F", -";+ c #F3929A", -">+ c #2F29C3", -",+ c #4C4CFB", -"'+ c #6868FF", -")+ c #3939FF", -"!+ c #1F1FFF", -"~+ c #1A1AFF", -"{+ c #6666B0", -"]+ c #E7E78A", -"^+ c #FFFFD0", -"/+ c #FFFFBD", -"(+ c #FFFF9B", -"_+ c #FFFF91", -":+ c #FAFA6E", -"<+ c #F5F55F", -"[+ c #F5F558", -"}+ c #F7F756", -"|+ c #C7C732", -"1+ c #C86E6E", -"2+ c #FFC9C9", -"3+ c #FFD7D7", -"4+ c #FFB8B8", -"5+ c #FF9898", -"6+ c #FF9292", -"7+ c #FF8B8B", -"8+ c #B16098", -"9+ c #2420C6", -"0+ c #2222DD", -"a+ c #1F1FDF", -"b+ c #1B1BDF", -"c+ c #1818DF", -"d+ c #1414DF", -"e+ c #1010DF", -"f+ c #0C0CDF", -"g+ c #5F5F9C", -"h+ c #E7E77F", -"i+ c #FFFFC9", -"j+ c #FFFFB4", -"k+ c #FFFF8E", -"l+ c #FFFF7D", -"m+ c #FEFE75", -"n+ c #F4F45D", -"o+ c #EFEF4F", -"p+ c #EFEF4A", -"q+ c #EFEF44", -"r+ c #EFEF3F", -"s+ c #BFBF22", -"t+ c #C86666", -"u+ c #FFBFBF", -"v+ c #FFD0D0", -"w+ c #FFADAD", -"x+ c #FF8484", -"y+ c #FF7E7E", -"z+ c #FF7373", -"A+ c #E75F70", -"B+ c #B0457F", -"C+ c #9A3776", -"D+ c #5F1D7C", -"E+ c #0C0CBF", -"F+ c #0909BF", -"G+ c #0707BF", -"H+ c #0404BF", -"I+ c #878766", -"J+ c #E6E674", -"K+ c #FFFFC2", -"L+ c #FFFF82", -"M+ c #FEFE6E", -"N+ c #F3F355", -"O+ c #EFEF45", -"P+ c #EFEF40", -"Q+ c #EFEF3B", -"R+ c #EFEF36", -"S+ c #BFBF1C", -"T+ c #C85F5F", -"U+ c #FFB4B4", -"V+ c #FFA2A2", -"W+ c #FF7575", -"X+ c #FF5E5E", -"Y+ c #FF5050", -"Z+ c #FF4A4A", -"`+ c #FF4545", -" @ c #E73535", -".@ c #BF2121", -"+@ c #B7B733", -"@@ c #DCDC55", -"#@ c #FDFDB7", -"$@ c #FFFFA2", -"%@ c #FFFF75", -"&@ c #FCFC64", -"*@ c #F2F24E", -"=@ c #EFEF31", -"-@ c #EFEF2C", -";@ c #BFBF16", -">@ c #C85656", -",@ c #FFAAAA", -"'@ c #FFC2C2", -")@ c #FF9797", -"!@ c #FF7777", -"~@ c #FF6E6E", -"{@ c #FF5454", -"]@ c #FF4040", -"^@ c #FF3B3B", -"/@ c #E72C2C", -"(@ c #BF1919", -"_@ c #B7B72E", -":@ c #DADA48", -"<@ c #F7F7A6", -"[@ c #F6F689", -"}@ c #F2F254", -"|@ c #EFEF27", -"1@ c #EFEF22", -"2@ c #BFBF10", -"3@ c #C84040", -"4@ c #FF9A9A", -"5@ c #FFBBBB", -"6@ c #FF7171", -"7@ c #FF6666", -"8@ c #FF4E4E", -"9@ c #FF4646", -"0@ c #FF4141", -"a@ c #FF3C3C", -"b@ c #FF3737", -"c@ c #FF3232", -"d@ c #E72424", -"e@ c #BF1414", -"f@ c #B7B729", -"g@ c #DADA3F", -"h@ c #F7F7A1", -"i@ c #F4F480", -"j@ c #F0F047", -"k@ c #EFEF1D", -"l@ c #EFEF18", -"m@ c #BFBF0B", -"n@ c #C83636", -"o@ c #FFABAB", -"p@ c #FF7676", -"q@ c #FF2D2D", -"r@ c #FF2828", -"s@ c #E71C1C", -"t@ c #BF0F0F", -"u@ c #B7B724", -"v@ c #D1D132", -"w@ c #F4F478", -"x@ c #EFEF13", -"y@ c #ECEC0E", -"z@ c #BABA05", -"A@ c #C83030", -"B@ c #FF6161", -"C@ c #FF2323", -"D@ c #FF1E1E", -"E@ c #E71414", -"F@ c #BF0A0A", -"G@ c #B8B820", -"H@ c #B9B91F", -"I@ c #DADA2C", -"J@ c #E9E931", -"K@ c #EAEA2A", -"L@ c #EAEA25", -"M@ c #EAEA20", -"N@ c #EAEA1C", -"O@ c #EAEA17", -"P@ c #EAEA12", -"Q@ c #EAEA0D", -"R@ c #E5E508", -"S@ c #C7C703", -"T@ c #B7B701", -"U@ c #C52929", -"V@ c #FF5858", -"W@ c #FF1919", -"X@ c #FF1414", -"Y@ c #E30C0C", -"Z@ c #BF0606", -"`@ c #B8B819", -" # c #B7B717", -".# c #B7B714", -"+# c #B7B711", -"@# c #B7B70F", -"## c #B7B70C", -"$# c #B7B70A", -"%# c #B7B707", -"&# c #B7B705", -"*# c #B7B702", -"=# c #B7B700", -"-# c #BF2020", -";# c #E63131", -"># c #FF5555", -",# c #FF3A3A", -"'# c #FF0F0F", -")# c #FA0A0A", -"!# c #C90303", -"~# c #C00202", -"{# c #C01C1C", -"]# c #CB1B1B", -"^# c #D01A1A", -"/# c #D01616", -"(# c #D01313", -"_# c #D01010", -":# c #D00D0D", -"<# c #D00A0A", -"[# c #D00707", -"}# c #CF0303", -"|# c #C30101", -"1# c #C00000", -"2# c #C21414", -"3# c #BF1111", -"4# c #BF0E0E", -"5# c #BF0C0C", -"6# c #BF0909", -"7# c #BF0707", -"8# c #BF0404", -"9# c #BF0202", -"0# c #C50000", -" ", -" ", -" ", -" ", -" . + @ # $ % & * = ", -" - ; > , ' ) ! ~ { ] ^ / ( ", -" _ : < [ } | 1 2 3 4 5 6 7 8 9 ", -" 0 a b b c 2 3 4 5 6 d e f g h ", -" i j k l 2 4 5 6 d e f m n o p ", -" q r s t u 6 d e f m n v w x y ", -" z A B | C D f m E F G H I J K ", -" L M 1 N O m n P Q H R S T U V W X Y Z ` ...+. ", -" p @.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.", -" [.}.|.1.2.3.4.5.6.6 7.&.8.I ;.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.", -"}.o.p.q.r.s.t.u.v.w.O x.y.;.9.0.z.A.B.C.D.E.F.h.i.G.k.l.H.I.J.K.", -"L.M.N.O.P.Q.R.S.T.U.V.e W.0.z.A.X.Y.Z.`.d. +.+G.k.l.H.I.J.++@+#+", -"$+%+&+*+R.S.=+-+;+>+,+'+)+A.X.Y.!+~+{+]+^+/+(+_+H.I.J.:+<+[+}+|+", -"1+2+3+4+=+-+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+I.l+m+n+o+p+q+r+s+", -"t+u+v+w+5+6+7+x+y+z+A+B+C+D+E+F+G+H+I+J+K+h.L+++M+N+p+O+P+Q+R+S+", -"T+U+2+V+7+x+y+W+X+Y+Z+`+ @.@ +@@@#@$@%@&@*@O+P+Q+R+=@-@;@", -">@,@'@)@y+!@~@{@Z+`+]@^@/@(@ _@:@<@[@}@O+P+Q+R+=@-@|@1@2@", -"3@4@5@7+6@7@8@9@0@a@b@c@d@e@ f@g@h@i@j@Q+R+=@-@|@1@k@l@m@", -"n@y+o@p@{@9@0@a@b@c@q@r@s@t@ u@v@i@w@Q+=@-@|@1@k@l@x@y@z@", -"A@p@-+B@0@a@b@c@q@r@C@D@E@F@ G@H@I@J@K@L@M@N@O@P@Q@R@S@T@", -"U@7@4@V@b@c@q@r@C@D@W@X@Y@Z@ `@ #.#+#@###$#%#&#*#=#=# ", -"-#;#>#,#q@r@C@D@W@X@'#)#!#~# ", -"{#(@]#^#/#(#_#:#<#[#}#|#1# ", -" 2#3#4#5#6#7#8#9#1#0# ", -" ", -" ", -" ", -" "}; +/* XPM */ +static const char *const wxwin32x32_xpm[] = { +"32 32 407 2", +" c None", +". c #7373C1", +"+ c #6E6EBF", +"@ c #6B6BBF", +"# c #6868BF", +"$ c #6464BF", +"% c #6161BF", +"& c #5E5EBF", +"* c #5A5ABF", +"= c #5959C0", +"- c #7171C0", +"; c #7272C1", +"> c #8686CE", +", c #8686D0", +"' c #8282D0", +") c #7D7DD0", +"! c #7979D0", +"~ c #7575D0", +"{ c #7171D0", +"] c #6D6DD0", +"^ c #6666CD", +"/ c #5151C1", +"( c #4C4CBF", +"_ c #7171C1", +": c #7272C2", +"< c #C1C1F2", +"[ c #D7D7FF", +"} c #C9C9FF", +"| c #C2C2FF", +"1 c #BBBBFF", +"2 c #B4B4FF", +"3 c #AEAEFF", +"4 c #A7A7FF", +"5 c #A0A0FF", +"6 c #9A9AFF", +"7 c #8484F2", +"8 c #4949C2", +"9 c #4444C1", +"0 c #6A6AC0", +"a c #8989D4", +"b c #DADAFF", +"c c #C0C0FF", +"d c #9393FF", +"e c #8C8CFF", +"f c #8686FF", +"g c #5454D4", +"h c #3E3EC0", +"i c #6363BF", +"j c #8686D8", +"k c #D4D4FF", +"l c #D2D2FF", +"m c #7F7FFF", +"n c #7878FF", +"o c #4F4FD7", +"p c #3737BF", +"q c #5C5CBF", +"r c #7D7DD8", +"s c #CCCCFF", +"t c #CACAFF", +"u c #A8A8FF", +"v c #7070FF", +"w c #6B6BFF", +"x c #4545D7", +"y c #3030BF", +"z c #5555BF", +"A c #7373D8", +"B c #C3C3FF", +"C c #9C9CFF", +"D c #8D8DFF", +"E c #7777FF", +"F c #6262FF", +"G c #5252FF", +"H c #4B4BFF", +"I c #4848FF", +"J c #3232D7", +"K c #2626BF", +"L c #4E4EBF", +"M c #6A6AD8", +"N c #B9B9FF", +"O c #9090FF", +"P c #6F6FFF", +"Q c #5555FF", +"R c #4646FF", +"S c #4B4BF5", +"T c #8282B4", +"U c #93938E", +"V c #B1B173", +"W c #BFBF68", +"X c #BFBF65", +"Y c #BFBF62", +"Z c #BFBF5E", +"` c #BFBF5B", +" . c #BFBF57", +".. c #BFBF54", +"+. c #BFBF51", +"@. c #5858D8", +"#. c #B2B2FF", +"$. c #B1B1FF", +"%. c #8484FF", +"&. c #7272FF", +"*. c #6767FF", +"=. c #4F4FFF", +"-. c #4747FF", +";. c #4242FF", +">. c #4141FA", +",. c #ABAB8A", +"'. c #E4E4AA", +"). c #F5F5C3", +"!. c #F6F6BE", +"~. c #F6F6B7", +"{. c #F6F6B1", +"]. c #F6F6AB", +"^. c #F6F6A5", +"/. c #F6F69E", +"(. c #F6F698", +"_. c #F1F18C", +":. c #D0D05F", +"<. c #BFBF48", +"[. c #C17474", +"}. c #C07171", +"|. c #BF6E6E", +"1. c #BF6B6B", +"2. c #BF6868", +"3. c #BF6464", +"4. c #BF6161", +"5. c #7C498C", +"6. c #4242D8", +"7. c #A4A4FF", +"8. c #5959FF", +"9. c #3D3DFF", +"0. c #3838FF", +"a. c #6666CA", +"b. c #DCDC98", +"c. c #FFFFDD", +"d. c #FFFFD7", +"e. c #FFFFC0", +"f. c #FFFFB8", +"g. c #FFFFB2", +"h. c #FFFFAB", +"i. c #FFFFA4", +"j. c #FFFF9D", +"k. c #FFFF97", +"l. c #FFFF90", +"m. c #FBFB85", +"n. c #C2C244", +"o. c #C37676", +"p. c #DA9B9B", +"q. c #DF9F9F", +"r. c #DF9A9A", +"s. c #DF9494", +"t. c #DF8F8F", +"u. c #DF8A8A", +"v. c #B47094", +"w. c #3B3BD8", +"x. c #9292FF", +"y. c #5656FF", +"z. c #3333FF", +"A. c #2E2EFF", +"B. c #7070B6", +"C. c #E7E79F", +"D. c #FFFFDE", +"E. c #FFFFCF", +"F. c #FFFFB5", +"G. c #FFFF9E", +"H. c #FFFF8A", +"I. c #FFFF83", +"J. c #FFFF7C", +"K. c #C8C843", +"L. c #C06D6D", +"M. c #F1BEBE", +"N. c #FFDBDB", +"O. c #FFCBCB", +"P. c #FFC0C0", +"Q. c #FFBABA", +"R. c #FFB3B3", +"S. c #FFACAC", +"T. c #CE89AC", +"U. c #3333D7", +"V. c #8787FF", +"W. c #4D4DFF", +"X. c #2929FF", +"Y. c #2424FF", +"Z. c #6B6BB3", +"`. c #E7E795", +" + c #FFFFC6", +".+ c #FFFFA8", +"++ c #FFFF76", +"@+ c #FFFF6F", +"#+ c #C8C83C", +"$+ c #C77474", +"%+ c #FFD3D3", +"&+ c #FFDEDE", +"*+ c #FFC4C4", +"=+ c #FFA6A6", +"-+ c #FF9F9F", +";+ c #F3929A", +">+ c #2F29C3", +",+ c #4C4CFB", +"'+ c #6868FF", +")+ c #3939FF", +"!+ c #1F1FFF", +"~+ c #1A1AFF", +"{+ c #6666B0", +"]+ c #E7E78A", +"^+ c #FFFFD0", +"/+ c #FFFFBD", +"(+ c #FFFF9B", +"_+ c #FFFF91", +":+ c #FAFA6E", +"<+ c #F5F55F", +"[+ c #F5F558", +"}+ c #F7F756", +"|+ c #C7C732", +"1+ c #C86E6E", +"2+ c #FFC9C9", +"3+ c #FFD7D7", +"4+ c #FFB8B8", +"5+ c #FF9898", +"6+ c #FF9292", +"7+ c #FF8B8B", +"8+ c #B16098", +"9+ c #2420C6", +"0+ c #2222DD", +"a+ c #1F1FDF", +"b+ c #1B1BDF", +"c+ c #1818DF", +"d+ c #1414DF", +"e+ c #1010DF", +"f+ c #0C0CDF", +"g+ c #5F5F9C", +"h+ c #E7E77F", +"i+ c #FFFFC9", +"j+ c #FFFFB4", +"k+ c #FFFF8E", +"l+ c #FFFF7D", +"m+ c #FEFE75", +"n+ c #F4F45D", +"o+ c #EFEF4F", +"p+ c #EFEF4A", +"q+ c #EFEF44", +"r+ c #EFEF3F", +"s+ c #BFBF22", +"t+ c #C86666", +"u+ c #FFBFBF", +"v+ c #FFD0D0", +"w+ c #FFADAD", +"x+ c #FF8484", +"y+ c #FF7E7E", +"z+ c #FF7373", +"A+ c #E75F70", +"B+ c #B0457F", +"C+ c #9A3776", +"D+ c #5F1D7C", +"E+ c #0C0CBF", +"F+ c #0909BF", +"G+ c #0707BF", +"H+ c #0404BF", +"I+ c #878766", +"J+ c #E6E674", +"K+ c #FFFFC2", +"L+ c #FFFF82", +"M+ c #FEFE6E", +"N+ c #F3F355", +"O+ c #EFEF45", +"P+ c #EFEF40", +"Q+ c #EFEF3B", +"R+ c #EFEF36", +"S+ c #BFBF1C", +"T+ c #C85F5F", +"U+ c #FFB4B4", +"V+ c #FFA2A2", +"W+ c #FF7575", +"X+ c #FF5E5E", +"Y+ c #FF5050", +"Z+ c #FF4A4A", +"`+ c #FF4545", +" @ c #E73535", +".@ c #BF2121", +"+@ c #B7B733", +"@@ c #DCDC55", +"#@ c #FDFDB7", +"$@ c #FFFFA2", +"%@ c #FFFF75", +"&@ c #FCFC64", +"*@ c #F2F24E", +"=@ c #EFEF31", +"-@ c #EFEF2C", +";@ c #BFBF16", +">@ c #C85656", +",@ c #FFAAAA", +"'@ c #FFC2C2", +")@ c #FF9797", +"!@ c #FF7777", +"~@ c #FF6E6E", +"{@ c #FF5454", +"]@ c #FF4040", +"^@ c #FF3B3B", +"/@ c #E72C2C", +"(@ c #BF1919", +"_@ c #B7B72E", +":@ c #DADA48", +"<@ c #F7F7A6", +"[@ c #F6F689", +"}@ c #F2F254", +"|@ c #EFEF27", +"1@ c #EFEF22", +"2@ c #BFBF10", +"3@ c #C84040", +"4@ c #FF9A9A", +"5@ c #FFBBBB", +"6@ c #FF7171", +"7@ c #FF6666", +"8@ c #FF4E4E", +"9@ c #FF4646", +"0@ c #FF4141", +"a@ c #FF3C3C", +"b@ c #FF3737", +"c@ c #FF3232", +"d@ c #E72424", +"e@ c #BF1414", +"f@ c #B7B729", +"g@ c #DADA3F", +"h@ c #F7F7A1", +"i@ c #F4F480", +"j@ c #F0F047", +"k@ c #EFEF1D", +"l@ c #EFEF18", +"m@ c #BFBF0B", +"n@ c #C83636", +"o@ c #FFABAB", +"p@ c #FF7676", +"q@ c #FF2D2D", +"r@ c #FF2828", +"s@ c #E71C1C", +"t@ c #BF0F0F", +"u@ c #B7B724", +"v@ c #D1D132", +"w@ c #F4F478", +"x@ c #EFEF13", +"y@ c #ECEC0E", +"z@ c #BABA05", +"A@ c #C83030", +"B@ c #FF6161", +"C@ c #FF2323", +"D@ c #FF1E1E", +"E@ c #E71414", +"F@ c #BF0A0A", +"G@ c #B8B820", +"H@ c #B9B91F", +"I@ c #DADA2C", +"J@ c #E9E931", +"K@ c #EAEA2A", +"L@ c #EAEA25", +"M@ c #EAEA20", +"N@ c #EAEA1C", +"O@ c #EAEA17", +"P@ c #EAEA12", +"Q@ c #EAEA0D", +"R@ c #E5E508", +"S@ c #C7C703", +"T@ c #B7B701", +"U@ c #C52929", +"V@ c #FF5858", +"W@ c #FF1919", +"X@ c #FF1414", +"Y@ c #E30C0C", +"Z@ c #BF0606", +"`@ c #B8B819", +" # c #B7B717", +".# c #B7B714", +"+# c #B7B711", +"@# c #B7B70F", +"## c #B7B70C", +"$# c #B7B70A", +"%# c #B7B707", +"&# c #B7B705", +"*# c #B7B702", +"=# c #B7B700", +"-# c #BF2020", +";# c #E63131", +"># c #FF5555", +",# c #FF3A3A", +"'# c #FF0F0F", +")# c #FA0A0A", +"!# c #C90303", +"~# c #C00202", +"{# c #C01C1C", +"]# c #CB1B1B", +"^# c #D01A1A", +"/# c #D01616", +"(# c #D01313", +"_# c #D01010", +":# c #D00D0D", +"<# c #D00A0A", +"[# c #D00707", +"}# c #CF0303", +"|# c #C30101", +"1# c #C00000", +"2# c #C21414", +"3# c #BF1111", +"4# c #BF0E0E", +"5# c #BF0C0C", +"6# c #BF0909", +"7# c #BF0707", +"8# c #BF0404", +"9# c #BF0202", +"0# c #C50000", +" ", +" ", +" ", +" ", +" . + @ # $ % & * = ", +" - ; > , ' ) ! ~ { ] ^ / ( ", +" _ : < [ } | 1 2 3 4 5 6 7 8 9 ", +" 0 a b b c 2 3 4 5 6 d e f g h ", +" i j k l 2 4 5 6 d e f m n o p ", +" q r s t u 6 d e f m n v w x y ", +" z A B | C D f m E F G H I J K ", +" L M 1 N O m n P Q H R S T U V W X Y Z ` ...+. ", +" p @.#.$.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.", +" [.}.|.1.2.3.4.5.6.6 7.&.8.I ;.9.0.a.b.c.d.e.f.g.h.i.j.k.l.m.n.", +"}.o.p.q.r.s.t.u.v.w.O x.y.;.9.0.z.A.B.C.D.E.F.h.i.G.k.l.H.I.J.K.", +"L.M.N.O.P.Q.R.S.T.U.V.e W.0.z.A.X.Y.Z.`.d. +.+G.k.l.H.I.J.++@+#+", +"$+%+&+*+R.S.=+-+;+>+,+'+)+A.X.Y.!+~+{+]+^+/+(+_+H.I.J.:+<+[+}+|+", +"1+2+3+4+=+-+5+6+7+8+9+0+a+b+c+d+e+f+g+h+i+j+k+I.l+m+n+o+p+q+r+s+", +"t+u+v+w+5+6+7+x+y+z+A+B+C+D+E+F+G+H+I+J+K+h.L+++M+N+p+O+P+Q+R+S+", +"T+U+2+V+7+x+y+W+X+Y+Z+`+ @.@ +@@@#@$@%@&@*@O+P+Q+R+=@-@;@", +">@,@'@)@y+!@~@{@Z+`+]@^@/@(@ _@:@<@[@}@O+P+Q+R+=@-@|@1@2@", +"3@4@5@7+6@7@8@9@0@a@b@c@d@e@ f@g@h@i@j@Q+R+=@-@|@1@k@l@m@", +"n@y+o@p@{@9@0@a@b@c@q@r@s@t@ u@v@i@w@Q+=@-@|@1@k@l@x@y@z@", +"A@p@-+B@0@a@b@c@q@r@C@D@E@F@ G@H@I@J@K@L@M@N@O@P@Q@R@S@T@", +"U@7@4@V@b@c@q@r@C@D@W@X@Y@Z@ `@ #.#+#@###$#%#&#*#=#=# ", +"-#;#>#,#q@r@C@D@W@X@'#)#!#~# ", +"{#(@]#^#/#(#_#:#<#[#}#|#1# ", +" 2#3#4#5#6#7#8#9#1#0# ", +" ", +" ", +" ", +" "}; diff --git a/Externals/wxWidgets3/build/msw/wx_base.vcxproj b/Externals/wxWidgets3/build/msw/wx_base.vcxproj index d99f6f8b94..4ec4c4d277 100644 --- a/Externals/wxWidgets3/build/msw/wx_base.vcxproj +++ b/Externals/wxWidgets3/build/msw/wx_base.vcxproj @@ -309,9 +309,11 @@ + + @@ -361,6 +363,7 @@ + @@ -381,6 +384,7 @@ + @@ -418,14 +422,21 @@ + + + + + + + @@ -479,6 +490,7 @@ + @@ -507,6 +519,7 @@ + @@ -543,6 +556,7 @@ + @@ -575,6 +589,7 @@ + @@ -627,9 +642,11 @@ + + @@ -696,6 +713,7 @@ + @@ -967,6 +985,7 @@ + @@ -984,6 +1003,7 @@ + @@ -1047,6 +1067,8 @@ + + @@ -1075,6 +1097,7 @@ true + @@ -1306,6 +1329,7 @@ + true @@ -1370,6 +1394,7 @@ + @@ -1462,6 +1487,7 @@ + @@ -1499,6 +1525,7 @@ + @@ -1512,6 +1539,7 @@ + @@ -1683,4 +1711,4 @@ - \ No newline at end of file + diff --git a/Externals/wxWidgets3/build/msw/wx_base.vcxproj.filters b/Externals/wxWidgets3/build/msw/wx_base.vcxproj.filters index e11b02d82e..7e91426bbc 100644 --- a/Externals/wxWidgets3/build/msw/wx_base.vcxproj.filters +++ b/Externals/wxWidgets3/build/msw/wx_base.vcxproj.filters @@ -678,12 +678,18 @@ Headers + + Headers + Headers Headers + + Headers + Headers @@ -768,6 +774,9 @@ Headers + + Headers + Headers @@ -876,6 +885,9 @@ Headers + + Headers + Headers @@ -972,6 +984,9 @@ Headers + + Headers + Headers @@ -1128,6 +1143,9 @@ Headers + + Headers + Headers @@ -1137,6 +1155,9 @@ Headers + + Headers + Headers @@ -1380,6 +1401,9 @@ Headers\MSW + + Headers\MSW + Headers\MSW @@ -1437,6 +1461,9 @@ Headers\MSW + + Headers\MSW + Headers\MSW @@ -1653,12 +1680,21 @@ Headers\MSW\private + + Headers\MSW + Headers\MSW\private Headers\MSW\private + + Headers\MSW\private + + + Headers\MSW\private + Headers\MSW\private @@ -1674,9 +1710,21 @@ Headers\MSW\private + + Headers\MSW + + + Headers\MSW + Headers\MSW\private + + Headers\MSW + + + Headers\MSW + Headers\MSW\private @@ -1686,6 +1734,9 @@ Headers\MSW + + Headers\MSW + Headers\MSW @@ -1955,6 +2006,9 @@ AUI + + AUI + AUI @@ -2390,6 +2444,9 @@ Common + + Common + Common @@ -2441,6 +2498,9 @@ Common + + Common + Common @@ -2648,6 +2708,9 @@ Common + + Common + Common @@ -2861,6 +2924,9 @@ Generic + + Generic + Generic @@ -2924,6 +2990,9 @@ Generic + + Generic + Generic @@ -3095,6 +3164,9 @@ MSW + + MSW + MSW @@ -3332,6 +3404,9 @@ MSW + + MSW + MSW @@ -3371,6 +3446,9 @@ MSW + + MSW + MSW @@ -3422,4 +3500,4 @@ MSW - \ No newline at end of file + diff --git a/Externals/wxWidgets3/build_wx.sh b/Externals/wxWidgets3/build_wx.sh index 82670d6e9f..39c7d97d29 100755 --- a/Externals/wxWidgets3/build_wx.sh +++ b/Externals/wxWidgets3/build_wx.sh @@ -1,6 +1,6 @@ #!/bin/bash -svn co -r 70933 http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets +svn co -r 74856 http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets cd wxWidgets case $OSTYPE in diff --git a/Externals/wxWidgets3/include/msvc/wx/setup.h b/Externals/wxWidgets3/include/msvc/wx/setup.h new file mode 100644 index 0000000000..31c5efc42f --- /dev/null +++ b/Externals/wxWidgets3/include/msvc/wx/setup.h @@ -0,0 +1,254 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: msvc/wx/setup.h +// Purpose: wrapper around the real wx/setup.h for Visual C++ +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-12-12 +// Copyright: (c) 2004 Vadim Zeitlin +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _MSC_VER + #error "This file should only be included when using Microsoft Visual C++" +#endif + +// VC++ IDE predefines _DEBUG and _UNICODE for the new projects itself, but +// the other symbols (WXUSINGDLL, __WXUNIVERSAL__, ...) should be defined +// explicitly! + +#include "wx/version.h" +#include "wx/cpp.h" + +// notice that wxSUFFIX_DEBUG is a string but wxSUFFIX itself must be an +// identifier as string concatenation is not done inside #include where we +// need it +#ifdef _DEBUG + #define wxSUFFIX_DEBUG "d" + #ifdef _UNICODE + #define wxSUFFIX ud + #else // !_UNICODE + #define wxSUFFIX d + #endif // _UNICODE/!_UNICODE +#else + #define wxSUFFIX_DEBUG "" + #ifdef _UNICODE + #define wxSUFFIX u + #else // !_UNICODE + // don't define wxSUFFIX at all as preprocessor operations don't work + // with empty values so we need to check for this case specially below + #endif // _UNICODE/!_UNICODE +#endif + +// compiler-specific prefix: by default it's always just "vc" for compatibility +// reasons but if you use multiple MSVC versions you probably build them with +// COMPILER_PREFIX=vcXX and in this case you may want to either predefine +// wxMSVC_VERSION as "XX" or define wxMSVC_VERSION_AUTO to use the appropriate +// version depending on the compiler used +#ifdef wxMSVC_VERSION + #define wxCOMPILER_PREFIX wxCONCAT(vc, wxMSVC_VERSION) +#elif defined(wxMSVC_VERSION_AUTO) + #if _MSC_VER == 1200 + #define wxCOMPILER_PREFIX vc60 + #elif _MSC_VER == 1300 + #define wxCOMPILER_PREFIX vc70 + #elif _MSC_VER == 1310 + #define wxCOMPILER_PREFIX vc71 + #elif _MSC_VER == 1400 + #define wxCOMPILER_PREFIX vc80 + #elif _MSC_VER == 1500 + #define wxCOMPILER_PREFIX vc90 + #elif _MSC_VER == 1600 + #define wxCOMPILER_PREFIX vc100 + #elif _MSC_VER == 1700 + #define wxCOMPILER_PREFIX vc110 + #elif _MSC_VER == 1800 + #define wxCOMPILER_PREFIX vc120 + #else + #error "Unknown MSVC compiler version, please report to wx-dev." + #endif +#else + #define wxCOMPILER_PREFIX vc +#endif + +// architecture-specific part: not used (again, for compatibility), for x86 +#if defined(_M_X64) + #define wxARCH_SUFFIX _x64 +#elif defined(_M_IA64) + #define wxARCH_SUFFIX _ia64 +#else // assume _M_IX86 + #define wxARCH_SUFFIX +#endif + +// Ensure the library configuration is defined +#ifndef wxCFG + #define wxCFG +#endif + +// Construct the path for the subdirectory under /lib/ that the included setup.h +// will be used from +#ifdef WXUSINGDLL + #define wxLIB_SUBDIR \ + wxCONCAT4(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _dll, wxCFG) +#else // !DLL + #define wxLIB_SUBDIR \ + wxCONCAT4(wxCOMPILER_PREFIX, wxARCH_SUFFIX, _lib, wxCFG) +#endif // DLL/!DLL + +// The user can predefine a different prefix if not using the default MSW port +// with MSVC. +#ifndef wxTOOLKIT_PREFIX + #if defined(__WXGTK__) + #define wxTOOLKIT_PREFIX gtk2 + #else + #define wxTOOLKIT_PREFIX msw + #endif +#endif // wxTOOLKIT_PREFIX + +// the real setup.h header file we need is in the build-specific directory, +// construct the path to it +#ifdef wxSUFFIX + #define wxSETUPH_PATH \ + wxCONCAT6(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, wxSUFFIX, /wx/setup.h) +#else // suffix is empty + #define wxSETUPH_PATH \ + wxCONCAT5(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, /wx/setup.h) +#endif + +#define wxSETUPH_PATH_STR wxSTRINGIZE(wxSETUPH_PATH) + +#include wxSETUPH_PATH_STR + + +// the library names depend on the build, these macro builds the correct +// library name for the given base name +#ifdef wxSUFFIX + #define wxSUFFIX_STR wxSTRINGIZE(wxSUFFIX) +#else // suffix is empty + #define wxSUFFIX_STR "" +#endif +#define wxSHORT_VERSION_STRING \ + wxSTRINGIZE(wxMAJOR_VERSION) wxSTRINGIZE(wxMINOR_VERSION) + +#define wxWX_LIB_NAME(name, subname) \ + "wx" name wxSHORT_VERSION_STRING wxSUFFIX_STR subname + +#define wxBASE_LIB_NAME(name) wxWX_LIB_NAME("base", "_" name) +#define wxTOOLKIT_LIB_NAME(name) wxWX_LIB_NAME(wxSTRINGIZE(wxTOOLKIT_PREFIX), "_" name) + +// This one is for 3rd party libraries: they don't have the version number +// in their names and usually exist in ANSI version only (except for regex) +// +// 3rd party libraries are also are not linked in when using DLLs as they're +// embedded inside our own DLLs and don't need to be linked with the user code. +#define wx3RD_PARTY_LIB_NAME(name) "wx" name wxSUFFIX_DEBUG + +// special version for regex as it does have a Unicode version +#define wx3RD_PARTY_LIB_NAME_U(name) "wx" name wxSUFFIX_STR + +#pragma comment(lib, wxWX_LIB_NAME("base", "")) + +#ifndef wxNO_NET_LIB + #pragma comment(lib, wxBASE_LIB_NAME("net")) +#endif +#ifndef wxNO_XML_LIB + #pragma comment(lib, wxBASE_LIB_NAME("xml")) +#endif +#if wxUSE_REGEX && !defined(wxNO_REGEX_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME_U("regex")) +#endif + +#if wxUSE_GUI + #if wxUSE_XML && !defined(wxNO_EXPAT_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("expat")) + #endif + #if wxUSE_LIBJPEG && !defined(wxNO_JPEG_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("jpeg")) + #endif + #if wxUSE_LIBPNG && !defined(wxNO_PNG_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("png")) + #endif + #if wxUSE_LIBTIFF && !defined(wxNO_TIFF_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("tiff")) + #endif + #if wxUSE_ZLIB && !defined(wxNO_ZLIB_LIB) && !defined(WXUSINGDLL) + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("zlib")) + #endif + + #pragma comment(lib, wxTOOLKIT_LIB_NAME("core")) + + #ifndef wxNO_ADV_LIB + #pragma comment(lib, wxTOOLKIT_LIB_NAME("adv")) + #endif + + #ifndef wxNO_HTML_LIB + #pragma comment(lib, wxTOOLKIT_LIB_NAME("html")) + #endif + #if wxUSE_GLCANVAS && !defined(wxNO_GL_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("gl")) + #endif + #if wxUSE_DEBUGREPORT && !defined(wxNO_QA_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("qa")) + #endif + #if wxUSE_XRC && !defined(wxNO_XRC_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("xrc")) + #endif + #if wxUSE_AUI && !defined(wxNO_AUI_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("aui")) + #endif + #if wxUSE_PROPGRID && !defined(wxNO_PROPGRID_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("propgrid")) + #endif + #if wxUSE_RIBBON && !defined(wxNO_RIBBON_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("ribbon")) + #endif + #if wxUSE_RICHTEXT && !defined(wxNO_RICHTEXT_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("richtext")) + #endif + #if wxUSE_MEDIACTRL && !defined(wxNO_MEDIA_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("media")) + #endif + #if wxUSE_STC && !defined(wxNO_STC_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("stc")) + #ifndef WXUSINGDLL + #pragma comment(lib, wx3RD_PARTY_LIB_NAME("scintilla")) + #endif + #endif + #if wxUSE_WEBVIEW && !defined(wxNO_WEBVIEW_LIB) + #pragma comment(lib, wxTOOLKIT_LIB_NAME("webview")) + #endif +#endif // wxUSE_GUI + + +#ifndef WXUSINGDLL + // Make sure all required system libraries are added to the linker too when + // using static libraries. + #pragma comment(lib, "kernel32") + #pragma comment(lib, "user32") + #pragma comment(lib, "gdi32") + #pragma comment(lib, "comdlg32") + #pragma comment(lib, "winspool") + #pragma comment(lib, "winmm") + #pragma comment(lib, "shell32") + #pragma comment(lib, "comctl32") + #pragma comment(lib, "ole32") + #pragma comment(lib, "oleaut32") + #pragma comment(lib, "uuid") + #pragma comment(lib, "rpcrt4") + #pragma comment(lib, "advapi32") + #pragma comment(lib, "wsock32") + #if wxUSE_URL_NATIVE + #pragma comment(lib, "wininet") + #endif + + #ifdef __WXGTK__ + #pragma comment(lib, "gtk-win32-2.0.lib") + #pragma comment(lib, "gdk-win32-2.0.lib") + #pragma comment(lib, "pangocairo-1.0.lib") + #pragma comment(lib, "gdk_pixbuf-2.0.lib") + #pragma comment(lib, "cairo.lib") + #pragma comment(lib, "pango-1.0.lib") + #pragma comment(lib, "gobject-2.0.lib") + #pragma comment(lib, "gthread-2.0.lib") + #pragma comment(lib, "glib-2.0.lib") + #endif +#endif // !WXUSINGDLL diff --git a/Externals/wxWidgets3/include/wx/aboutdlg.h b/Externals/wxWidgets3/include/wx/aboutdlg.h index 0552f91fd1..975b5def27 100644 --- a/Externals/wxWidgets3/include/wx/aboutdlg.h +++ b/Externals/wxWidgets3/include/wx/aboutdlg.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxAboutDialog class // Author: Vadim Zeitlin // Created: 2006-10-07 -// RCS-ID: $Id: aboutdlg.h 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/accel.h b/Externals/wxWidgets3/include/wx/accel.h index 200feffe4d..5226b8b35a 100644 --- a/Externals/wxWidgets3/include/wx/accel.h +++ b/Externals/wxWidgets3/include/wx/accel.h @@ -4,7 +4,6 @@ // Author: Julian Smart, Robert Roebling, Vadim Zeitlin // Modified by: // Created: 31.05.01 (extracted from other files) -// RCS-ID: $Id: accel.h 68718 2011-08-16 11:55:39Z SC $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -118,7 +117,12 @@ public: // returns a wxString for the this accelerator. // this function formats it using the - format // where maybe a hyphen-separated list of "shift|alt|ctrl" - wxString ToString() const; + wxString ToString() const { return AsPossiblyLocalizedString(true); } + + // same as above but without translating, useful if the string is meant to + // be stored in a file or otherwise stored, instead of being shown to the + // user + wxString ToRawString() const { return AsPossiblyLocalizedString(false); } // returns true if the given string correctly initialized this object // (i.e. if IsOk() returns true after this call) @@ -126,6 +130,8 @@ public: private: + wxString AsPossiblyLocalizedString(bool localized) const; + // common part of Create() and FromString() static bool ParseAccel(const wxString& str, int *flags, int *keycode); diff --git a/Externals/wxWidgets3/include/wx/access.h b/Externals/wxWidgets3/include/wx/access.h index 0ca94a7e10..70cbaf1389 100644 --- a/Externals/wxWidgets3/include/wx/access.h +++ b/Externals/wxWidgets3/include/wx/access.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 2003-02-12 -// RCS-ID: $Id: access.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/affinematrix2d.h b/Externals/wxWidgets3/include/wx/affinematrix2d.h index 6516cd46f5..28055f8d35 100644 --- a/Externals/wxWidgets3/include/wx/affinematrix2d.h +++ b/Externals/wxWidgets3/include/wx/affinematrix2d.h @@ -36,7 +36,7 @@ public: virtual bool IsEqual(const wxAffineMatrix2DBase& t) const; virtual void Translate(wxDouble dx, wxDouble dy); virtual void Scale(wxDouble xScale, wxDouble yScale); - virtual void Rotate(wxDouble ccRadians); + virtual void Rotate(wxDouble cRadians); protected: virtual wxPoint2DDouble DoTransformPoint(const wxPoint2DDouble& p) const; diff --git a/Externals/wxWidgets3/include/wx/afterstd.h b/Externals/wxWidgets3/include/wx/afterstd.h index 40969fd4b6..16075fe5d7 100644 --- a/Externals/wxWidgets3/include/wx/afterstd.h +++ b/Externals/wxWidgets3/include/wx/afterstd.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 07/07/03 -// RCS-ID: $Id: afterstd.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -13,7 +12,7 @@ See the comments in beforestd.h. */ -#if defined(__WXMSW__) +#if defined(__WINDOWS__) #include "wx/msw/winundef.h" #endif diff --git a/Externals/wxWidgets3/include/wx/anidecod.h b/Externals/wxWidgets3/include/wx/anidecod.h index f2d0a300ba..2923887b49 100644 --- a/Externals/wxWidgets3/include/wx/anidecod.h +++ b/Externals/wxWidgets3/include/wx/anidecod.h @@ -2,7 +2,6 @@ // Name: wx/anidecod.h // Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation // Author: Francesco Montorsi -// CVS-ID: $Id: anidecod.h 66716 2011-01-19 12:28:31Z DS $ // Copyright: (c) 2006 Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/animate.h b/Externals/wxWidgets3/include/wx/animate.h index 072a379f2f..6243fb4568 100644 --- a/Externals/wxWidgets3/include/wx/animate.h +++ b/Externals/wxWidgets3/include/wx/animate.h @@ -4,7 +4,6 @@ // Author: Julian Smart and Guillermo Rodriguez Garcia // Modified by: Francesco Montorsi // Created: 13/8/99 -// RCS-ID: $Id: animate.h 56651 2008-11-02 22:16:14Z FM $ // Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/animdecod.h b/Externals/wxWidgets3/include/wx/animdecod.h index eacfe5d729..58177e68fd 100644 --- a/Externals/wxWidgets3/include/wx/animdecod.h +++ b/Externals/wxWidgets3/include/wx/animdecod.h @@ -2,7 +2,6 @@ // Name: wx/animdecod.h // Purpose: wxAnimationDecoder // Author: Francesco Montorsi -// CVS-ID: $Id: animdecod.h 62789 2009-12-05 19:57:58Z PC $ // Copyright: (c) 2006 Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/any.h b/Externals/wxWidgets3/include/wx/any.h index b38a1d491c..c2cd7a79f4 100644 --- a/Externals/wxWidgets3/include/wx/any.h +++ b/Externals/wxWidgets3/include/wx/any.h @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: 07/05/2009 -// RCS-ID: $Id: any.h 66621 2011-01-07 17:22:59Z SC $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -912,6 +911,8 @@ public: WXANY_IMPLEMENT_INT_EQ_OP(wxLongLong_t, wxULongLong_t) #endif + wxGCC_WARNING_SUPPRESS(float-equal) + bool operator==(float value) const { if ( !wxAnyValueTypeImpl::IsSameClass(m_type) ) @@ -932,6 +933,8 @@ public: (wxAnyValueTypeImpl::GetValue(m_buffer)); } + wxGCC_WARNING_RESTORE(float-equal) + bool operator==(bool value) const { if ( !wxAnyValueTypeImpl::IsSameClass(m_type) ) diff --git a/Externals/wxWidgets3/include/wx/anybutton.h b/Externals/wxWidgets3/include/wx/anybutton.h index 4275c6bfd8..ebeac3b551 100644 --- a/Externals/wxWidgets3/include/wx/anybutton.h +++ b/Externals/wxWidgets3/include/wx/anybutton.h @@ -3,7 +3,6 @@ // Purpose: wxAnyButtonBase class // Author: Vadim Zetlin // Created: 2000-08-15 (extracted from button.h) -// RCS-ID: $Id: anybutton.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) Vadim Zetlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/anystr.h b/Externals/wxWidgets3/include/wx/anystr.h index b330f8022f..8eebaf9b03 100644 --- a/Externals/wxWidgets3/include/wx/anystr.h +++ b/Externals/wxWidgets3/include/wx/anystr.h @@ -3,7 +3,6 @@ // Purpose: wxAnyStrPtr class declaration // Author: Vadim Zeitlin // Created: 2009-03-23 -// RCS-ID: $Id: anystr.h 59829 2009-03-25 09:54:10Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/app.h b/Externals/wxWidgets3/include/wx/app.h index 64f1220629..60e02b35cc 100644 --- a/Externals/wxWidgets3/include/wx/app.h +++ b/Externals/wxWidgets3/include/wx/app.h @@ -5,7 +5,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: app.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -103,6 +102,9 @@ public: // be done here. When OnRun() returns, the programs starts shutting down. virtual int OnRun(); + // Called before the first events are handled, called from within MainLoop() + virtual void OnLaunched(); + // This is called by wxEventLoopBase::SetActive(): you should put the code // which needs an active event loop here. // Note that this function is called whenever an event loop is activated; @@ -228,6 +230,14 @@ public: // for it static wxAppTraits *GetTraitsIfExists(); + // Return some valid traits object. + // + // This method checks if we have wxTheApp and returns its traits if it does + // exist and the traits are non-NULL, similarly to GetTraitsIfExists(), but + // falls back to wxConsoleAppTraits to ensure that it always returns + // something valid. + static wxAppTraits& GetValidTraits(); + // returns the main event loop instance, i.e. the event loop which is started // by OnRun() and which dispatches all events sent from the native toolkit // to the application (except when new event loops are temporarily set-up). @@ -236,6 +246,18 @@ public: wxEventLoopBase* GetMainLoop() const { return m_mainLoop; } + // This function sets the C locale to the default locale for the current + // environment. It is advised to call this to ensure that the underlying + // toolkit uses the locale in which the numbers and monetary amounts are + // shown in the format expected by user and so on. + // + // Notice that this does _not_ change the global C++ locale, you need to do + // it explicitly if you want. + // + // Finally, notice that while this function is virtual, it is not supposed + // to be overridden outside of the library itself. + virtual void SetCLocale(); + // event processing functions // -------------------------- @@ -494,7 +516,7 @@ protected: wxDECLARE_NO_COPY_CLASS(wxAppConsoleBase); }; -#if defined(__UNIX__) && !defined(__CYGWIN__) +#if defined(__UNIX__) && !defined(__WXMSW__) #include "wx/unix/app.h" #else // this has to be a class and not a typedef as we forward declare it @@ -636,10 +658,9 @@ public: virtual void SetActive(bool isActive, wxWindow *lastFocus); #if WXWIN_COMPATIBILITY_2_6 - // OBSOLETE: don't use, always returns true - // // returns true if the program is successfully initialized - wxDEPRECATED( bool Initialized() ); + wxDEPRECATED_MSG("always returns true now, don't call") + bool Initialized(); #endif // WXWIN_COMPATIBILITY_2_6 protected: @@ -766,13 +787,26 @@ public: // your compiler really, really wants main() to be in your main program (e.g. // hello.cpp). Now wxIMPLEMENT_APP should add this code if required. -#define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \ - int main(int argc, char **argv) \ - { \ - wxDISABLE_DEBUG_SUPPORT(); \ +// For compilers that support it, prefer to use wmain() as this ensures any +// Unicode strings can be passed as command line parameters and not just those +// representable in the current locale. +#if wxUSE_UNICODE && defined(__VISUALC__) + #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \ + int wmain(int argc, wchar_t **argv) \ + { \ + wxDISABLE_DEBUG_SUPPORT(); \ \ - return wxEntry(argc, argv); \ - } + return wxEntry(argc, argv); \ + } +#else // Use standard main() + #define wxIMPLEMENT_WXWIN_MAIN_CONSOLE \ + int main(int argc, char **argv) \ + { \ + wxDISABLE_DEBUG_SUPPORT(); \ + \ + return wxEntry(argc, argv); \ + } +#endif // port-specific header could have defined it already in some special way #ifndef wxIMPLEMENT_WXWIN_MAIN @@ -795,6 +829,7 @@ public: // Use this macro if you want to define your own main() or WinMain() function // and call wxEntry() from there. #define wxIMPLEMENT_APP_NO_MAIN(appname) \ + appname& wxGetApp() { return *static_cast(wxApp::GetInstance()); } \ wxAppConsole *wxCreateApp() \ { \ wxAppConsole::CheckBuildOptions(WX_BUILD_OPTIONS_SIGNATURE, \ @@ -802,9 +837,7 @@ public: return new appname; \ } \ wxAppInitializer \ - wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \ - appname& wxGetApp() { return *static_cast(wxApp::GetInstance()); } \ - wxDECLARE_APP(appname) + wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp) // Same as wxIMPLEMENT_APP() normally but doesn't include themes support in // wxUniversal builds diff --git a/Externals/wxWidgets3/include/wx/apptrait.h b/Externals/wxWidgets3/include/wx/apptrait.h index 4dbf8d218c..da1b39b1d3 100644 --- a/Externals/wxWidgets3/include/wx/apptrait.h +++ b/Externals/wxWidgets3/include/wx/apptrait.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.06.2003 -// RCS-ID: $Id: apptrait.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -77,12 +76,6 @@ public: // except in the case of wxMac and wxCocoa virtual wxStandardPaths& GetStandardPaths(); -#if wxUSE_INTL - // called during wxApp initialization to set the locale to correspond to - // the user default (i.e. system locale under Windows, LC_ALL under Unix) - virtual void SetLocale(); -#endif // wxUSE_INTL - // functions abstracting differences between GUI and console modes // ------------------------------------------------------------------------ diff --git a/Externals/wxWidgets3/include/wx/archive.h b/Externals/wxWidgets3/include/wx/archive.h index f57e1189d6..9f284668dd 100644 --- a/Externals/wxWidgets3/include/wx/archive.h +++ b/Externals/wxWidgets3/include/wx/archive.h @@ -2,7 +2,6 @@ // Name: wx/archive.h // Purpose: Streams for archive formats // Author: Mike Wetherell -// RCS-ID: $Id: archive.h 66780 2011-01-27 11:00:26Z SC $ // Copyright: (c) 2004 Mike Wetherell // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/arrimpl.cpp b/Externals/wxWidgets3/include/wx/arrimpl.cpp index 945da1b586..0ef9e74890 100644 --- a/Externals/wxWidgets3/include/wx/arrimpl.cpp +++ b/Externals/wxWidgets3/include/wx/arrimpl.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 16.10.97 -// RCS-ID: $Id: arrimpl.cpp 64940 2010-07-13 13:29:13Z VZ $ // Copyright: (c) 1997 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -91,13 +90,13 @@ void name::Insert(const T& item, size_t uiIndex, size_t nInsert) \ base_array::operator[](uiIndex + i) = new T(item); \ } \ \ -int name::Index(const T& Item, bool bFromEnd) const \ +int name::Index(const T& item, bool bFromEnd) const \ { \ if ( bFromEnd ) { \ if ( size() > 0 ) { \ size_t ui = size() - 1; \ do { \ - if ( (T*)base_array::operator[](ui) == &Item ) \ + if ( (T*)base_array::operator[](ui) == &item ) \ return static_cast(ui); \ ui--; \ } \ @@ -106,7 +105,7 @@ int name::Index(const T& Item, bool bFromEnd) const \ } \ else { \ for( size_t ui = 0; ui < size(); ui++ ) { \ - if( (T*)base_array::operator[](ui) == &Item ) \ + if( (T*)base_array::operator[](ui) == &item ) \ return static_cast(ui); \ } \ } \ diff --git a/Externals/wxWidgets3/include/wx/arrstr.h b/Externals/wxWidgets3/include/wx/arrstr.h index 76343c71e5..db67c8ef08 100644 --- a/Externals/wxWidgets3/include/wx/arrstr.h +++ b/Externals/wxWidgets3/include/wx/arrstr.h @@ -4,7 +4,6 @@ // Author: Mattia Barbon and Vadim Zeitlin // Modified by: // Created: 07/07/03 -// RCS-ID: $Id: arrstr.h 67343 2011-03-30 14:16:04Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -425,7 +424,7 @@ private: // ---------------------------------------------------------------------------- // by default, these functions use the escape character to escape the -// separators occuring inside the string to be joined, this can be disabled by +// separators occurring inside the string to be joined, this can be disabled by // passing '\0' as escape WXDLLIMPEXP_BASE wxString wxJoin(const wxArrayString& arr, diff --git a/Externals/wxWidgets3/include/wx/artprov.h b/Externals/wxWidgets3/include/wx/artprov.h index af3402965e..3e95ed98fe 100644 --- a/Externals/wxWidgets3/include/wx/artprov.h +++ b/Externals/wxWidgets3/include/wx/artprov.h @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 18/03/2002 -// RCS-ID: $Id: artprov.h 66966 2011-02-19 12:32:59Z VZ $ // Copyright: (c) Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/atomic.h b/Externals/wxWidgets3/include/wx/atomic.h index 0c53ebef93..1439d29484 100644 --- a/Externals/wxWidgets3/include/wx/atomic.h +++ b/Externals/wxWidgets3/include/wx/atomic.h @@ -3,7 +3,6 @@ // Purpose: functions to manipulate atomically integers and pointers // Author: Armel Asselin // Created: 12/13/2006 -// RCS-ID: $Id: atomic.h 70808 2012-03-04 20:31:42Z VZ $ // Copyright: (c) Armel Asselin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/aui/aui.h b/Externals/wxWidgets3/include/wx/aui/aui.h index 80129a35a1..df3a9166a1 100644 --- a/Externals/wxWidgets3/include/wx/aui/aui.h +++ b/Externals/wxWidgets3/include/wx/aui/aui.h @@ -4,7 +4,6 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id: aui.h 55231 2008-08-24 09:28:07Z BIW $ // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/aui/auibar.h b/Externals/wxWidgets3/include/wx/aui/auibar.h index 3440840a3b..52e2525215 100644 --- a/Externals/wxWidgets3/include/wx/aui/auibar.h +++ b/Externals/wxWidgets3/include/wx/aui/auibar.h @@ -4,7 +4,6 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2008-08-04 -// RCS-ID: $Id: auibar.h 69594 2011-10-30 16:51:10Z VZ $ // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -39,6 +38,7 @@ enum wxAuiToolBarStyle // analogous to wxAUI_TB_VERTICAL, but forces the toolbar // to be horizontal wxAUI_TB_HORIZONTAL = 1 << 7, + wxAUI_TB_PLAIN_BACKGROUND = 1 << 8, wxAUI_TB_HORZ_TEXT = (wxAUI_TB_HORZ_LAYOUT | wxAUI_TB_TEXT), wxAUI_ORIENTATION_MASK = (wxAUI_TB_VERTICAL | wxAUI_TB_HORIZONTAL), wxAUI_TB_DEFAULT_STYLE = 0 @@ -211,7 +211,14 @@ public: void SetActive(bool b) { m_active = b; } bool IsActive() const { return m_active; } - void SetHasDropDown(bool b) { m_dropDown = b; } + void SetHasDropDown(bool b) + { + wxCHECK_RET( !b || m_kind == wxITEM_NORMAL, + wxS("Only normal tools can have drop downs") ); + + m_dropDown = b; + } + bool HasDropDown() const { return m_dropDown; } void SetSticky(bool b) { m_sticky = b; } @@ -275,6 +282,11 @@ public: wxWindow* wnd, const wxRect& rect) = 0; + virtual void DrawPlainBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + virtual void DrawLabel( wxDC& dc, wxWindow* wnd, @@ -356,6 +368,10 @@ public: wxWindow* wnd, const wxRect& rect); + virtual void DrawPlainBackground(wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + virtual void DrawLabel( wxDC& dc, wxWindow* wnd, @@ -439,16 +455,27 @@ protected: class WXDLLIMPEXP_AUI wxAuiToolBar : public wxControl { public: + wxAuiToolBar() { Init(); } wxAuiToolBar(wxWindow* parent, - wxWindowID id = -1, - const wxPoint& position = wxDefaultPosition, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxAUI_TB_DEFAULT_STYLE); + long style = wxAUI_TB_DEFAULT_STYLE) + { + Init(); + Create(parent, id, pos, size, style); + } + virtual ~wxAuiToolBar(); - void SetWindowStyleFlag(long style); - long GetWindowStyleFlag() const; + bool Create(wxWindow* parent, + wxWindowID id = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxAUI_TB_DEFAULT_STYLE); + + virtual void SetWindowStyleFlag(long style); void SetArtProvider(wxAuiToolBarArt* art); wxAuiToolBarArt* GetArtProvider() const; @@ -581,6 +608,7 @@ public: virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE); protected: + void Init(); virtual void OnCustomRender(wxDC& WXUNUSED(dc), const wxAuiToolBarItem& WXUNUSED(item), @@ -651,7 +679,6 @@ protected: bool m_dragging; bool m_gripperVisible; bool m_overflowVisible; - long m_style; bool RealizeHelper(wxClientDC& dc, bool horizontal); static bool IsPaneValid(long style, const wxAuiPaneInfo& pane); @@ -676,11 +703,11 @@ private: #ifndef SWIG -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_AUI, wxEVT_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent ); typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&); @@ -688,34 +715,41 @@ typedef void (wxEvtHandler::*wxAuiToolBarEventFunction)(wxAuiToolBarEvent&); wxEVENT_HANDLER_CAST(wxAuiToolBarEventFunction, func) #define EVT_AUITOOLBAR_TOOL_DROPDOWN(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, winid, wxAuiToolBarEventHandler(fn)) #define EVT_AUITOOLBAR_OVERFLOW_CLICK(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, winid, wxAuiToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_OVERFLOW_CLICK, winid, wxAuiToolBarEventHandler(fn)) #define EVT_AUITOOLBAR_RIGHT_CLICK(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, winid, wxAuiToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_RIGHT_CLICK, winid, wxAuiToolBarEventHandler(fn)) #define EVT_AUITOOLBAR_MIDDLE_CLICK(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, winid, wxAuiToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_MIDDLE_CLICK, winid, wxAuiToolBarEventHandler(fn)) #define EVT_AUITOOLBAR_BEGIN_DRAG(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, winid, wxAuiToolBarEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUITOOLBAR_BEGIN_DRAG, winid, wxAuiToolBarEventHandler(fn)) #else // wxpython/swig event work -%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN; -%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK; -%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK; -%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK; -%constant wxEventType wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG; +%constant wxEventType wxEVT_AUITOOLBAR_TOOL_DROPDOWN; +%constant wxEventType wxEVT_AUITOOLBAR_OVERFLOW_CLICK; +%constant wxEventType wxEVT_AUITOOLBAR_RIGHT_CLICK; +%constant wxEventType wxEVT_AUITOOLBAR_MIDDLE_CLICK; +%constant wxEventType wxEVT_AUITOOLBAR_BEGIN_DRAG; %pythoncode { - EVT_AUITOOLBAR_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, 1 ) - EVT_AUITOOLBAR_OVERFLOW_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, 1 ) - EVT_AUITOOLBAR_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, 1 ) - EVT_AUITOOLBAR_MIDDLE_CLICK = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, 1 ) - EVT_AUITOOLBAR_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, 1 ) + EVT_AUITOOLBAR_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_AUITOOLBAR_TOOL_DROPDOWN, 1 ) + EVT_AUITOOLBAR_OVERFLOW_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_OVERFLOW_CLICK, 1 ) + EVT_AUITOOLBAR_RIGHT_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_RIGHT_CLICK, 1 ) + EVT_AUITOOLBAR_MIDDLE_CLICK = wx.PyEventBinder( wxEVT_AUITOOLBAR_MIDDLE_CLICK, 1 ) + EVT_AUITOOLBAR_BEGIN_DRAG = wx.PyEventBinder( wxEVT_AUITOOLBAR_BEGIN_DRAG, 1 ) } #endif // SWIG +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN wxEVT_AUITOOLBAR_TOOL_DROPDOWN +#define wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK wxEVT_AUITOOLBAR_OVERFLOW_CLICK +#define wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK wxEVT_AUITOOLBAR_RIGHT_CLICK +#define wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK wxEVT_AUITOOLBAR_MIDDLE_CLICK +#define wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG wxEVT_AUITOOLBAR_BEGIN_DRAG + #endif // wxUSE_AUI #endif // _WX_AUIBAR_H_ diff --git a/Externals/wxWidgets3/include/wx/aui/auibook.h b/Externals/wxWidgets3/include/wx/aui/auibook.h index e8e4527ff6..17b3fdae9f 100644 --- a/Externals/wxWidgets3/include/wx/aui/auibook.h +++ b/Externals/wxWidgets3/include/wx/aui/auibook.h @@ -2,7 +2,7 @@ // Name: wx/aui/auibook.h // Purpose: wxaui: wx advanced user interface - notebook // Author: Benjamin I. Williams -// Modified by: +// Modified by: Jens Lody // Created: 2006-06-28 // Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 @@ -21,10 +21,10 @@ #if wxUSE_AUI +#include "wx/aui/tabart.h" #include "wx/aui/framemanager.h" -#include "wx/aui/dockart.h" -#include "wx/aui/floatpane.h" #include "wx/bookctrl.h" +#include "wx/containr.h" class wxAuiNotebook; @@ -95,6 +95,7 @@ class WXDLLIMPEXP_AUI wxAuiNotebookPage public: wxWindow* window; // page's associated window wxString caption; // caption displayed on the tab + wxString tooltip; // tooltip displayed when hovering over tab title wxBitmap bitmap; // tab's bitmap wxRect rect; // tab's hit rectangle bool active; // true if the page is currently active @@ -119,254 +120,6 @@ WX_DECLARE_USER_EXPORTED_OBJARRAY(wxAuiTabContainerButton, wxAuiTabContainerButt #endif -// tab art class - -class WXDLLIMPEXP_AUI wxAuiTabArt -{ -public: - - wxAuiTabArt() { } - virtual ~wxAuiTabArt() { } - - virtual wxAuiTabArt* Clone() = 0; - virtual void SetFlags(unsigned int flags) = 0; - - virtual void SetSizingInfo(const wxSize& tabCtrlSize, - size_t tabCount) = 0; - - virtual void SetNormalFont(const wxFont& font) = 0; - virtual void SetSelectedFont(const wxFont& font) = 0; - virtual void SetMeasuringFont(const wxFont& font) = 0; - virtual void SetColour(const wxColour& colour) = 0; - virtual void SetActiveColour(const wxColour& colour) = 0; - - virtual void DrawBackground( - wxDC& dc, - wxWindow* wnd, - const wxRect& rect) = 0; - - virtual void DrawTab(wxDC& dc, - wxWindow* wnd, - const wxAuiNotebookPage& pane, - const wxRect& inRect, - int closeButtonState, - wxRect* outTabRect, - wxRect* outButtonRect, - int* xExtent) = 0; - - virtual void DrawButton( - wxDC& dc, - wxWindow* wnd, - const wxRect& inRect, - int bitmapId, - int buttonState, - int orientation, - wxRect* outRect) = 0; - - virtual wxSize GetTabSize( - wxDC& dc, - wxWindow* wnd, - const wxString& caption, - const wxBitmap& bitmap, - bool active, - int closeButtonState, - int* xExtent) = 0; - - virtual int ShowDropDown( - wxWindow* wnd, - const wxAuiNotebookPageArray& items, - int activeIdx) = 0; - - virtual int GetIndentSize() = 0; - - virtual int GetBestTabCtrlSize( - wxWindow* wnd, - const wxAuiNotebookPageArray& pages, - const wxSize& requiredBmpSize) = 0; -}; - - -class WXDLLIMPEXP_AUI wxAuiDefaultTabArt : public wxAuiTabArt -{ - -public: - - wxAuiDefaultTabArt(); - virtual ~wxAuiDefaultTabArt(); - - wxAuiTabArt* Clone(); - void SetFlags(unsigned int flags); - void SetSizingInfo(const wxSize& tabCtrlSize, - size_t tabCount); - - void SetNormalFont(const wxFont& font); - void SetSelectedFont(const wxFont& font); - void SetMeasuringFont(const wxFont& font); - void SetColour(const wxColour& colour); - void SetActiveColour(const wxColour& colour); - - void DrawBackground( - wxDC& dc, - wxWindow* wnd, - const wxRect& rect); - - void DrawTab(wxDC& dc, - wxWindow* wnd, - const wxAuiNotebookPage& pane, - const wxRect& inRect, - int closeButtonState, - wxRect* outTabRect, - wxRect* outButtonRect, - int* xExtent); - - void DrawButton( - wxDC& dc, - wxWindow* wnd, - const wxRect& inRect, - int bitmapId, - int buttonState, - int orientation, - wxRect* outRect); - - int GetIndentSize(); - - wxSize GetTabSize( - wxDC& dc, - wxWindow* wnd, - const wxString& caption, - const wxBitmap& bitmap, - bool active, - int closeButtonState, - int* xExtent); - - int ShowDropDown( - wxWindow* wnd, - const wxAuiNotebookPageArray& items, - int activeIdx); - - int GetBestTabCtrlSize(wxWindow* wnd, - const wxAuiNotebookPageArray& pages, - const wxSize& requiredBmpSize); - -protected: - - wxFont m_normalFont; - wxFont m_selectedFont; - wxFont m_measuringFont; - wxColour m_baseColour; - wxPen m_baseColourPen; - wxPen m_borderPen; - wxBrush m_baseColourBrush; - wxColour m_activeColour; - wxBitmap m_activeCloseBmp; - wxBitmap m_disabledCloseBmp; - wxBitmap m_activeLeftBmp; - wxBitmap m_disabledLeftBmp; - wxBitmap m_activeRightBmp; - wxBitmap m_disabledRightBmp; - wxBitmap m_activeWindowListBmp; - wxBitmap m_disabledWindowListBmp; - - int m_fixedTabWidth; - int m_tabCtrlHeight; - unsigned int m_flags; -}; - - -class WXDLLIMPEXP_AUI wxAuiSimpleTabArt : public wxAuiTabArt -{ - -public: - - wxAuiSimpleTabArt(); - virtual ~wxAuiSimpleTabArt(); - - wxAuiTabArt* Clone(); - void SetFlags(unsigned int flags); - - void SetSizingInfo(const wxSize& tabCtrlSize, - size_t tabCount); - - void SetNormalFont(const wxFont& font); - void SetSelectedFont(const wxFont& font); - void SetMeasuringFont(const wxFont& font); - void SetColour(const wxColour& colour); - void SetActiveColour(const wxColour& colour); - - void DrawBackground( - wxDC& dc, - wxWindow* wnd, - const wxRect& rect); - - void DrawTab(wxDC& dc, - wxWindow* wnd, - const wxAuiNotebookPage& pane, - const wxRect& inRect, - int closeButtonState, - wxRect* outTabRect, - wxRect* outButtonRect, - int* xExtent); - - void DrawButton( - wxDC& dc, - wxWindow* wnd, - const wxRect& inRect, - int bitmapId, - int buttonState, - int orientation, - wxRect* outRect); - - int GetIndentSize(); - - wxSize GetTabSize( - wxDC& dc, - wxWindow* wnd, - const wxString& caption, - const wxBitmap& bitmap, - bool active, - int closeButtonState, - int* xExtent); - - int ShowDropDown( - wxWindow* wnd, - const wxAuiNotebookPageArray& items, - int activeIdx); - - int GetBestTabCtrlSize(wxWindow* wnd, - const wxAuiNotebookPageArray& pages, - const wxSize& requiredBmpSize); - -protected: - - wxFont m_normalFont; - wxFont m_selectedFont; - wxFont m_measuringFont; - wxPen m_normalBkPen; - wxPen m_selectedBkPen; - wxBrush m_normalBkBrush; - wxBrush m_selectedBkBrush; - wxBrush m_bkBrush; - wxBitmap m_activeCloseBmp; - wxBitmap m_disabledCloseBmp; - wxBitmap m_activeLeftBmp; - wxBitmap m_disabledLeftBmp; - wxBitmap m_activeRightBmp; - wxBitmap m_disabledRightBmp; - wxBitmap m_activeWindowListBmp; - wxBitmap m_disabledWindowListBmp; - - int m_fixedTabWidth; - unsigned int m_flags; -}; - - - - - - - - - class WXDLLIMPEXP_AUI wxAuiTabContainer { public: @@ -536,13 +289,16 @@ public: bool DeletePage(size_t page); bool RemovePage(size_t page); - size_t GetPageCount() const; - wxWindow* GetPage(size_t pageIdx) const; + virtual size_t GetPageCount() const; + virtual wxWindow* GetPage(size_t pageIdx) const; int GetPageIndex(wxWindow* pageWnd) const; bool SetPageText(size_t page, const wxString& text); wxString GetPageText(size_t pageIdx) const; + bool SetPageToolTip(size_t page, const wxString& text); + wxString GetPageToolTip(size_t pageIdx) const; + bool SetPageBitmap(size_t page, const wxBitmap& bitmap); wxBitmap GetPageBitmap(size_t pageIdx) const; @@ -571,9 +327,6 @@ public: // Gets the height of the notebook for a given page height int GetHeightForPageHeight(int pageHeight); - // Advances the selection, generation page selection events - void AdvanceSelection(bool forward = true); - // Shows the window menu bool ShowWindowMenu(); @@ -583,9 +336,6 @@ public: // we don't want focus for ourselves // virtual bool AcceptsFocus() const { return false; } - // Redo sizing after thawing - virtual void Thaw(); - //wxBookCtrlBase functions virtual void SetPageSize (const wxSize &size); @@ -594,8 +344,6 @@ public: virtual int GetPageImage(size_t n) const; virtual bool SetPageImage(size_t n, int imageId); - wxWindow* GetCurrentPage () const; - virtual int ChangeSelection(size_t n); virtual bool AddPage(wxWindow *page, const wxString &text, bool select, @@ -611,6 +359,9 @@ protected: // choose the default border for this window virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + // Redo sizing after thawing + virtual void DoThaw(); + // these can be overridden // update the height, return true if it was done or false if the new height @@ -693,21 +444,21 @@ protected: #ifndef SWIG -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_AUI, wxEVT_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent); typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&); @@ -715,73 +466,91 @@ typedef void (wxEvtHandler::*wxAuiNotebookEventFunction)(wxAuiNotebookEvent&); wxEVENT_HANDLER_CAST(wxAuiNotebookEventFunction, func) #define EVT_AUINOTEBOOK_PAGE_CLOSE(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CLOSE, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_PAGE_CLOSED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CLOSED, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CHANGED, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_PAGE_CHANGING, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_BUTTON(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_BUTTON, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_BEGIN_DRAG(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_BEGIN_DRAG, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_END_DRAG(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_END_DRAG, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_DRAG_MOTION(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_DRAG_MOTION, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_ALLOW_DND(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_ALLOW_DND, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_DRAG_DONE(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_DRAG_DONE, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_TAB_MIDDLE_DOWN(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_TAB_MIDDLE_UP(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_TAB_RIGHT_DOWN(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_TAB_RIGHT_UP(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, winid, wxAuiNotebookEventHandler(fn)) #define EVT_AUINOTEBOOK_BG_DCLICK(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, winid, wxAuiNotebookEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_AUINOTEBOOK_BG_DCLICK, winid, wxAuiNotebookEventHandler(fn)) #else // wxpython/swig event work -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BUTTON; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_END_DRAG; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP; -%constant wxEventType wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSE; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CLOSED; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGED; +%constant wxEventType wxEVT_AUINOTEBOOK_PAGE_CHANGING; +%constant wxEventType wxEVT_AUINOTEBOOK_BUTTON; +%constant wxEventType wxEVT_AUINOTEBOOK_BEGIN_DRAG; +%constant wxEventType wxEVT_AUINOTEBOOK_END_DRAG; +%constant wxEventType wxEVT_AUINOTEBOOK_DRAG_MOTION; +%constant wxEventType wxEVT_AUINOTEBOOK_ALLOW_DND; +%constant wxEventType wxEVT_AUINOTEBOOK_DRAG_DONE; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN; +%constant wxEventType wxEVT_AUINOTEBOOK_TAB_RIGHT_UP; +%constant wxEventType wxEVT_AUINOTEBOOK_BG_DCLICK; %pythoncode { - EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 1 ) - EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 1 ) - EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 1 ) - EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 1 ) - EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 1 ) - EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 1 ) - EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 1 ) - EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 1 ) - EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 1 ) - EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 1 ) - EVT__AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 ) - EVT__AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 1 ) - EVT__AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 ) - EVT__AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 1 ) - EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 1 ) + EVT_AUINOTEBOOK_PAGE_CLOSE = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CLOSE, 1 ) + EVT_AUINOTEBOOK_PAGE_CLOSED = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CLOSED, 1 ) + EVT_AUINOTEBOOK_PAGE_CHANGED = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CHANGED, 1 ) + EVT_AUINOTEBOOK_PAGE_CHANGING = wx.PyEventBinder( wxEVT_AUINOTEBOOK_PAGE_CHANGING, 1 ) + EVT_AUINOTEBOOK_BUTTON = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BUTTON, 1 ) + EVT_AUINOTEBOOK_BEGIN_DRAG = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BEGIN_DRAG, 1 ) + EVT_AUINOTEBOOK_END_DRAG = wx.PyEventBinder( wxEVT_AUINOTEBOOK_END_DRAG, 1 ) + EVT_AUINOTEBOOK_DRAG_MOTION = wx.PyEventBinder( wxEVT_AUINOTEBOOK_DRAG_MOTION, 1 ) + EVT_AUINOTEBOOK_ALLOW_DND = wx.PyEventBinder( wxEVT_AUINOTEBOOK_ALLOW_DND, 1 ) + EVT_AUINOTEBOOK_DRAG_DONE = wx.PyEventBinder( wxEVT_AUINOTEBOOK_DRAG_DONE, 1 ) + EVT__AUINOTEBOOK_TAB_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, 1 ) + EVT__AUINOTEBOOK_TAB_MIDDLE_UP = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, 1 ) + EVT__AUINOTEBOOK_TAB_RIGHT_DOWN = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, 1 ) + EVT__AUINOTEBOOK_TAB_RIGHT_UP = wx.PyEventBinder( wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, 1 ) + EVT_AUINOTEBOOK_BG_DCLICK = wx.PyEventBinder( wxEVT_AUINOTEBOOK_BG_DCLICK, 1 ) } #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE wxEVT_AUINOTEBOOK_PAGE_CLOSE +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED wxEVT_AUINOTEBOOK_PAGE_CLOSED +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED wxEVT_AUINOTEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING wxEVT_AUINOTEBOOK_PAGE_CHANGING +#define wxEVT_COMMAND_AUINOTEBOOK_BUTTON wxEVT_AUINOTEBOOK_BUTTON +#define wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG wxEVT_AUINOTEBOOK_BEGIN_DRAG +#define wxEVT_COMMAND_AUINOTEBOOK_END_DRAG wxEVT_AUINOTEBOOK_END_DRAG +#define wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION wxEVT_AUINOTEBOOK_DRAG_MOTION +#define wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND wxEVT_AUINOTEBOOK_ALLOW_DND +#define wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE wxEVT_AUINOTEBOOK_DRAG_DONE +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN +#define wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP wxEVT_AUINOTEBOOK_TAB_RIGHT_UP +#define wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK wxEVT_AUINOTEBOOK_BG_DCLICK +#define wxEVT_COMMAND_AUINOTEBOOK_CANCEL_DRAG wxEVT_AUINOTEBOOK_CANCEL_DRAG + #endif // wxUSE_AUI #endif // _WX_AUINOTEBOOK_H_ diff --git a/Externals/wxWidgets3/include/wx/aui/dockart.h b/Externals/wxWidgets3/include/wx/aui/dockart.h index fbc2ba7593..744cad56c4 100644 --- a/Externals/wxWidgets3/include/wx/aui/dockart.h +++ b/Externals/wxWidgets3/include/wx/aui/dockart.h @@ -4,7 +4,6 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id: dockart.h 69590 2011-10-30 14:20:03Z VZ $ // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/aui/floatpane.h b/Externals/wxWidgets3/include/wx/aui/floatpane.h index d88614555d..bf158933b8 100644 --- a/Externals/wxWidgets3/include/wx/aui/floatpane.h +++ b/Externals/wxWidgets3/include/wx/aui/floatpane.h @@ -4,7 +4,6 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id: floatpane.h 69590 2011-10-30 14:20:03Z VZ $ // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/aui/framemanager.h b/Externals/wxWidgets3/include/wx/aui/framemanager.h index c11491617f..4f6b4641b1 100644 --- a/Externals/wxWidgets3/include/wx/aui/framemanager.h +++ b/Externals/wxWidgets3/include/wx/aui/framemanager.h @@ -4,7 +4,6 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id: framemanager.h 70807 2012-03-04 20:31:34Z VZ $ // Copyright: (C) Copyright 2005, Kirix Corporation, All Rights Reserved. // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/aui/tabart.h b/Externals/wxWidgets3/include/wx/aui/tabart.h new file mode 100644 index 0000000000..3de076c9e3 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/aui/tabart.h @@ -0,0 +1,324 @@ +////////////////////////////////////////////////////////////////////////////// +// Name: wx/aui/tabart.h +// Purpose: wxaui: wx advanced user interface - notebook +// Author: Benjamin I. Williams +// Modified by: Jens Lody (extracted from wx/aui/auibook.h) +// Created: 2012-03-21 +// Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved. +// Licence: wxWindows Library Licence, Version 3.1 +/////////////////////////////////////////////////////////////////////////////// + + +#ifndef _WX_AUI_TABART_H_ +#define _WX_AUI_TABART_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_AUI + +#include "wx/colour.h" +#include "wx/gdicmn.h" +#include "wx/font.h" +#include "wx/pen.h" +#include "wx/brush.h" +#include "wx/bitmap.h" + + +class wxAuiNotebookPage; +class wxAuiNotebookPageArray; +class wxWindow; +class wxDC; + + +// tab art class + +class WXDLLIMPEXP_AUI wxAuiTabArt +{ +public: + + wxAuiTabArt() { } + virtual ~wxAuiTabArt() { } + + virtual wxAuiTabArt* Clone() = 0; + virtual void SetFlags(unsigned int flags) = 0; + + virtual void SetSizingInfo(const wxSize& tabCtrlSize, + size_t tabCount) = 0; + + virtual void SetNormalFont(const wxFont& font) = 0; + virtual void SetSelectedFont(const wxFont& font) = 0; + virtual void SetMeasuringFont(const wxFont& font) = 0; + virtual void SetColour(const wxColour& colour) = 0; + virtual void SetActiveColour(const wxColour& colour) = 0; + + virtual void DrawBorder( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect) = 0; + + virtual void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxAuiNotebookPage& pane, + const wxRect& inRect, + int closeButtonState, + wxRect* outTabRect, + wxRect* outButtonRect, + int* xExtent) = 0; + + virtual void DrawButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& inRect, + int bitmapId, + int buttonState, + int orientation, + wxRect* outRect) = 0; + + virtual wxSize GetTabSize( + wxDC& dc, + wxWindow* wnd, + const wxString& caption, + const wxBitmap& bitmap, + bool active, + int closeButtonState, + int* xExtent) = 0; + + virtual int ShowDropDown( + wxWindow* wnd, + const wxAuiNotebookPageArray& items, + int activeIdx) = 0; + + virtual int GetIndentSize() = 0; + + virtual int GetBorderWidth( + wxWindow* wnd) = 0; + + virtual int GetAdditionalBorderSpace( + wxWindow* wnd) = 0; + + virtual int GetBestTabCtrlSize( + wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + const wxSize& requiredBmpSize) = 0; +}; + + +class WXDLLIMPEXP_AUI wxAuiGenericTabArt : public wxAuiTabArt +{ + +public: + + wxAuiGenericTabArt(); + virtual ~wxAuiGenericTabArt(); + + wxAuiTabArt* Clone(); + void SetFlags(unsigned int flags); + void SetSizingInfo(const wxSize& tabCtrlSize, + size_t tabCount); + + void SetNormalFont(const wxFont& font); + void SetSelectedFont(const wxFont& font); + void SetMeasuringFont(const wxFont& font); + void SetColour(const wxColour& colour); + void SetActiveColour(const wxColour& colour); + + void DrawBorder( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxAuiNotebookPage& pane, + const wxRect& inRect, + int closeButtonState, + wxRect* outTabRect, + wxRect* outButtonRect, + int* xExtent); + + void DrawButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& inRect, + int bitmapId, + int buttonState, + int orientation, + wxRect* outRect); + + int GetIndentSize(); + + int GetBorderWidth( + wxWindow* wnd); + + int GetAdditionalBorderSpace( + wxWindow* wnd); + + wxSize GetTabSize( + wxDC& dc, + wxWindow* wnd, + const wxString& caption, + const wxBitmap& bitmap, + bool active, + int closeButtonState, + int* xExtent); + + int ShowDropDown( + wxWindow* wnd, + const wxAuiNotebookPageArray& items, + int activeIdx); + + int GetBestTabCtrlSize(wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + const wxSize& requiredBmpSize); + +protected: + + wxFont m_normalFont; + wxFont m_selectedFont; + wxFont m_measuringFont; + wxColour m_baseColour; + wxPen m_baseColourPen; + wxPen m_borderPen; + wxBrush m_baseColourBrush; + wxColour m_activeColour; + wxBitmap m_activeCloseBmp; + wxBitmap m_disabledCloseBmp; + wxBitmap m_activeLeftBmp; + wxBitmap m_disabledLeftBmp; + wxBitmap m_activeRightBmp; + wxBitmap m_disabledRightBmp; + wxBitmap m_activeWindowListBmp; + wxBitmap m_disabledWindowListBmp; + + int m_fixedTabWidth; + int m_tabCtrlHeight; + unsigned int m_flags; +}; + + +class WXDLLIMPEXP_AUI wxAuiSimpleTabArt : public wxAuiTabArt +{ + +public: + + wxAuiSimpleTabArt(); + virtual ~wxAuiSimpleTabArt(); + + wxAuiTabArt* Clone(); + void SetFlags(unsigned int flags); + + void SetSizingInfo(const wxSize& tabCtrlSize, + size_t tabCount); + + void SetNormalFont(const wxFont& font); + void SetSelectedFont(const wxFont& font); + void SetMeasuringFont(const wxFont& font); + void SetColour(const wxColour& colour); + void SetActiveColour(const wxColour& colour); + + void DrawBorder( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawBackground( + wxDC& dc, + wxWindow* wnd, + const wxRect& rect); + + void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxAuiNotebookPage& pane, + const wxRect& inRect, + int closeButtonState, + wxRect* outTabRect, + wxRect* outButtonRect, + int* xExtent); + + void DrawButton( + wxDC& dc, + wxWindow* wnd, + const wxRect& inRect, + int bitmapId, + int buttonState, + int orientation, + wxRect* outRect); + + int GetIndentSize(); + + int GetBorderWidth( + wxWindow* wnd); + + int GetAdditionalBorderSpace( + wxWindow* wnd); + + wxSize GetTabSize( + wxDC& dc, + wxWindow* wnd, + const wxString& caption, + const wxBitmap& bitmap, + bool active, + int closeButtonState, + int* xExtent); + + int ShowDropDown( + wxWindow* wnd, + const wxAuiNotebookPageArray& items, + int activeIdx); + + int GetBestTabCtrlSize(wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + const wxSize& requiredBmpSize); + +protected: + + wxFont m_normalFont; + wxFont m_selectedFont; + wxFont m_measuringFont; + wxPen m_normalBkPen; + wxPen m_selectedBkPen; + wxBrush m_normalBkBrush; + wxBrush m_selectedBkBrush; + wxBrush m_bkBrush; + wxBitmap m_activeCloseBmp; + wxBitmap m_disabledCloseBmp; + wxBitmap m_activeLeftBmp; + wxBitmap m_disabledLeftBmp; + wxBitmap m_activeRightBmp; + wxBitmap m_disabledRightBmp; + wxBitmap m_activeWindowListBmp; + wxBitmap m_disabledWindowListBmp; + + int m_fixedTabWidth; + unsigned int m_flags; +}; + +#ifndef __WXUNIVERSAL__ + #if defined(__WXGTK20__) && !defined(__WXGTK3__) + #define wxHAS_NATIVE_TABART + #include "wx/aui/tabartgtk.h" + #define wxAuiDefaultTabArt wxAuiGtkTabArt + #endif +#endif // !__WXUNIVERSAL__ + +#ifndef wxHAS_NATIVE_TABART + #define wxAuiDefaultTabArt wxAuiGenericTabArt +#endif + +#endif // wxUSE_AUI + +#endif // _WX_AUI_TABART_H_ diff --git a/Externals/wxWidgets3/include/wx/aui/tabartgtk.h b/Externals/wxWidgets3/include/wx/aui/tabartgtk.h new file mode 100644 index 0000000000..85fe9e2a50 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/aui/tabartgtk.h @@ -0,0 +1,58 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/aui/tabartgtk.h +// Purpose: declaration of the wxAuiGTKTabArt +// Author: Jens Lody and Teodor Petrov +// Modified by: +// Created: 2012-03-23 +// Copyright: (c) 2012 Jens Lody +// and Teodor Petrov +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_AUI_TABARTGTK_H_ +#define _WX_AUI_TABARTGTK_H_ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/defs.h" + +#if wxUSE_AUI + +#include "wx/aui/tabart.h" +#include "wx/gdicmn.h" + +class wxWindow; +class wxDC; + +class WXDLLIMPEXP_AUI wxAuiGtkTabArt : public wxAuiGenericTabArt +{ +public: + wxAuiGtkTabArt(); + + virtual wxAuiTabArt* Clone(); + virtual void DrawBorder(wxDC& dc, wxWindow* wnd, const wxRect& rect); + virtual void DrawBackground(wxDC& dc, wxWindow* wnd, const wxRect& rect); + virtual void DrawTab(wxDC& dc, + wxWindow* wnd, + const wxAuiNotebookPage& page, + const wxRect& in_rect, + int close_button_state, + wxRect* out_tab_rect, + wxRect* out_button_rect, + int* x_extent); + void DrawButton(wxDC& dc, wxWindow* wnd, const wxRect& in_rect, int bitmap_id, + int button_state, int orientation, wxRect* out_rect); + int GetBestTabCtrlSize(wxWindow* wnd, const wxAuiNotebookPageArray& pages, + const wxSize& required_bmp_size); + int GetBorderWidth(wxWindow* wnd); + int GetAdditionalBorderSpace(wxWindow* wnd); + virtual wxSize GetTabSize(wxDC& dc, wxWindow* wnd, const wxString& caption, + const wxBitmap& bitmap, bool active, + int close_button_state, int* x_extent); +}; + +#endif // wxUSE_AUI + +#endif // _WX_AUI_TABARTGTK_H_ diff --git a/Externals/wxWidgets3/include/wx/aui/tabmdi.h b/Externals/wxWidgets3/include/wx/aui/tabmdi.h index 6a680845b3..8750831747 100644 --- a/Externals/wxWidgets3/include/wx/aui/tabmdi.h +++ b/Externals/wxWidgets3/include/wx/aui/tabmdi.h @@ -4,7 +4,6 @@ // Author: Hans Van Leemputten // Modified by: Benjamin I. Williams / Kirix Corporation // Created: 29/07/2002 -// RCS-ID: $Id: tabmdi.h 70909 2012-03-15 13:49:54Z VZ $ // Copyright: (c) Hans Van Leemputten // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -85,7 +84,6 @@ public: protected: wxAuiMDIClientWindow* m_pClientWindow; - wxAuiMDIChildFrame* m_pActiveChild; wxEvent* m_pLastEvt; #if wxUSE_MENUS @@ -250,6 +248,11 @@ public: long style = wxVSCROLL | wxHSCROLL); virtual int SetSelection(size_t page); + virtual wxAuiMDIChildFrame* GetActiveChild(); + virtual void SetActiveChild(wxAuiMDIChildFrame* pChildFrame) + { + SetSelection(GetPageIndex(pChildFrame)); + } protected: diff --git a/Externals/wxWidgets3/include/wx/bannerwindow.h b/Externals/wxWidgets3/include/wx/bannerwindow.h index 1ce3bc3170..1f1fb24611 100644 --- a/Externals/wxWidgets3/include/wx/bannerwindow.h +++ b/Externals/wxWidgets3/include/wx/bannerwindow.h @@ -3,7 +3,6 @@ // Purpose: wxBannerWindow class declaration // Author: Vadim Zeitlin // Created: 2011-08-16 -// RCS-ID: $Id: bannerwindow.h 69859 2011-11-28 18:58:52Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/base64.h b/Externals/wxWidgets3/include/wx/base64.h index 4ccaf97d59..96c6dd80ef 100644 --- a/Externals/wxWidgets3/include/wx/base64.h +++ b/Externals/wxWidgets3/include/wx/base64.h @@ -3,7 +3,6 @@ // Purpose: declaration of BASE64 encoding/decoding functionality // Author: Charles Reimers, Vadim Zeitlin // Created: 2007-06-18 -// RCS-ID: $Id: base64.h 62614 2009-11-11 14:38:40Z VZ $ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/beforestd.h b/Externals/wxWidgets3/include/wx/beforestd.h index 2a1a98cc76..cc335d317b 100644 --- a/Externals/wxWidgets3/include/wx/beforestd.h +++ b/Externals/wxWidgets3/include/wx/beforestd.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 07/07/03 -// RCS-ID: $Id: beforestd.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/bitmap.h b/Externals/wxWidgets3/include/wx/bitmap.h index ab9046803c..6d9ffe71b7 100644 --- a/Externals/wxWidgets3/include/wx/bitmap.h +++ b/Externals/wxWidgets3/include/wx/bitmap.h @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 22.04.01 -// RCS-ID: $Id: bitmap.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -26,6 +25,7 @@ class WXDLLIMPEXP_FWD_CORE wxBitmapHandler; class WXDLLIMPEXP_FWD_CORE wxIcon; class WXDLLIMPEXP_FWD_CORE wxMask; class WXDLLIMPEXP_FWD_CORE wxPalette; +class WXDLLIMPEXP_FWD_CORE wxDC; // ---------------------------------------------------------------------------- // wxVariant support @@ -83,6 +83,23 @@ protected: #define wxBITMAP_SCREEN_DEPTH (-1) +// ---------------------------------------------------------------------------- +// wxBitmapHelpers: container for various bitmap methods common to all ports. +// ---------------------------------------------------------------------------- + +// Unfortunately, currently wxBitmap does not inherit from wxBitmapBase on all +// platforms and this is not easy to fix. So we extract at least some common +// methods into this class from which both wxBitmapBase (and hence wxBitmap on +// all platforms where it does inherit from it) and wxBitmap in wxMSW and other +// exceptional ports (only wxPM and old wxCocoa) inherit. +class WXDLLIMPEXP_CORE wxBitmapHelpers +{ +public: + // Create a new wxBitmap from the PNG data in the given buffer. + static wxBitmap NewFromPNGData(const void* data, size_t size); +}; + + // All ports except wxMSW and wxOS2 use wxBitmapHandler and wxBitmapBase as // base class for wxBitmapHandler; wxMSW and wxOS2 use wxGDIImageHandler as // base class since it allows some code reuse there. @@ -132,12 +149,12 @@ private: DECLARE_ABSTRACT_CLASS(wxBitmapHandler) }; - // ---------------------------------------------------------------------------- // wxBitmap: class which represents platform-dependent bitmap (unlike wxImage) // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxBitmapBase : public wxGDIObject +class WXDLLIMPEXP_CORE wxBitmapBase : public wxGDIObject, + public wxBitmapHelpers { public: /* @@ -157,6 +174,8 @@ public: virtual bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH) = 0; virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) = 0; + virtual bool CreateScaled(int w, int h, int d, double logicalScale) + { return Create(w*logicalScale,h*logicalScale,d); } virtual int GetHeight() const = 0; virtual int GetWidth() const = 0; @@ -165,6 +184,13 @@ public: wxSize GetSize() const { return wxSize(GetWidth(), GetHeight()); } + // support for scaled bitmaps + virtual double GetScaleFactor() const { return 1.0; } + virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); } + virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); } + virtual wxSize GetScaledSize() const + { return wxSize(GetScaledWidth(), GetScaledHeight()); } + #if wxUSE_IMAGE virtual wxImage ConvertToImage() const = 0; @@ -243,7 +269,11 @@ protected: #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM #include "wx/x11/bitmap.h" #elif defined(__WXGTK20__) - #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #ifdef __WINDOWS__ + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_BMP_RESOURCE + #else + #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #endif #include "wx/gtk/bitmap.h" #elif defined(__WXGTK__) #define wxBITMAP_DEFAULT_TYPE wxBITMAP_TYPE_XPM diff --git a/Externals/wxWidgets3/include/wx/bmpbuttn.h b/Externals/wxWidgets3/include/wx/bmpbuttn.h index c2632b88f6..ead0ba81ec 100644 --- a/Externals/wxWidgets3/include/wx/bmpbuttn.h +++ b/Externals/wxWidgets3/include/wx/bmpbuttn.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 25.08.00 -// RCS-ID: $Id: bmpbuttn.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) 2000 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -25,6 +24,8 @@ #define wxHAS_BUTTON_BITMAP #endif +class WXDLLIMPEXP_FWD_CORE wxBitmapButton; + // ---------------------------------------------------------------------------- // wxBitmapButton: a button which shows bitmaps instead of the usual string. // It has different bitmaps for different states (focused/disabled/pressed) @@ -64,6 +65,12 @@ public: validator, name); } + // Special creation function for a standard "Close" bitmap. It allows to + // simply create a close button with the image appropriate for the common + // platform. + static wxBitmapButton* NewCloseButton(wxWindow* parent, wxWindowID winid); + + // set/get the margins around the button virtual void SetMargins(int x, int y) { diff --git a/Externals/wxWidgets3/include/wx/bmpcbox.h b/Externals/wxWidgets3/include/wx/bmpcbox.h index 671c10a05c..dd69525741 100644 --- a/Externals/wxWidgets3/include/wx/bmpcbox.h +++ b/Externals/wxWidgets3/include/wx/bmpcbox.h @@ -5,7 +5,6 @@ // Modified by: // Created: Aug-31-2006 // Copyright: (c) Jaakko Salli -// RCS-ID: $Id: bmpcbox.h 63204 2010-01-22 15:52:20Z JJ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/bookctrl.h b/Externals/wxWidgets3/include/wx/bookctrl.h index b3a6809690..8b4fbb2fce 100644 --- a/Externals/wxWidgets3/include/wx/bookctrl.h +++ b/Externals/wxWidgets3/include/wx/bookctrl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.08.03 -// RCS-ID: $Id: bookctrl.h 69082 2011-09-14 08:24:06Z SJL $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -95,7 +94,7 @@ public: virtual size_t GetPageCount() const { return m_pages.size(); } // get the panel which represents the given page - wxWindow *GetPage(size_t n) const { return m_pages[n]; } + virtual wxWindow *GetPage(size_t n) const { return m_pages[n]; } // get the current page or NULL if none wxWindow *GetCurrentPage() const @@ -215,6 +214,9 @@ public: } } + // return the index of the given page or wxNOT_FOUND + int FindPage(const wxWindow* page) const; + // hit test: returns which page is hit and, optionally, where (icon, label) virtual int HitTest(const wxPoint& WXUNUSED(pt), long * WXUNUSED(flags) = NULL) const @@ -253,6 +255,10 @@ protected: // false otherwise. bool DoSetSelectionAfterInsertion(size_t n, bool bSelect); + // Update the selection after removing the page at the given index, + // typically called from the derived class overridden DoRemovePage(). + void DoSetSelectionAfterRemoval(size_t n); + // set the selection to the given page, sending the events (which can // possibly prevent the page change from taking place) if SendEvent flag is // included @@ -277,6 +283,11 @@ protected: { wxFAIL_MSG(wxT("Override this function!")); } + // The derived class also may override the following method, also called + // from DoSetSelection(), to show/hide pages differently. + virtual void DoShowPage(wxWindow* page, bool show) { page->Show(show); } + + // Should we accept NULL page pointers in Add/InsertPage()? // // Default is no but derived classes may override it if they can treat NULL @@ -284,7 +295,11 @@ protected: // having nodes without any associated page) virtual bool AllowNullPage() const { return false; } - // remove the page and return a pointer to it + // Remove the page and return a pointer to it. + // + // It also needs to update the current selection if necessary, i.e. if the + // page being removed comes before the selected one and the helper method + // DoSetSelectionAfterRemoval() can be used for this. virtual wxWindow *DoRemovePage(size_t page) = 0; // our best size is the size which fits all our pages @@ -399,20 +414,24 @@ typedef void (wxEvtHandler::*wxBookCtrlEventFunction)(wxBookCtrlEvent&); // dedicated to majority of desktops #include "wx/notebook.h" #define wxBookCtrl wxNotebook - #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED - #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING + #define wxEVT_BOOKCTRL_PAGE_CHANGED wxEVT_NOTEBOOK_PAGE_CHANGED + #define wxEVT_BOOKCTRL_PAGE_CHANGING wxEVT_NOTEBOOK_PAGE_CHANGING #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_NOTEBOOK_PAGE_CHANGED(id, fn) #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_NOTEBOOK_PAGE_CHANGING(id, fn) #else // dedicated to Smartphones #include "wx/choicebk.h" #define wxBookCtrl wxChoicebook - #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED - #define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING + #define wxEVT_BOOKCTRL_PAGE_CHANGED wxEVT_CHOICEBOOK_PAGE_CHANGED + #define wxEVT_BOOKCTRL_PAGE_CHANGING wxEVT_CHOICEBOOK_PAGE_CHANGING #define EVT_BOOKCTRL_PAGE_CHANGED(id, fn) EVT_CHOICEBOOK_PAGE_CHANGED(id, fn) #define EVT_BOOKCTRL_PAGE_CHANGING(id, fn) EVT_CHOICEBOOK_PAGE_CHANGING(id, fn) #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGED wxEVT_BOOKCTRL_PAGE_CHANGED +#define wxEVT_COMMAND_BOOKCTRL_PAGE_CHANGING wxEVT_BOOKCTRL_PAGE_CHANGING + #if WXWIN_COMPATIBILITY_2_6 #define wxBC_TOP wxBK_TOP #define wxBC_BOTTOM wxBK_BOTTOM diff --git a/Externals/wxWidgets3/include/wx/brush.h b/Externals/wxWidgets3/include/wx/brush.h index 7dbb89425d..1bf2c3005c 100644 --- a/Externals/wxWidgets3/include/wx/brush.h +++ b/Externals/wxWidgets3/include/wx/brush.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: brush.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -27,14 +26,14 @@ enum wxBrushStyle wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE, wxBRUSHSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK, wxBRUSHSTYLE_STIPPLE = wxSTIPPLE, - wxBRUSHSTYLE_BDIAGONAL_HATCH = wxBDIAGONAL_HATCH, - wxBRUSHSTYLE_CROSSDIAG_HATCH = wxCROSSDIAG_HATCH, - wxBRUSHSTYLE_FDIAGONAL_HATCH = wxFDIAGONAL_HATCH, - wxBRUSHSTYLE_CROSS_HATCH = wxCROSS_HATCH, - wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHORIZONTAL_HATCH, - wxBRUSHSTYLE_VERTICAL_HATCH = wxVERTICAL_HATCH, - wxBRUSHSTYLE_FIRST_HATCH = wxFIRST_HATCH, - wxBRUSHSTYLE_LAST_HATCH = wxLAST_HATCH + wxBRUSHSTYLE_BDIAGONAL_HATCH = wxHATCHSTYLE_BDIAGONAL, + wxBRUSHSTYLE_CROSSDIAG_HATCH = wxHATCHSTYLE_CROSSDIAG, + wxBRUSHSTYLE_FDIAGONAL_HATCH = wxHATCHSTYLE_FDIAGONAL, + wxBRUSHSTYLE_CROSS_HATCH = wxHATCHSTYLE_CROSS, + wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL, + wxBRUSHSTYLE_VERTICAL_HATCH = wxHATCHSTYLE_VERTICAL, + wxBRUSHSTYLE_FIRST_HATCH = wxHATCHSTYLE_FIRST, + wxBRUSHSTYLE_LAST_HATCH = wxHATCHSTYLE_LAST }; diff --git a/Externals/wxWidgets3/include/wx/buffer.h b/Externals/wxWidgets3/include/wx/buffer.h index 8b57207f1d..c88e160270 100644 --- a/Externals/wxWidgets3/include/wx/buffer.h +++ b/Externals/wxWidgets3/include/wx/buffer.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 12.04.99 -// RCS-ID: $Id: buffer.h 70417 2012-01-20 22:11:51Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -230,7 +229,8 @@ protected: static CharType *StrCopy(const CharType *src, size_t len) { CharType *dst = (CharType*)malloc(sizeof(CharType) * (len + 1)); - memcpy(dst, src, sizeof(CharType) * (len + 1)); + if ( dst ) + memcpy(dst, src, sizeof(CharType) * (len + 1)); return dst; } @@ -438,7 +438,7 @@ public: friend class wxMemoryBuffer; - // everyting is private as it can only be used by wxMemoryBuffer + // everything is private as it can only be used by wxMemoryBuffer private: wxMemoryBufferData(size_t size = wxMemoryBufferData::DefBufSize) : m_data(size ? malloc(size) : NULL), m_size(size), m_len(0), m_ref(0) diff --git a/Externals/wxWidgets3/include/wx/build.h b/Externals/wxWidgets3/include/wx/build.h index ac0393fb99..0959a29782 100644 --- a/Externals/wxWidgets3/include/wx/build.h +++ b/Externals/wxWidgets3/include/wx/build.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin, Vaclav Slavik // Modified by: // Created: 07.05.02 -// RCS-ID: $Id: build.h 67343 2011-03-30 14:16:04Z VZ $ // Copyright: (c) 2002 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/busyinfo.h b/Externals/wxWidgets3/include/wx/busyinfo.h index ae63552870..600c86c634 100644 --- a/Externals/wxWidgets3/include/wx/busyinfo.h +++ b/Externals/wxWidgets3/include/wx/busyinfo.h @@ -3,7 +3,6 @@ // Purpose: Information window (when app is busy) // Author: Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik -// RCS-ID: $Id: busyinfo.h 37158 2006-01-26 15:40:46Z ABX $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/button.h b/Externals/wxWidgets3/include/wx/button.h index d164eee800..71dbee41de 100644 --- a/Externals/wxWidgets3/include/wx/button.h +++ b/Externals/wxWidgets3/include/wx/button.h @@ -4,7 +4,6 @@ // Author: Vadim Zetlin // Modified by: // Created: 15.08.00 -// RCS-ID: $Id: button.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) Vadim Zetlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/calctrl.h b/Externals/wxWidgets3/include/wx/calctrl.h index 7c2921d8e0..16a84748d2 100644 --- a/Externals/wxWidgets3/include/wx/calctrl.h +++ b/Externals/wxWidgets3/include/wx/calctrl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29.12.99 -// RCS-ID: $Id: calctrl.h 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/caret.h b/Externals/wxWidgets3/include/wx/caret.h index 6ba5814b9f..e6e9728ff8 100644 --- a/Externals/wxWidgets3/include/wx/caret.h +++ b/Externals/wxWidgets3/include/wx/caret.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 23.05.99 -// RCS-ID: $Id: caret.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/chartype.h b/Externals/wxWidgets3/include/wx/chartype.h index d122b4c71c..5217258d1b 100644 --- a/Externals/wxWidgets3/include/wx/chartype.h +++ b/Externals/wxWidgets3/include/wx/chartype.h @@ -4,7 +4,6 @@ * Author: Joel Farley, Ove Kåven * Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee * Created: 1998/06/12 - * RCS-ID: $Id: chartype.h 70345 2012-01-15 01:05:28Z VZ $ * Copyright: (c) 1998-2006 wxWidgets dev team * Licence: wxWindows licence */ @@ -48,16 +47,11 @@ Actually MinGW has tchar.h, but it does not include wchar.h */ -#if defined(__MWERKS__) || defined(__VISAGECPP__) || defined(__MINGW32__) || defined(__WATCOMC__) +#if defined(__VISAGECPP__) || defined(__MINGW32__) || defined(__WATCOMC__) #ifndef HAVE_WCHAR_H #define HAVE_WCHAR_H #endif #endif -#if defined(__MWERKS__) && !defined(__MACH__) - #ifndef HAVE_WCSLEN - #define HAVE_WCSLEN - #endif -#endif #ifdef HAVE_WCHAR_H /* the current (as of Nov 2002) version of cygwin has a bug in its */ diff --git a/Externals/wxWidgets3/include/wx/checkbox.h b/Externals/wxWidgets3/include/wx/checkbox.h index 507bf31fea..e0978a0d13 100644 --- a/Externals/wxWidgets3/include/wx/checkbox.h +++ b/Externals/wxWidgets3/include/wx/checkbox.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 07.09.00 -// RCS-ID: $Id: checkbox.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/checkeddelete.h b/Externals/wxWidgets3/include/wx/checkeddelete.h index 3dad109fad..fd295faf8b 100644 --- a/Externals/wxWidgets3/include/wx/checkeddelete.h +++ b/Externals/wxWidgets3/include/wx/checkeddelete.h @@ -3,7 +3,6 @@ // Purpose: wxCHECKED_DELETE() macro // Author: Vadim Zeitlin // Created: 2009-02-03 -// RCS-ID: $Id: checkeddelete.h 58634 2009-02-03 12:01:46Z VZ $ // Copyright: (c) 2002-2009 wxWidgets dev team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -11,6 +10,8 @@ #ifndef _WX_CHECKEDDELETE_H_ #define _WX_CHECKEDDELETE_H_ +#include "wx/cpp.h" + // TODO: provide wxCheckedDelete[Array]() template functions too // ---------------------------------------------------------------------------- @@ -26,28 +27,17 @@ still force a semicolon after the macro */ -#ifdef __WATCOMC__ - #define wxFOR_ONCE(name) for(int name=0; name<1; name++) - #define wxPRE_NO_WARNING_SCOPE(name) wxFOR_ONCE(wxMAKE_UNIQUE_NAME(name)) - #define wxPOST_NO_WARNING_SCOPE(name) -#else - #define wxPRE_NO_WARNING_SCOPE(name) do - #define wxPOST_NO_WARNING_SCOPE(name) while ( wxFalse ) -#endif - #define wxCHECKED_DELETE(ptr) \ - wxPRE_NO_WARNING_SCOPE(scope_var1) \ - { \ + wxSTATEMENT_MACRO_BEGIN \ typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \ delete ptr; \ - } wxPOST_NO_WARNING_SCOPE(scope_var1) + wxSTATEMENT_MACRO_END #define wxCHECKED_DELETE_ARRAY(ptr) \ - wxPRE_NO_WARNING_SCOPE(scope_var2) \ - { \ + wxSTATEMENT_MACRO_BEGIN \ typedef char complete[sizeof(*ptr)] WX_ATTRIBUTE_UNUSED; \ delete [] ptr; \ - } wxPOST_NO_WARNING_SCOPE(scope_var2) + wxSTATEMENT_MACRO_END #endif // _WX_CHECKEDDELETE_H_ diff --git a/Externals/wxWidgets3/include/wx/checklst.h b/Externals/wxWidgets3/include/wx/checklst.h index 0092bc9e0e..3c54304d0e 100644 --- a/Externals/wxWidgets3/include/wx/checklst.h +++ b/Externals/wxWidgets3/include/wx/checklst.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 12.09.00 -// RCS-ID: $Id: checklst.h 65210 2010-08-08 11:35:55Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -37,6 +36,8 @@ public: virtual bool IsChecked(unsigned int item) const = 0; virtual void Check(unsigned int item, bool check = true) = 0; + virtual unsigned int GetCheckedItems(wxArrayInt& checkedItems) const; + wxDECLARE_NO_COPY_CLASS(wxCheckListBoxBase); }; diff --git a/Externals/wxWidgets3/include/wx/chkconf.h b/Externals/wxWidgets3/include/wx/chkconf.h index 80f104911b..47fa8ee467 100644 --- a/Externals/wxWidgets3/include/wx/chkconf.h +++ b/Externals/wxWidgets3/include/wx/chkconf.h @@ -4,7 +4,6 @@ * Author: Vadim Zeitlin * Modified by: * Created: 09.08.00 - * RCS-ID: $Id: chkconf.h 70703 2012-02-26 20:24:25Z VZ $ * Copyright: (c) 2000 Vadim Zeitlin * Licence: wxWindows licence */ @@ -92,6 +91,14 @@ # endif #endif /* wxUSE_ANY */ +#ifndef wxUSE_COMPILER_TLS +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_COMPILER_TLS must be defined, please read comment near the top of this file." +# else +# define wxUSE_COMPILER_TLS 0 +# endif +#endif /* !defined(wxUSE_COMPILER_TLS) */ + #ifndef wxUSE_CONSOLE_EVENTLOOP # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_CONSOLE_EVENTLOOP must be defined, please read comment near the top of this file." @@ -928,6 +935,14 @@ # endif #endif /* !defined(wxUSE_POPUPWIN) */ +#ifndef wxUSE_PREFERENCES_EDITOR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PREFERENCES_EDITOR must be defined, please read comment near the top of this file." +# else +# define wxUSE_PREFERENCES_EDITOR 0 +# endif +#endif /* !defined(wxUSE_PREFERENCES_EDITOR) */ + #ifndef wxUSE_PRINTING_ARCHITECTURE # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_PRINTING_ARCHITECTURE must be defined, please read comment near the top of this file." @@ -1203,8 +1218,11 @@ #if defined(__WXWINCE__) # include "wx/msw/wince/chkconf.h" -#elif defined(__WXMSW__) +#elif defined(__WINDOWS__) # include "wx/msw/chkconf.h" +# if defined(__WXGTK__) +# include "wx/gtk/chkconf.h" +# endif #elif defined(__WXGTK__) # include "wx/gtk/chkconf.h" #elif defined(__WXCOCOA__) @@ -1225,9 +1243,9 @@ /* __UNIX__ is also defined under Cygwin but we shouldn't perform these checks - there if we're building wxMSW. + there if we're building Windows ports. */ -#if defined(__UNIX__) && !defined(__WXMSW__) +#if defined(__UNIX__) && !defined(__WINDOWS__) # include "wx/unix/chkconf.h" #endif @@ -1451,7 +1469,7 @@ */ #if wxUSE_GUI -#if wxUSE_ACCESSIBILITY && !defined(__WXMSW__) && !defined(__GCCXML__) +#if wxUSE_ACCESSIBILITY && !defined(__WXMSW__) # ifdef wxABORT_ON_CONFIG_ERROR # error "wxUSE_ACCESSIBILITY is currently only supported under wxMSW" # else @@ -2181,6 +2199,33 @@ # endif #endif /* wxUSE_WEBVIEW && !any web view backend */ +#if wxUSE_PREFERENCES_EDITOR + /* + We can use either a generic implementation, using wxNotebook, or a + native one under wxOSX/Cocoa but then we must be using the native + toolbar. + */ +# if !wxUSE_NOTEBOOK +# ifdef __WXOSX_COCOA__ +# if !wxUSE_TOOLBAR || !wxOSX_USE_NATIVE_TOOLBAR +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PREFERENCES_EDITOR requires native toolbar in wxOSX" +# else +# undef wxUSE_PREFERENCES_EDITOR +# define wxUSE_PREFERENCES_EDITOR 0 +# endif +# endif +# else +# ifdef wxABORT_ON_CONFIG_ERROR +# error "wxUSE_PREFERENCES_EDITOR requires wxNotebook" +# else +# undef wxUSE_PREFERENCES_EDITOR +# define wxUSE_PREFERENCES_EDITOR 0 +# endif +# endif +# endif +#endif /* wxUSE_PREFERENCES_EDITOR */ + #endif /* wxUSE_GUI */ #endif /* _WX_CHKCONF_H_ */ diff --git a/Externals/wxWidgets3/include/wx/choicdlg.h b/Externals/wxWidgets3/include/wx/choicdlg.h index 36e36757cf..863b880aff 100644 --- a/Externals/wxWidgets3/include/wx/choicdlg.h +++ b/Externals/wxWidgets3/include/wx/choicdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: choicdlg.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/choice.h b/Externals/wxWidgets3/include/wx/choice.h index e7854fb3cc..3a848f9f3c 100644 --- a/Externals/wxWidgets3/include/wx/choice.h +++ b/Externals/wxWidgets3/include/wx/choice.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 26.07.99 -// RCS-ID: $Id: choice.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -58,6 +57,13 @@ public: // override wxItemContainer::IsSorted virtual bool IsSorted() const { return HasFlag(wxCB_SORT); } +protected: + // The generic implementation doesn't determine the height correctly and + // doesn't account for the width of the arrow but does take into account + // the string widths, so the derived classes should override it and set the + // height and add the arrow width to the size returned by this version. + virtual wxSize DoGetBestSize() const; + private: wxDECLARE_NO_COPY_CLASS(wxChoiceBase); }; diff --git a/Externals/wxWidgets3/include/wx/choicebk.h b/Externals/wxWidgets3/include/wx/choicebk.h index abd37cbb7d..335ede165e 100644 --- a/Externals/wxWidgets3/include/wx/choicebk.h +++ b/Externals/wxWidgets3/include/wx/choicebk.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: Wlodzimierz ABX Skiba from wx/listbook.h // Created: 15.09.04 -// RCS-ID: $Id: choicebk.h 68810 2011-08-21 14:08:49Z VZ $ // Copyright: (c) Vadim Zeitlin, Wlodzimierz Skiba // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -18,11 +17,12 @@ #include "wx/bookctrl.h" #include "wx/choice.h" +#include "wx/containr.h" class WXDLLIMPEXP_FWD_CORE wxChoice; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CHOICEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_CHOICEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); // wxChoicebook flags #define wxCHB_DEFAULT wxBK_DEFAULT @@ -36,7 +36,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGI // wxChoicebook // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxChoicebook : public wxBookCtrlBase +class WXDLLIMPEXP_CORE wxChoicebook : public wxNavigationEnabled { public: wxChoicebook() { } @@ -111,15 +111,19 @@ private: // ---------------------------------------------------------------------------- // wxChoicebookEvent is obsolete and defined for compatibility only -typedef wxBookCtrlEvent wxChoicebookEvent; +#define wxChoicebookEvent wxBookCtrlEvent typedef wxBookCtrlEventFunction wxChoicebookEventFunction; #define wxChoicebookEventHandler(func) wxBookCtrlEventHandler(func) #define EVT_CHOICEBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_CHOICEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) #define EVT_CHOICEBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_CHOICEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED wxEVT_CHOICEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING wxEVT_CHOICEBOOK_PAGE_CHANGING #endif // wxUSE_CHOICEBOOK diff --git a/Externals/wxWidgets3/include/wx/clipbrd.h b/Externals/wxWidgets3/include/wx/clipbrd.h index f9ff4df6af..5399be27d5 100644 --- a/Externals/wxWidgets3/include/wx/clipbrd.h +++ b/Externals/wxWidgets3/include/wx/clipbrd.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.10.99 -// RCS-ID: $Id: clipbrd.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) wxWidgets Team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/clntdata.h b/Externals/wxWidgets3/include/wx/clntdata.h index 177bf31c22..a41ccc0ea9 100644 --- a/Externals/wxWidgets3/include/wx/clntdata.h +++ b/Externals/wxWidgets3/include/wx/clntdata.h @@ -4,7 +4,6 @@ // Author: Robin Dunn // Modified by: // Created: 9-Oct-2001 -// RCS-ID: $Id: clntdata.h 47730 2007-07-26 13:54:14Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/clrpicker.h b/Externals/wxWidgets3/include/wx/clrpicker.h index 38bc05465e..1794ee68c9 100644 --- a/Externals/wxWidgets3/include/wx/clrpicker.h +++ b/Externals/wxWidgets3/include/wx/clrpicker.h @@ -5,7 +5,6 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Vadim Zeitlin, Francesco Montorsi -// RCS-ID: $Id: clrpicker.h 58718 2009-02-07 18:59:25Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -98,7 +97,7 @@ protected: class WXDLLIMPEXP_CORE wxColourPickerCtrl : public wxPickerBase { public: - wxColourPickerCtrl() : m_bIgnoreNextTextCtrlUpdate(false) {} + wxColourPickerCtrl() {} virtual ~wxColourPickerCtrl() {} @@ -107,7 +106,6 @@ public: const wxSize& size = wxDefaultSize, long style = wxCLRP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxColourPickerCtrlNameStr) - : m_bIgnoreNextTextCtrlUpdate(false) { Create(parent, id, col, pos, size, style, validator, name); } bool Create(wxWindow *parent, wxWindowID id, @@ -148,9 +146,6 @@ protected: virtual long GetPickerStyle(long style) const { return (style & wxCLRP_SHOW_LABEL); } - // true if the next UpdateTextCtrl() call is to ignore - bool m_bIgnoreNextTextCtrlUpdate; - private: DECLARE_DYNAMIC_CLASS(wxColourPickerCtrl) }; @@ -160,14 +155,14 @@ private: // wxColourPickerEvent: used by wxColourPickerCtrl only // ---------------------------------------------------------------------------- -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLOURPICKER_CHANGED, wxColourPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COLOURPICKER_CHANGED, wxColourPickerEvent ); class WXDLLIMPEXP_CORE wxColourPickerEvent : public wxCommandEvent { public: wxColourPickerEvent() {} wxColourPickerEvent(wxObject *generator, int id, const wxColour &col) - : wxCommandEvent(wxEVT_COMMAND_COLOURPICKER_CHANGED, id), + : wxCommandEvent(wxEVT_COLOURPICKER_CHANGED, id), m_colour(col) { SetEventObject(generator); @@ -196,9 +191,12 @@ typedef void (wxEvtHandler::*wxColourPickerEventFunction)(wxColourPickerEvent&); wxEVENT_HANDLER_CAST(wxColourPickerEventFunction, func) #define EVT_COLOURPICKER_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_COLOURPICKER_CHANGED, id, wxColourPickerEventHandler(fn)) +// old wxEVT_COMMAND_* constant +#define wxEVT_COMMAND_COLOURPICKER_CHANGED wxEVT_COLOURPICKER_CHANGED + #endif // wxUSE_COLOURPICKERCTRL #endif // _WX_CLRPICKER_H_BASE_ diff --git a/Externals/wxWidgets3/include/wx/cmdargs.h b/Externals/wxWidgets3/include/wx/cmdargs.h index 3819af475f..e4167f0fd6 100644 --- a/Externals/wxWidgets3/include/wx/cmdargs.h +++ b/Externals/wxWidgets3/include/wx/cmdargs.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxCmdLineArgsArray helper class // Author: Vadim Zeitlin // Created: 2007-11-12 -// RCS-ID: $Id: cmdargs.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cmdline.h b/Externals/wxWidgets3/include/wx/cmdline.h index 8d02fa3a68..3dd41b9fe4 100644 --- a/Externals/wxWidgets3/include/wx/cmdline.h +++ b/Externals/wxWidgets3/include/wx/cmdline.h @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 04.01.00 -// RCS-ID: $Id: cmdline.h 69797 2011-11-22 13:18:58Z VZ $ // Copyright: (c) 2000 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cmdproc.h b/Externals/wxWidgets3/include/wx/cmdproc.h index e1692cbef5..c6125096a0 100644 --- a/Externals/wxWidgets3/include/wx/cmdproc.h +++ b/Externals/wxWidgets3/include/wx/cmdproc.h @@ -4,7 +4,6 @@ // Author: Julian Smart (extracted from docview.h by VZ) // Modified by: // Created: 05.11.00 -// RCS-ID: $Id: cmdproc.h 70459 2012-01-25 00:05:09Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cmndata.h b/Externals/wxWidgets3/include/wx/cmndata.h index ce330fde5e..c8e345af56 100644 --- a/Externals/wxWidgets3/include/wx/cmndata.h +++ b/Externals/wxWidgets3/include/wx/cmndata.h @@ -4,7 +4,6 @@ // Author: Julian Smart and others // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: cmndata.h 70636 2012-02-20 21:55:55Z VZ $ // Copyright: (c) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSApplication.h b/Externals/wxWidgets3/include/wx/cocoa/NSApplication.h index 4c3390db5d..192d282782 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSApplication.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSApplication.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/01/26 -// RCS-ID: $Id: NSApplication.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 2003,2004 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSBox.h b/Externals/wxWidgets3/include/wx/cocoa/NSBox.h index 6bb62b5556..39cbe3de5f 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSBox.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSBox.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/19 -// RCS-ID: $Id: NSBox.h 58022 2009-01-11 12:00:51Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSButton.h b/Externals/wxWidgets3/include/wx/cocoa/NSButton.h index 4cbcbb7a71..7e32aac07d 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSButton.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSButton.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/12/09 -// RCS-ID: $Id: NSButton.h 38031 2006-03-12 15:10:23Z VZ $ // Copyright: (c) 2002-2004 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSControl.h b/Externals/wxWidgets3/include/wx/cocoa/NSControl.h index 7fd8ee2664..f921c337d1 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSControl.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSControl.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/02/15 -// RCS-ID: $Id: NSControl.h 58022 2009-01-11 12:00:51Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSMenu.h b/Externals/wxWidgets3/include/wx/cocoa/NSMenu.h index ad0cbd592e..a413ad45a6 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSMenu.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSMenu.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/12/09 -// RCS-ID: $Id: NSMenu.h 49523 2007-10-29 16:18:59Z DE $ // Copyright: (c) 2002 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSPanel.h b/Externals/wxWidgets3/include/wx/cocoa/NSPanel.h index 0426742d85..25acf54c42 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSPanel.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSPanel.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: NSPanel.h 42046 2006-10-16 09:30:01Z ABX $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSScroller.h b/Externals/wxWidgets3/include/wx/cocoa/NSScroller.h index 9031df7909..3cafc5815a 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSScroller.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSScroller.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/04/27 -// RCS-ID: $Id: NSScroller.h 38031 2006-03-12 15:10:23Z VZ $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSSlider.h b/Externals/wxWidgets3/include/wx/cocoa/NSSlider.h index 62edaeb422..0f278984ee 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSSlider.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSSlider.h @@ -4,7 +4,6 @@ // Author: Mark Oxenham // Modified by: David Elliott // Created: 2007/08/10 -// RCS-ID: $Id: NSSlider.h 64940 2010-07-13 13:29:13Z VZ $ // Copyright: (c) 2007 Software 2000 Ltd. All rights reserved. // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSTabView.h b/Externals/wxWidgets3/include/wx/cocoa/NSTabView.h index 21b6a29109..8c4320d0ae 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSTabView.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSTabView.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/04/08 -// RCS-ID: $Id: NSTabView.h 38031 2006-03-12 15:10:23Z VZ $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSTableDataSource.h b/Externals/wxWidgets3/include/wx/cocoa/NSTableDataSource.h index fbb4213bac..39e96a8343 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSTableDataSource.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSTableDataSource.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/08/05 -// RCS-ID: $Id: NSTableDataSource.h 48106 2007-08-15 16:10:19Z DE $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSTableView.h b/Externals/wxWidgets3/include/wx/cocoa/NSTableView.h index 2c47e7b54b..749a844d03 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSTableView.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSTableView.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/08/05 -// RCS-ID: $Id: NSTableView.h 38031 2006-03-12 15:10:23Z VZ $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSTextField.h b/Externals/wxWidgets3/include/wx/cocoa/NSTextField.h index f497dc7412..5632318677 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSTextField.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSTextField.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/12/09 -// RCS-ID: $Id: NSTextField.h 58022 2009-01-11 12:00:51Z FM $ // Copyright: (c) 2002 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSView.h b/Externals/wxWidgets3/include/wx/cocoa/NSView.h index fbc17f20d4..3095fb1738 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSView.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSView.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/02/15 -// RCS-ID: $Id: NSView.h 51576 2008-02-06 20:10:07Z DE $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/NSWindow.h b/Externals/wxWidgets3/include/wx/cocoa/NSWindow.h index 0f4349db19..228ffe3ed0 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/NSWindow.h +++ b/Externals/wxWidgets3/include/wx/cocoa/NSWindow.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: NSWindow.h 49523 2007-10-29 16:18:59Z DE $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/ObjcAssociate.h b/Externals/wxWidgets3/include/wx/cocoa/ObjcAssociate.h index 45fd153efe..a6bf6e2ce4 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/ObjcAssociate.h +++ b/Externals/wxWidgets3/include/wx/cocoa/ObjcAssociate.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/12/03 -// RCS-ID: $Id: ObjcAssociate.h 42046 2006-10-16 09:30:01Z ABX $ // Copyright: (c) 2002 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/ObjcRef.h b/Externals/wxWidgets3/include/wx/cocoa/ObjcRef.h index 89c10199b5..d4aa6d91ec 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/ObjcRef.h +++ b/Externals/wxWidgets3/include/wx/cocoa/ObjcRef.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/03/28 -// RCS-ID: $Id: ObjcRef.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/app.h b/Externals/wxWidgets3/include/wx/cocoa/app.h index e0503fd9c6..dffb0cae63 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/app.h +++ b/Externals/wxWidgets3/include/wx/cocoa/app.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/11/27 -// RCS-ID: $Id: app.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2002 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/autorelease.h b/Externals/wxWidgets3/include/wx/cocoa/autorelease.h index 8006e36a46..cd5f6b3e26 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/autorelease.h +++ b/Externals/wxWidgets3/include/wx/cocoa/autorelease.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/07/11 -// RCS-ID: $Id: autorelease.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/bitmap.h b/Externals/wxWidgets3/include/wx/cocoa/bitmap.h index ac7e113b9c..392b50b5b9 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/bitmap.h +++ b/Externals/wxWidgets3/include/wx/cocoa/bitmap.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/07/19 -// RCS-ID: $Id: bitmap.h 59526 2009-03-14 13:57:51Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -64,7 +63,8 @@ protected: // wxBitmap // ======================================================================== -class WXDLLIMPEXP_CORE wxBitmap: public wxGDIObject +class WXDLLIMPEXP_CORE wxBitmap: public wxGDIObject, + public wxBitmapHelpers { // ------------------------------------------------------------------------ // initialization diff --git a/Externals/wxWidgets3/include/wx/cocoa/bmpbuttn.h b/Externals/wxWidgets3/include/wx/cocoa/bmpbuttn.h index 3517aa972a..10a1394872 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/bmpbuttn.h +++ b/Externals/wxWidgets3/include/wx/cocoa/bmpbuttn.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: bmpbuttn.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/brush.h b/Externals/wxWidgets3/include/wx/cocoa/brush.h index 82facc206a..d67294beac 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/brush.h +++ b/Externals/wxWidgets3/include/wx/cocoa/brush.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/07/03 -// RCS-ID: $Id: brush.h 54273 2008-06-17 17:28:26Z VZ $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/button.h b/Externals/wxWidgets3/include/wx/cocoa/button.h index f328a9a338..d58d0fb6bd 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/button.h +++ b/Externals/wxWidgets3/include/wx/cocoa/button.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/12/29 -// RCS-ID: $Id: button.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2002 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/checkbox.h b/Externals/wxWidgets3/include/wx/cocoa/checkbox.h index 7dee9d265d..ba811c54e8 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/checkbox.h +++ b/Externals/wxWidgets3/include/wx/cocoa/checkbox.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: checkbox.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/checklst.h b/Externals/wxWidgets3/include/wx/cocoa/checklst.h index 0a7ab329db..8f07894342 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/checklst.h +++ b/Externals/wxWidgets3/include/wx/cocoa/checklst.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: checklst.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/chkconf.h b/Externals/wxWidgets3/include/wx/cocoa/chkconf.h index 0b2516cc44..77ccadfe68 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/chkconf.h +++ b/Externals/wxWidgets3/include/wx/cocoa/chkconf.h @@ -3,7 +3,6 @@ * Purpose: wxCocoa-specific config settings checks * Author: Vadim Zeitlin * Created: 2008-09-11 - * RCS-ID: $Id: chkconf.h 67497 2011-04-15 19:18:34Z DS $ * Copyright: (c) 2008 Vadim Zeitlin * Licence: wxWindows licence */ diff --git a/Externals/wxWidgets3/include/wx/cocoa/choice.h b/Externals/wxWidgets3/include/wx/cocoa/choice.h index 594372ea9a..7fe2c06e8d 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/choice.h +++ b/Externals/wxWidgets3/include/wx/cocoa/choice.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: choice.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/clipbrd.h b/Externals/wxWidgets3/include/wx/cocoa/clipbrd.h index bab90b9d77..8571f8f56d 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/clipbrd.h +++ b/Externals/wxWidgets3/include/wx/cocoa/clipbrd.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/07/23 -// RCS-ID: $Id: clipbrd.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/colour.h b/Externals/wxWidgets3/include/wx/cocoa/colour.h index 5a0fe6b5cc..97593a3e3f 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/colour.h +++ b/Externals/wxWidgets3/include/wx/cocoa/colour.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/06/17 -// RCS-ID: $Id: colour.h 54125 2008-06-11 19:17:41Z SC $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/combobox.h b/Externals/wxWidgets3/include/wx/cocoa/combobox.h index 5762ab9830..dc09cf216c 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/combobox.h +++ b/Externals/wxWidgets3/include/wx/cocoa/combobox.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 2005/02/16 -// RCS-ID: $Id: combobox.h 59263 2009-03-02 12:25:01Z VZ $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/control.h b/Externals/wxWidgets3/include/wx/cocoa/control.h index 052140632e..cb493202a6 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/control.h +++ b/Externals/wxWidgets3/include/wx/cocoa/control.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/02/15 -// RCS-ID: $Id: control.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/cursor.h b/Externals/wxWidgets3/include/wx/cocoa/cursor.h index 5f2e476287..54209f0b19 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/cursor.h +++ b/Externals/wxWidgets3/include/wx/cocoa/cursor.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/11/27 -// RCS-ID: $Id: cursor.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/dataform.h b/Externals/wxWidgets3/include/wx/cocoa/dataform.h index 2ada9b1530..870ddb0470 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/dataform.h +++ b/Externals/wxWidgets3/include/wx/cocoa/dataform.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/07/23 -// RCS-ID: $Id: dataform.h 46254 2007-05-30 22:02:19Z VS $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/dataobj.h b/Externals/wxWidgets3/include/wx/cocoa/dataobj.h index ce7249e95a..d525029f9c 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/dataobj.h +++ b/Externals/wxWidgets3/include/wx/cocoa/dataobj.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/07/23 -// RCS-ID: $Id: dataobj.h 48095 2007-08-15 13:05:35Z VS $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/dataobj2.h b/Externals/wxWidgets3/include/wx/cocoa/dataobj2.h index 49bb62b052..b824fe933e 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/dataobj2.h +++ b/Externals/wxWidgets3/include/wx/cocoa/dataobj2.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/07/23 -// RCS-ID: $Id: dataobj2.h 58227 2009-01-19 13:55:27Z VZ $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/dc.h b/Externals/wxWidgets3/include/wx/cocoa/dc.h index e388eccaec..0d4fec2065 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/dc.h +++ b/Externals/wxWidgets3/include/wx/cocoa/dc.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/04/01 -// RCS-ID: $Id: dc.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -165,9 +164,9 @@ protected: virtual void DoGetSize(int *width, int *height) const; virtual void DoGetSizeMM(int* width, int* height) const; - virtual void DoDrawLines(int n, wxPoint points[], + virtual void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset); - virtual void DoDrawPolygon(int n, wxPoint points[], + virtual void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); }; diff --git a/Externals/wxWidgets3/include/wx/cocoa/dcclient.h b/Externals/wxWidgets3/include/wx/cocoa/dcclient.h index 353f0e6a2b..631c6ffd33 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/dcclient.h +++ b/Externals/wxWidgets3/include/wx/cocoa/dcclient.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/04/01 -// RCS-ID: $Id: dcclient.h 50462 2007-12-04 04:22:16Z DE $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/dcmemory.h b/Externals/wxWidgets3/include/wx/cocoa/dcmemory.h index 565df57236..33846293c3 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/dcmemory.h +++ b/Externals/wxWidgets3/include/wx/cocoa/dcmemory.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: dcmemory.h 57907 2009-01-08 14:21:53Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/dcscreen.h b/Externals/wxWidgets3/include/wx/cocoa/dcscreen.h index 2c921e2ca6..af7d4ee54e 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/dcscreen.h +++ b/Externals/wxWidgets3/include/wx/cocoa/dcscreen.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: dcscreen.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/dialog.h b/Externals/wxWidgets3/include/wx/cocoa/dialog.h index b9af3e5bc1..632df8f1bb 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/dialog.h +++ b/Externals/wxWidgets3/include/wx/cocoa/dialog.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/12/15 -// RCS-ID: $Id: dialog.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/dirdlg.h b/Externals/wxWidgets3/include/wx/cocoa/dirdlg.h index 2d2ffd3b6f..207f79baac 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/dirdlg.h +++ b/Externals/wxWidgets3/include/wx/cocoa/dirdlg.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: Hiroyuki Nakamura(maloninc) // Created: 2006-01-10 -// RCS-ID: $Id: dirdlg.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/evtloop.h b/Externals/wxWidgets3/include/wx/cocoa/evtloop.h index 99b990dc0a..366e46cb1b 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/evtloop.h +++ b/Externals/wxWidgets3/include/wx/cocoa/evtloop.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxGUIEventLoop for wxCocoa // Author: Vadim Zeitlin // Created: 2008-12-28 -// RCS-ID: $Id: evtloop.h 58911 2009-02-15 14:25:08Z FM $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -20,8 +19,7 @@ class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase public: wxGUIEventLoop() { m_exitcode = 0; } - virtual int Run(); - virtual void Exit(int rc = 0); + virtual void ScheduleExit(int rc = 0); virtual bool Pending() const; virtual bool Dispatch(); virtual int DispatchTimeout(unsigned long timeout); @@ -29,6 +27,8 @@ public: virtual bool YieldFor(long eventsToProcess); protected: + virtual int DoRun(); + int m_exitcode; wxDECLARE_NO_COPY_CLASS(wxGUIEventLoop); diff --git a/Externals/wxWidgets3/include/wx/cocoa/filedlg.h b/Externals/wxWidgets3/include/wx/cocoa/filedlg.h index 45b8b8be19..b888be18e7 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/filedlg.h +++ b/Externals/wxWidgets3/include/wx/cocoa/filedlg.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 2004-10-02 -// RCS-ID: $Id: filedlg.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/font.h b/Externals/wxWidgets3/include/wx/cocoa/font.h index 4783532b44..c9c245f9e1 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/font.h +++ b/Externals/wxWidgets3/include/wx/cocoa/font.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: font.h 70445 2012-01-23 11:28:21Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -38,6 +37,20 @@ public: */ wxFont() { } + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + /*! @abstract Platform-independent construction with individual properties */ #if FUTURE_WXWIN_COMPATIBILITY_3_0 @@ -75,19 +88,6 @@ public: SetPixelSize(pixelSize); } - wxFont(int pointSize, - wxFontFamily family, - int flags = wxFONTFLAG_DEFAULT, - const wxString& face = wxEmptyString, - wxFontEncoding encoding = wxFONTENCODING_DEFAULT) - { - Create(pointSize, family, - GetStyleFromFlags(flags), - GetWeightFromFlags(flags), - GetUnderlinedFromFlags(flags), - face, encoding); - } - /*! @abstract Construction with opaque wxNativeFontInfo */ wxFont(const wxNativeFontInfo& info) diff --git a/Externals/wxWidgets3/include/wx/cocoa/frame.h b/Externals/wxWidgets3/include/wx/cocoa/frame.h index 0f62c5fbdc..ebdb56ed34 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/frame.h +++ b/Externals/wxWidgets3/include/wx/cocoa/frame.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: frame.h 60337 2009-04-25 12:59:09Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/gauge.h b/Externals/wxWidgets3/include/wx/cocoa/gauge.h index 0ee7b991d4..ffadb1c27b 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/gauge.h +++ b/Externals/wxWidgets3/include/wx/cocoa/gauge.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/07/15 -// RCS-ID: $Id: gauge.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/glcanvas.h b/Externals/wxWidgets3/include/wx/cocoa/glcanvas.h index 3a58bc1b0a..927c3e05ee 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/glcanvas.h +++ b/Externals/wxWidgets3/include/wx/cocoa/glcanvas.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/09/29 -// RCS-ID: $Id: glcanvas.h 47254 2007-07-09 10:09:52Z VS $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/icon.h b/Externals/wxWidgets3/include/wx/cocoa/icon.h index e4b48aa082..ac041ba354 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/icon.h +++ b/Externals/wxWidgets3/include/wx/cocoa/icon.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/08/11 -// RCS-ID: $Id: icon.h 65887 2010-10-23 21:47:22Z VZ $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/listbox.h b/Externals/wxWidgets3/include/wx/cocoa/listbox.h index 257c172c34..a9f233aa8a 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/listbox.h +++ b/Externals/wxWidgets3/include/wx/cocoa/listbox.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: listbox.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/log.h b/Externals/wxWidgets3/include/wx/cocoa/log.h index 9532068fe7..82f9319a48 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/log.h +++ b/Externals/wxWidgets3/include/wx/cocoa/log.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/02/07 -// RCS-ID: $Id: log.h 27408 2004-05-23 20:53:33Z JS $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/mbarman.h b/Externals/wxWidgets3/include/wx/cocoa/mbarman.h index 33c2f72f4c..0223cb5c74 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/mbarman.h +++ b/Externals/wxWidgets3/include/wx/cocoa/mbarman.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/09/04 -// RCS-ID: $Id: mbarman.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/mdi.h b/Externals/wxWidgets3/include/wx/cocoa/mdi.h index b2a547aaa2..6cef55caf2 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/mdi.h +++ b/Externals/wxWidgets3/include/wx/cocoa/mdi.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes // Created: 2003/09/08 -// RCS-ID: $Id: mdi.h 56674 2008-11-04 02:46:19Z VZ $ // Copyright: (c) 2003 David Elliott // (c) 2008 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/cocoa/menu.h b/Externals/wxWidgets3/include/wx/cocoa/menu.h index a2fe37c21e..0cb304126f 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/menu.h +++ b/Externals/wxWidgets3/include/wx/cocoa/menu.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/12/09 -// RCS-ID: $Id: menu.h 58022 2009-01-11 12:00:51Z FM $ // Copyright: (c) 2002 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/menuitem.h b/Externals/wxWidgets3/include/wx/cocoa/menuitem.h index 9029b6d056..23983171bb 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/menuitem.h +++ b/Externals/wxWidgets3/include/wx/cocoa/menuitem.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/12/13 -// RCS-ID: $Id: menuitem.h 58227 2009-01-19 13:55:27Z VZ $ // Copyright: (c) 2002 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/msgdlg.h b/Externals/wxWidgets3/include/wx/cocoa/msgdlg.h index 1f6527983b..4a313c44af 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/msgdlg.h +++ b/Externals/wxWidgets3/include/wx/cocoa/msgdlg.h @@ -3,7 +3,6 @@ // Purpose: wxMessageDialog class // Author: Gareth Simpson // Created: 2007-10-29 -// RCS-ID: $Id: msgdlg.h 67254 2011-03-20 00:14:35Z DS $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/notebook.h b/Externals/wxWidgets3/include/wx/cocoa/notebook.h index fade3ac3a6..0fe99e91a1 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/notebook.h +++ b/Externals/wxWidgets3/include/wx/cocoa/notebook.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/04/08 -// RCS-ID: $Id: notebook.h 68810 2011-08-21 14:08:49Z VZ $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/objc/NSMenu.h b/Externals/wxWidgets3/include/wx/cocoa/objc/NSMenu.h index 96796116fb..780d306058 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/objc/NSMenu.h +++ b/Externals/wxWidgets3/include/wx/cocoa/objc/NSMenu.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2007/04/20 (move from NSMenu.mm) -// RCS-ID: $Id: NSMenu.h 48106 2007-08-15 16:10:19Z DE $ // Copyright: (c) 2002 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/objc/NSSlider.h b/Externals/wxWidgets3/include/wx/cocoa/objc/NSSlider.h index 4e94a28cfd..3534d8576f 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/objc/NSSlider.h +++ b/Externals/wxWidgets3/include/wx/cocoa/objc/NSSlider.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2007/08/10 (move from NSSlider.mm) -// RCS-ID: $Id: NSSlider.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2007 Software 2000 Ltd. // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/objc/NSView.h b/Externals/wxWidgets3/include/wx/cocoa/objc/NSView.h index f937cffa83..f4c5f04ebf 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/objc/NSView.h +++ b/Externals/wxWidgets3/include/wx/cocoa/objc/NSView.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2007/04/20 (move from NSView.mm) -// RCS-ID: $Id: NSView.h 46229 2007-05-28 04:22:10Z DE $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/objc/NSWindow.h b/Externals/wxWidgets3/include/wx/cocoa/objc/NSWindow.h index df1e67306c..bed9e59838 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/objc/NSWindow.h +++ b/Externals/wxWidgets3/include/wx/cocoa/objc/NSWindow.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2007/04/20 (move from NSWindow.mm) -// RCS-ID: $Id: NSWindow.h 47988 2007-08-09 18:15:50Z DE $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/objc/objc_uniquifying.h b/Externals/wxWidgets3/include/wx/cocoa/objc/objc_uniquifying.h index 5c8eead739..bedbf44677 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/objc/objc_uniquifying.h +++ b/Externals/wxWidgets3/include/wx/cocoa/objc/objc_uniquifying.h @@ -7,7 +7,6 @@ // Author: David Elliott // Modified by: // Created: 2007/05/15 -// RCS-ID: $Id: objc_uniquifying.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 2007 Software 2000 Ltd. // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/pen.h b/Externals/wxWidgets3/include/wx/cocoa/pen.h index 1412cf8d25..66a0c7f367 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/pen.h +++ b/Externals/wxWidgets3/include/wx/cocoa/pen.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/08/02 (stubs from 22.03.2003) -// RCS-ID: $Id: pen.h 54273 2008-06-17 17:28:26Z VZ $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/private/fontfactory.h b/Externals/wxWidgets3/include/wx/cocoa/private/fontfactory.h index 2872e7fe52..7cbfcfe0d1 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/private/fontfactory.h +++ b/Externals/wxWidgets3/include/wx/cocoa/private/fontfactory.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2007-10-13 -// RCS-ID: $Id: fontfactory.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: 2007 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/private/scrollview.h b/Externals/wxWidgets3/include/wx/cocoa/private/scrollview.h index dcfc64d484..fe07ff9fa1 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/private/scrollview.h +++ b/Externals/wxWidgets3/include/wx/cocoa/private/scrollview.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2008/02/14 -// RCS-ID: $Id: scrollview.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 2003- David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/private/timer.h b/Externals/wxWidgets3/include/wx/cocoa/private/timer.h index f6e707bba3..1dec2cf7fb 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/private/timer.h +++ b/Externals/wxWidgets3/include/wx/cocoa/private/timer.h @@ -2,7 +2,6 @@ // Name: wx/cocoa/private/timer.h // Purpose: Cocoa wxTimer class // Author: Ryan Norton -// Id: $Id: timer.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/radiobox.h b/Externals/wxWidgets3/include/wx/cocoa/radiobox.h index cc5fbe545f..a56a0c654b 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/radiobox.h +++ b/Externals/wxWidgets3/include/wx/cocoa/radiobox.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/18 -// RCS-ID: $Id: radiobox.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/radiobut.h b/Externals/wxWidgets3/include/wx/cocoa/radiobut.h index 175e3b8965..4a78b617c2 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/radiobut.h +++ b/Externals/wxWidgets3/include/wx/cocoa/radiobut.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/18 -// RCS-ID: $Id: radiobut.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/region.h b/Externals/wxWidgets3/include/wx/cocoa/region.h index 610b2e68f7..c9aed9592d 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/region.h +++ b/Externals/wxWidgets3/include/wx/cocoa/region.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/04/12 -// RCS-ID: $Id: region.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/scrolbar.h b/Externals/wxWidgets3/include/wx/cocoa/scrolbar.h index ae86af1322..a051896ef7 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/scrolbar.h +++ b/Externals/wxWidgets3/include/wx/cocoa/scrolbar.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/04/25 -// RCS-ID: $Id: scrolbar.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/slider.h b/Externals/wxWidgets3/include/wx/cocoa/slider.h index 6aa00cb34e..5e73aa1796 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/slider.h +++ b/Externals/wxWidgets3/include/wx/cocoa/slider.h @@ -5,7 +5,6 @@ // Mark Oxenham // Modified by: // Created: 2003/06/19 -// RCS-ID: $Id: slider.h 66844 2011-02-05 16:36:30Z VZ $ // Copyright: (c) 2003 David Elliott // (c) 2007 Software 2000 Ltd. // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/cocoa/sound.h b/Externals/wxWidgets3/include/wx/cocoa/sound.h index 09bc45523d..362e2e288d 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/sound.h +++ b/Externals/wxWidgets3/include/wx/cocoa/sound.h @@ -5,7 +5,6 @@ // Authors: David Elliott, Ryan Norton // Modified by: // Created: 2004-10-02 -// RCS-ID: $Id: sound.h 69178 2011-09-21 15:08:02Z VZ $ // Copyright: (c) 2004 David Elliott, Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/spinbutt.h b/Externals/wxWidgets3/include/wx/cocoa/spinbutt.h index 0e5ad4b80d..d4dc80dfc0 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/spinbutt.h +++ b/Externals/wxWidgets3/include/wx/cocoa/spinbutt.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/07/14 -// RCS-ID: $Id: spinbutt.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/statbmp.h b/Externals/wxWidgets3/include/wx/cocoa/statbmp.h index 255940e55e..f06b129d9f 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/statbmp.h +++ b/Externals/wxWidgets3/include/wx/cocoa/statbmp.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: statbmp.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/statbox.h b/Externals/wxWidgets3/include/wx/cocoa/statbox.h index 7b73c1b540..f19579850c 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/statbox.h +++ b/Externals/wxWidgets3/include/wx/cocoa/statbox.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/18 -// RCS-ID: $Id: statbox.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/statline.h b/Externals/wxWidgets3/include/wx/cocoa/statline.h index 58d3beec1c..3834a37637 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/statline.h +++ b/Externals/wxWidgets3/include/wx/cocoa/statline.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/18 -// RCS-ID: $Id: statline.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/stattext.h b/Externals/wxWidgets3/include/wx/cocoa/stattext.h index dd1e8b4daa..176d53a0be 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/stattext.h +++ b/Externals/wxWidgets3/include/wx/cocoa/stattext.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/02/15 -// RCS-ID: $Id: stattext.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/string.h b/Externals/wxWidgets3/include/wx/cocoa/string.h index e61f5bfc07..65112a053a 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/string.h +++ b/Externals/wxWidgets3/include/wx/cocoa/string.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/04/13 -// RCS-ID: $Id: string.h 54721 2008-07-19 19:59:59Z VZ $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/taskbar.h b/Externals/wxWidgets3/include/wx/cocoa/taskbar.h index 9d23714b46..9c52bfc6c8 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/taskbar.h +++ b/Externals/wxWidgets3/include/wx/cocoa/taskbar.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/01/24 -// RCS-ID: $Id: taskbar.h 50646 2007-12-12 01:35:53Z VZ $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/textctrl.h b/Externals/wxWidgets3/include/wx/cocoa/textctrl.h index e07bf8653c..d7b8c0aa7c 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/textctrl.h +++ b/Externals/wxWidgets3/include/wx/cocoa/textctrl.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/03/16 -// RCS-ID: $Id: textctrl.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/toolbar.h b/Externals/wxWidgets3/include/wx/cocoa/toolbar.h index fbf432ee12..ce57dee03f 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/toolbar.h +++ b/Externals/wxWidgets3/include/wx/cocoa/toolbar.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2003/08/17 -// RCS-ID: $Id: toolbar.h 48095 2007-08-15 13:05:35Z VS $ // Copyright: (c) 2003 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/tooltip.h b/Externals/wxWidgets3/include/wx/cocoa/tooltip.h index f269485546..a096a54236 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/tooltip.h +++ b/Externals/wxWidgets3/include/wx/cocoa/tooltip.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 31.01.99 -// RCS-ID: $Id: tooltip.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/toplevel.h b/Externals/wxWidgets3/include/wx/cocoa/toplevel.h index 4d138c3ed3..d0768294d3 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/toplevel.h +++ b/Externals/wxWidgets3/include/wx/cocoa/toplevel.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/12/08 -// RCS-ID: $Id: toplevel.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2002 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/trackingrectmanager.h b/Externals/wxWidgets3/include/wx/cocoa/trackingrectmanager.h index e7bd1a3581..eac59b07b4 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/trackingrectmanager.h +++ b/Externals/wxWidgets3/include/wx/cocoa/trackingrectmanager.h @@ -5,7 +5,6 @@ // Author: David Elliott // Modified by: // Created: 2007/05/02 -// RCS-ID: $Id: trackingrectmanager.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2007 Software 2000 Ltd. // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cocoa/window.h b/Externals/wxWidgets3/include/wx/cocoa/window.h index 9503574827..a060f37892 100644 --- a/Externals/wxWidgets3/include/wx/cocoa/window.h +++ b/Externals/wxWidgets3/include/wx/cocoa/window.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2002/12/26 -// RCS-ID: $Id: window.h 60984 2009-06-10 16:41:41Z VZ $ // Copyright: (c) 2002 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/collpane.h b/Externals/wxWidgets3/include/wx/collpane.h index 5311be7cb9..40c8939b01 100644 --- a/Externals/wxWidgets3/include/wx/collpane.h +++ b/Externals/wxWidgets3/include/wx/collpane.h @@ -4,7 +4,6 @@ // Author: Francesco Montorsi // Modified by: // Created: 8/10/2006 -// RCS-ID: $Id: collpane.h 58718 2009-02-07 18:59:25Z VZ $ // Copyright: (c) Francesco Montorsi // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -53,14 +52,14 @@ public: class WXDLLIMPEXP_FWD_CORE wxCollapsiblePaneEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_COLLPANE_CHANGED, wxCollapsiblePaneEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COLLAPSIBLEPANE_CHANGED, wxCollapsiblePaneEvent ); class WXDLLIMPEXP_CORE wxCollapsiblePaneEvent : public wxCommandEvent { public: wxCollapsiblePaneEvent() {} wxCollapsiblePaneEvent(wxObject *generator, int id, bool collapsed) - : wxCommandEvent(wxEVT_COMMAND_COLLPANE_CHANGED, id), + : wxCommandEvent(wxEVT_COLLAPSIBLEPANE_CHANGED, id), m_bCollapsed(collapsed) { SetEventObject(generator); @@ -89,7 +88,7 @@ typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEv wxEVENT_HANDLER_CAST(wxCollapsiblePaneEventFunction, func) #define EVT_COLLAPSIBLEPANE_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_COLLPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_COLLAPSIBLEPANE_CHANGED, id, wxCollapsiblePaneEventHandler(fn)) #if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) @@ -101,6 +100,9 @@ typedef void (wxEvtHandler::*wxCollapsiblePaneEventFunction)(wxCollapsiblePaneEv #define wxCollapsiblePane wxGenericCollapsiblePane #endif +// old wxEVT_COMMAND_* constant +#define wxEVT_COMMAND_COLLPANE_CHANGED wxEVT_COLLAPSIBLEPANE_CHANGED + #endif // wxUSE_COLLPANE #endif // _WX_COLLAPSABLE_PANE_H_BASE_ diff --git a/Externals/wxWidgets3/include/wx/colordlg.h b/Externals/wxWidgets3/include/wx/colordlg.h index 4632e99698..b4156d1460 100644 --- a/Externals/wxWidgets3/include/wx/colordlg.h +++ b/Externals/wxWidgets3/include/wx/colordlg.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitiln // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: colordlg.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/colour.h b/Externals/wxWidgets3/include/wx/colour.h index 0c9cf08565..eec5542803 100644 --- a/Externals/wxWidgets3/include/wx/colour.h +++ b/Externals/wxWidgets3/include/wx/colour.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Francesco Montorsi // Created: -// RCS-ID: $Id: colour.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -167,6 +166,7 @@ public: static void ChangeLightness(unsigned char* r, unsigned char* g, unsigned char* b, int ialpha); wxColour ChangeLightness(int ialpha) const; + wxColour& MakeDisabled(unsigned char brightness = 255); // old, deprecated // --------------- diff --git a/Externals/wxWidgets3/include/wx/colourdata.h b/Externals/wxWidgets3/include/wx/colourdata.h index d12c5b3aa6..5a755ae078 100644 --- a/Externals/wxWidgets3/include/wx/colourdata.h +++ b/Externals/wxWidgets3/include/wx/colourdata.h @@ -1,7 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/colourdata.h // Author: Julian Smart -// RCS-ID: $Id: colourdata.h 66615 2011-01-07 05:26:57Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/combo.h b/Externals/wxWidgets3/include/wx/combo.h index f624f7cd59..4bae2cfea6 100644 --- a/Externals/wxWidgets3/include/wx/combo.h +++ b/Externals/wxWidgets3/include/wx/combo.h @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: Apr-30-2006 -// RCS-ID: $Id: combo.h 69942 2011-12-07 14:05:11Z VZ $ // Copyright: (c) Jaakko Salli // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -471,6 +470,10 @@ public: virtual wxWindow *GetMainWindowOfCompositeControl() { return m_mainCtrlWnd; } + // also set the embedded wxTextCtrl colours + virtual bool SetForegroundColour(const wxColour& colour); + virtual bool SetBackgroundColour(const wxColour& colour); + protected: // Returns true if hint text should be drawn in the control @@ -541,11 +544,10 @@ protected: void DestroyPopup(); // override the base class virtuals involved in geometry calculations + // The common version only sets a default width, so the derived classes + // should override it and set the height and change the width as needed. virtual wxSize DoGetBestSize() const; - - // also set the embedded wxTextCtrl colours - virtual bool SetForegroundColour(const wxColour& colour); - virtual bool SetBackgroundColour(const wxColour& colour); + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; // NULL popup can be used to indicate default in a derived class virtual void DoSetPopupControl(wxComboPopup* popup); diff --git a/Externals/wxWidgets3/include/wx/combobox.h b/Externals/wxWidgets3/include/wx/combobox.h index a28dae2454..93b3699553 100644 --- a/Externals/wxWidgets3/include/wx/combobox.h +++ b/Externals/wxWidgets3/include/wx/combobox.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 24.12.00 -// RCS-ID: $Id: combobox.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) 1996-2000 wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -16,6 +15,10 @@ #if wxUSE_COMBOBOX +// For compatibility with 2.8 include this header to allow using wxTE_XXX +// styles with wxComboBox without explicitly including it in the user code. +#include "wx/textctrl.h" + extern WXDLLIMPEXP_DATA_CORE(const char) wxComboBoxNameStr[]; // ---------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/include/wx/commandlinkbutton.h b/Externals/wxWidgets3/include/wx/commandlinkbutton.h index 3a2a8a967e..0aaa0ec65a 100644 --- a/Externals/wxWidgets3/include/wx/commandlinkbutton.h +++ b/Externals/wxWidgets3/include/wx/commandlinkbutton.h @@ -3,7 +3,6 @@ // Purpose: wxCommandLinkButtonBase and wxGenericCommandLinkButton classes // Author: Rickard Westerlund // Created: 2010-06-11 -// RCS-ID: $Id: commandlinkbutton.h 65350 2010-08-18 22:48:48Z VZ $ // Copyright: (c) 2010 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/compiler.h b/Externals/wxWidgets3/include/wx/compiler.h new file mode 100644 index 0000000000..e633ca158e --- /dev/null +++ b/Externals/wxWidgets3/include/wx/compiler.h @@ -0,0 +1,151 @@ +/* + * Name: wx/compiler.h + * Purpose: Compiler-specific macro definitions. + * Author: Vadim Zeitlin + * Created: 2013-07-13 (extracted from wx/platform.h) + * Copyright: (c) 1997-2013 Vadim Zeitlin + * Licence: wxWindows licence + */ + +/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */ + +#ifndef _WX_COMPILER_H_ +#define _WX_COMPILER_H_ + +/* + Compiler detection and related helpers. + */ + +/* + Notice that Intel compiler can be used as Microsoft Visual C++ add-on and + so we should define both __INTELC__ and __VISUALC__ for it. + */ +#ifdef __INTEL_COMPILER +# define __INTELC__ +#endif + +#if defined(_MSC_VER) + /* + define another standard symbol for Microsoft Visual C++: the standard + one (_MSC_VER) is also defined by some other compilers. + */ +# define __VISUALC__ _MSC_VER + + /* + define special symbols for different VC version instead of writing tests + for magic numbers such as 1200, 1300 &c repeatedly + */ +#if __VISUALC__ < 1100 +# error "This Visual C++ version is too old and not supported any longer." +#elif __VISUALC__ < 1200 +# define __VISUALC5__ +#elif __VISUALC__ < 1300 +# define __VISUALC6__ +#elif __VISUALC__ < 1400 +# define __VISUALC7__ +#elif __VISUALC__ < 1500 +# define __VISUALC8__ +#elif __VISUALC__ < 1600 +# define __VISUALC9__ +#elif __VISUALC__ < 1700 +# define __VISUALC10__ +#elif __VISUALC__ < 1800 +# define __VISUALC11__ +#elif __VISUALC__ < 1900 +# define __VISUALC12__ +#else +# pragma message("Please update wx/compiler.h to recognize this VC++ version") +#endif + +#elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__) +# define __BORLANDC__ +#elif defined(__WATCOMC__) +#elif defined(__SC__) +# define __SYMANTECC__ +#elif defined(__SUNPRO_CC) +# ifndef __SUNCC__ +# define __SUNCC__ __SUNPRO_CC +# endif /* Sun CC */ +#elif defined(__SC__) +# ifdef __DMC__ +# define __DIGITALMARS__ +# else +# define __SYMANTEC__ +# endif +#endif /* compiler */ + +/* + Macros for checking compiler version. +*/ + +/* + This macro can be used to test the gcc version and can be used like this: + +# if wxCHECK_GCC_VERSION(3, 1) + ... we have gcc 3.1 or later ... +# else + ... no gcc at all or gcc < 3.1 ... +# endif +*/ +#if defined(__GNUC__) && defined(__GNUC_MINOR__) + #define wxCHECK_GCC_VERSION( major, minor ) \ + ( ( __GNUC__ > (major) ) \ + || ( __GNUC__ == (major) && __GNUC_MINOR__ >= (minor) ) ) +#else + #define wxCHECK_GCC_VERSION( major, minor ) 0 +#endif + +/* + This macro can be used to test the Visual C++ version. +*/ +#ifndef __VISUALC__ +# define wxVISUALC_VERSION(major) 0 +# define wxCHECK_VISUALC_VERSION(major) 0 +#else +# define wxVISUALC_VERSION(major) ( (6 + major) * 100 ) +# define wxCHECK_VISUALC_VERSION(major) ( __VISUALC__ >= wxVISUALC_VERSION(major) ) +#endif + +/** + This is similar to wxCHECK_GCC_VERSION but for Sun CC compiler. + */ +#ifdef __SUNCC__ + /* + __SUNCC__ is 0xVRP where V is major version, R release and P patch level + */ + #define wxCHECK_SUNCC_VERSION(maj, min) (__SUNCC__ >= (((maj)<<8) | ((min)<<4))) +#else + #define wxCHECK_SUNCC_VERSION(maj, min) (0) +#endif + +#ifndef __WATCOMC__ +# define wxWATCOM_VERSION(major,minor) 0 +# define wxCHECK_WATCOM_VERSION(major,minor) 0 +# define wxONLY_WATCOM_EARLIER_THAN(major,minor) 0 +# define WX_WATCOM_ONLY_CODE( x ) +#else +# if __WATCOMC__ < 1200 +# error "Only Open Watcom is supported in this release" +# endif + +# define wxWATCOM_VERSION(major,minor) ( major * 100 + minor * 10 + 1100 ) +# define wxCHECK_WATCOM_VERSION(major,minor) ( __WATCOMC__ >= wxWATCOM_VERSION(major,minor) ) +# define wxONLY_WATCOM_EARLIER_THAN(major,minor) ( __WATCOMC__ < wxWATCOM_VERSION(major,minor) ) +# define WX_WATCOM_ONLY_CODE( x ) x +#endif + +/* + This macro can be used to check that the version of mingw32 compiler is + at least maj.min + */ + +/* Check for Mingw runtime version: */ +#if defined(__MINGW32_MAJOR_VERSION) && defined(__MINGW32_MINOR_VERSION) + #define wxCHECK_MINGW32_VERSION( major, minor ) \ + ( ( ( __MINGW32_MAJOR_VERSION > (major) ) \ + || ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) ) +#else + #define wxCHECK_MINGW32_VERSION( major, minor ) (0) +#endif + +#endif // _WX_COMPILER_H_ diff --git a/Externals/wxWidgets3/include/wx/compositewin.h b/Externals/wxWidgets3/include/wx/compositewin.h index 2c6503aaeb..a46c257708 100644 --- a/Externals/wxWidgets3/include/wx/compositewin.h +++ b/Externals/wxWidgets3/include/wx/compositewin.h @@ -3,7 +3,6 @@ // Purpose: wxCompositeWindow<> declaration // Author: Vadim Zeitlin // Created: 2011-01-02 -// RCS-ID: $Id: compositewin.h 69470 2011-10-19 16:20:01Z VS $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/confbase.h b/Externals/wxWidgets3/include/wx/confbase.h index 5d79dfafd6..9fd9df782a 100644 --- a/Externals/wxWidgets3/include/wx/confbase.h +++ b/Externals/wxWidgets3/include/wx/confbase.h @@ -5,7 +5,6 @@ // Author: Karsten Ballueder & Vadim Zeitlin // Modified by: // Created: 07.04.98 (adapted from appconf.h) -// RCS-ID: $Id: confbase.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1997 Karsten Ballueder Ballueder@usa.net // Vadim Zeitlin // Licence: wxWindows licence @@ -73,7 +72,7 @@ enum // abstract base class wxConfigBase which defines the interface for derived // classes // -// wxConfig organizes the items in a tree-like structure (modeled after the +// wxConfig organizes the items in a tree-like structure (modelled after the // Unix/Dos filesystem). There are groups (directories) and keys (files). // There is always one current group given by the current path. // diff --git a/Externals/wxWidgets3/include/wx/config.h b/Externals/wxWidgets3/include/wx/config.h index 672e0a5cf2..4df4b8dd08 100644 --- a/Externals/wxWidgets3/include/wx/config.h +++ b/Externals/wxWidgets3/include/wx/config.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: config.h 70808 2012-03-04 20:31:42Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/containr.h b/Externals/wxWidgets3/include/wx/containr.h index a509df834c..277909e559 100644 --- a/Externals/wxWidgets3/include/wx/containr.h +++ b/Externals/wxWidgets3/include/wx/containr.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 06.08.01 -// RCS-ID: $Id: containr.h 70805 2012-03-04 09:42:51Z SC $ // Copyright: (c) 2001, 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -42,9 +41,12 @@ public: { m_winParent = NULL; - // do accept focus initially, we'll stop doing it if/when any children - // are added - m_acceptsFocus = true; + // By default, we accept focus ourselves. + m_acceptsFocusSelf = true; + + // But we don't have any children accepting it yet. + m_acceptsFocusChildren = false; + m_inSetFocus = false; m_winLastFocused = NULL; } @@ -57,31 +59,36 @@ public: m_winParent = winParent; } + // This can be called by the window to indicate that it never wants to have + // the focus for itself. + void DisableSelfFocus() + { m_acceptsFocusSelf = false; UpdateParentCanFocus(); } + + // This can be called to undo the effect of a previous DisableSelfFocus() + // (otherwise calling it is not necessary as the window does accept focus + // by default). + void EnableSelfFocus() + { m_acceptsFocusSelf = true; UpdateParentCanFocus(); } + // should be called from SetFocus(), returns false if we did nothing with // the focus and the default processing should take place bool DoSetFocus(); - // should be called when we decide that we should [stop] accepting focus - void SetCanFocus(bool acceptsFocus); - // returns whether we should accept focus ourselves or not - bool AcceptsFocus() const { return m_acceptsFocus; } + bool AcceptsFocus() const; - // returns whether we or one of our children accepts focus: we always do - // because if we don't have any focusable children it probably means that - // we're not being used as a container at all (think of wxGrid or generic - // wxListCtrl) and so should get focus for ourselves - bool AcceptsFocusRecursively() const { return true; } + // Returns whether we or one of our children accepts focus. + bool AcceptsFocusRecursively() const + { return AcceptsFocus() || + (m_acceptsFocusChildren && HasAnyChildrenAcceptingFocus()); } - // this is used to determine whether we can accept focus when Tab or - // another navigation key is pressed -- we alsways can, for the same reason - // as mentioned above for AcceptsFocusRecursively() - bool AcceptsFocusFromKeyboard() const { return true; } + // We accept focus from keyboard if we accept it at all. + bool AcceptsFocusFromKeyboard() const { return AcceptsFocusRecursively(); } // Call this when the number of children of the window changes. - // If we have any children, this panel (used just as container for - // them) shouldn't get focus for itself. - void UpdateCanFocus() { SetCanFocus(!HasAnyFocusableChildren()); } + // + // Returns true if we have any focusable children, false otherwise. + bool UpdateCanFocusChildren(); protected: // set the focus to the child which had it the last time @@ -90,6 +97,10 @@ protected: // return true if we have any children accepting focus bool HasAnyFocusableChildren() const; + // return true if we have any children that do accept focus right now + bool HasAnyChildrenAcceptingFocus() const; + + // the parent window we manage the children for wxWindow *m_winParent; @@ -97,9 +108,19 @@ protected: wxWindow *m_winLastFocused; private: - // value returned by AcceptsFocus(), should be changed using SetCanFocus() - // only - bool m_acceptsFocus; + // Update the window status to reflect whether it is getting focus or not. + void UpdateParentCanFocus(); + + // Indicates whether the associated window can ever have focus itself. + // + // Usually this is the case, e.g. a wxPanel can be used either as a + // container for its children or just as a normal window which can be + // focused. But sometimes, e.g. for wxStaticBox, we can never have focus + // ourselves and can only get it if we have any focusable children. + bool m_acceptsFocusSelf; + + // Cached value remembering whether we have any children accepting focus. + bool m_acceptsFocusChildren; // a guard against infinite recursion bool m_inSetFocus; @@ -198,7 +219,13 @@ public: { BaseWindowClass::AddChild(child); - m_container.UpdateCanFocus(); + if ( m_container.UpdateCanFocusChildren() ) + { + // Under MSW we must have wxTAB_TRAVERSAL style for TAB navigation + // to work. + if ( !BaseWindowClass::HasFlag(wxTAB_TRAVERSAL) ) + BaseWindowClass::ToggleWindowStyle(wxTAB_TRAVERSAL); + } } WXDLLIMPEXP_INLINE_CORE virtual void RemoveChild(wxWindowBase *child) @@ -209,7 +236,9 @@ public: BaseWindowClass::RemoveChild(child); - m_container.UpdateCanFocus(); + // We could reset wxTAB_TRAVERSAL here but it doesn't seem to do any + // harm to keep it. + m_container.UpdateCanFocusChildren(); } WXDLLIMPEXP_INLINE_CORE virtual void SetFocus() @@ -223,11 +252,6 @@ public: BaseWindowClass::SetFocus(); } - void AcceptFocus(bool acceptFocus) - { - m_container.SetCanFocus(acceptFocus); - } - protected: #ifndef wxHAS_NATIVE_TAB_TRAVERSAL void OnNavigationKey(wxNavigationKeyEvent& event) @@ -271,10 +295,6 @@ public: \ virtual void RemoveChild(wxWindowBase *child); \ virtual void SetFocus(); \ void SetFocusIgnoringChildren(); \ - void AcceptFocus(bool acceptFocus) \ - { \ - m_container.SetCanFocus(acceptFocus); \ - } \ \ protected: \ wxControlContainer m_container @@ -290,7 +310,7 @@ protected: \ { \ basename::AddChild(child); \ \ - m_container.UpdateCanFocus(); \ + m_container.UpdateCanFocusChildren(); \ } \ \ bool classname::AcceptsFocusRecursively() const \ @@ -328,7 +348,7 @@ protected: \ { \ basename::RemoveChild(child); \ \ - m_container.UpdateCanFocus(); \ + m_container.UpdateCanFocusChildren(); \ } \ \ void classname::SetFocusIgnoringChildren() \ @@ -363,7 +383,7 @@ public: \ \ basename::RemoveChild(child); \ \ - m_container.UpdateCanFocus(); \ + m_container.UpdateCanFocusChildren(); \ } \ \ void classname::OnNavigationKey( wxNavigationKeyEvent& event ) \ diff --git a/Externals/wxWidgets3/include/wx/control.h b/Externals/wxWidgets3/include/wx/control.h index 778ec1870e..cd7bc9e268 100644 --- a/Externals/wxWidgets3/include/wx/control.h +++ b/Externals/wxWidgets3/include/wx/control.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 26.07.99 -// RCS-ID: $Id: control.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -134,6 +133,10 @@ public: // wxControl-specific processing after processing the update event virtual void DoUpdateWindowUI(wxUpdateUIEvent& event); + wxSize GetSizeFromTextSize(int xlen, int ylen = -1) const + { return DoGetSizeFromTextSize(xlen, ylen); } + wxSize GetSizeFromTextSize(const wxSize& tsize) const + { return DoGetSizeFromTextSize(tsize.x, tsize.y); } // static utilities for mnemonics char (&) handling @@ -192,6 +195,8 @@ protected: virtual bool DoSetLabelMarkup(const wxString& markup); #endif // wxUSE_MARKUP + // override this to return the total control's size from a string size + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; // initialize the common fields of wxCommandEvent void InitCommandEvent(wxCommandEvent& event) const; diff --git a/Externals/wxWidgets3/include/wx/convauto.h b/Externals/wxWidgets3/include/wx/convauto.h index 0d9303959d..0912368f64 100644 --- a/Externals/wxWidgets3/include/wx/convauto.h +++ b/Externals/wxWidgets3/include/wx/convauto.h @@ -3,7 +3,6 @@ // Purpose: wxConvAuto class declaration // Author: Vadim Zeitlin // Created: 2006-04-03 -// RCS-ID: $Id: convauto.h 69675 2011-11-05 11:23:41Z VZ $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cpp.h b/Externals/wxWidgets3/include/wx/cpp.h index 5837fe190c..b5ce014e4d 100644 --- a/Externals/wxWidgets3/include/wx/cpp.h +++ b/Externals/wxWidgets3/include/wx/cpp.h @@ -3,7 +3,6 @@ * Purpose: Various preprocessor helpers * Author: Vadim Zeitlin * Created: 2006-09-30 - * RCS-ID: $Id: cpp.h 66054 2010-11-07 13:16:20Z VZ $ * Copyright: (c) 2006 Vadim Zeitlin * Licence: wxWindows licence */ @@ -13,13 +12,27 @@ #ifndef _WX_CPP_H_ #define _WX_CPP_H_ +#include "wx/compiler.h" /* wxCHECK_XXX_VERSION() macros */ + /* wxCONCAT works like preprocessor ## operator but also works with macros */ #define wxCONCAT_HELPER(text, line) text ## line -#define wxCONCAT(text, line) wxCONCAT_HELPER(text, line) -#define wxCONCAT3(x1, x2, x3) wxCONCAT(wxCONCAT(x1, x2), x3) -#define wxCONCAT4(x1, x2, x3, x4) wxCONCAT(wxCONCAT3(x1, x2, x3), x4) -#define wxCONCAT5(x1, x2, x3, x4, x5) wxCONCAT(wxCONCAT4(x1, x2, x3, x4), x5) +#define wxCONCAT(x1, x2) \ + wxCONCAT_HELPER(x1, x2) +#define wxCONCAT3(x1, x2, x3) \ + wxCONCAT(wxCONCAT(x1, x2), x3) +#define wxCONCAT4(x1, x2, x3, x4) \ + wxCONCAT(wxCONCAT3(x1, x2, x3), x4) +#define wxCONCAT5(x1, x2, x3, x4, x5) \ + wxCONCAT(wxCONCAT4(x1, x2, x3, x4), x5) +#define wxCONCAT6(x1, x2, x3, x4, x5, x6) \ + wxCONCAT(wxCONCAT5(x1, x2, x3, x4, x5), x6) +#define wxCONCAT7(x1, x2, x3, x4, x5, x6, x7) \ + wxCONCAT(wxCONCAT6(x1, x2, x3, x4, x5, x6), x7) +#define wxCONCAT8(x1, x2, x3, x4, x5, x6, x7, x8) \ + wxCONCAT(wxCONCAT7(x1, x2, x3, x4, x5, x6, x7), x8) +#define wxCONCAT9(x1, x2, x3, x4, x5, x6, x7, x8, x9) \ + wxCONCAT(wxCONCAT8(x1, x2, x3, x4, x5, x6, x7, x8), x9) /* wxSTRINGIZE works as the preprocessor # operator but also works with macros */ #define wxSTRINGIZE_HELPER(x) #x @@ -67,6 +80,28 @@ */ #define wxEMPTY_PARAMETER_VALUE /* Fake macro parameter value */ +/* + Helpers for defining macros that expand into a single statement. + + The standatd solution is to use "do { ... } while (0)" statement but MSVC + generates a C4127 "condition expression is constant" warning for it so we + use something which is just complicated enough to not be recognized as a + constant but still simple enough to be optimized away. + + Another solution would be to use __pragma() to temporarily disable C4127. + + Notice that wxASSERT_ARG_TYPE in wx/strvargarg.h relies on these macros + creating some kind of a loop because it uses "break". + */ +#ifdef __WATCOMC__ + #define wxFOR_ONCE(name) for(int name=0; name<1; name++) + #define wxSTATEMENT_MACRO_BEGIN wxFOR_ONCE(wxMAKE_UNIQUE_NAME(wxmacro)) { + #define wxSTATEMENT_MACRO_END } +#else + #define wxSTATEMENT_MACRO_BEGIN do { + #define wxSTATEMENT_MACRO_END } while ( (void)0, 0 ) +#endif + /* Define __WXFUNCTION__ which is like standard __FUNCTION__ but defined as NULL for the compilers which don't support the latter. @@ -89,5 +124,64 @@ #endif #endif /* __WXFUNCTION__ already defined */ + +/* Auto-detect variadic macros support unless explicitly disabled. */ +#if !defined(HAVE_VARIADIC_MACROS) && !defined(wxNO_VARIADIC_MACROS) + /* Any C99 or C++11 compiler should have them. */ + #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ + (defined(__cplusplus) && __cplusplus >= 201103L) + #define HAVE_VARIADIC_MACROS + #elif wxCHECK_GCC_VERSION(3,0) + #define HAVE_VARIADIC_MACROS + #elif wxCHECK_VISUALC_VERSION(8) + #define HAVE_VARIADIC_MACROS + #elif wxCHECK_WATCOM_VERSION(1,2) + #define HAVE_VARIADIC_MACROS + #endif +#endif /* !HAVE_VARIADIC_MACROS */ + + + +#ifdef HAVE_VARIADIC_MACROS +/* + wxCALL_FOR_EACH(what, ...) calls the macro from its first argument, what(pos, x), + for every remaining argument 'x', with 'pos' being its 1-based index in + *reverse* order (with the last argument being numbered 1). + + For example, wxCALL_FOR_EACH(test, a, b, c) expands into this: + + test(3, a) \ + test(2, b) \ + test(1, c) + + Up to eight arguments are supported. + + (With thanks to https://groups.google.com/d/topic/comp.std.c/d-6Mj5Lko_s/discussion + and http://stackoverflow.com/questions/1872220/is-it-possible-to-iterate-over-arguments-in-variadic-macros) +*/ +#define wxCALL_FOR_EACH_NARG(...) wxCALL_FOR_EACH_NARG_((__VA_ARGS__, wxCALL_FOR_EACH_RSEQ_N())) +#define wxCALL_FOR_EACH_NARG_(args) wxCALL_FOR_EACH_ARG_N args +#define wxCALL_FOR_EACH_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N +#define wxCALL_FOR_EACH_RSEQ_N() 8, 7, 6, 5, 4, 3, 2, 1, 0 + +#define wxCALL_FOR_EACH_1(what, x) what(1, x) +#define wxCALL_FOR_EACH_2(what, x, ...) what(2, x) wxCALL_FOR_EACH_1(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_3(what, x, ...) what(3, x) wxCALL_FOR_EACH_2(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_4(what, x, ...) what(4, x) wxCALL_FOR_EACH_3(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_5(what, x, ...) what(5, x) wxCALL_FOR_EACH_4(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_6(what, x, ...) what(6, x) wxCALL_FOR_EACH_5(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_7(what, x, ...) what(7, x) wxCALL_FOR_EACH_6(what, __VA_ARGS__) +#define wxCALL_FOR_EACH_8(what, x, ...) what(8, x) wxCALL_FOR_EACH_7(what, __VA_ARGS__) + +#define wxCALL_FOR_EACH_(N, args) \ + wxCONCAT(wxCALL_FOR_EACH_, N) args + +#define wxCALL_FOR_EACH(what, ...) \ + wxCALL_FOR_EACH_(wxCALL_FOR_EACH_NARG(__VA_ARGS__), (what, __VA_ARGS__)) + +#else + #define wxCALL_FOR_EACH Error_wx_CALL_FOR_EACH_requires_variadic_macros_support +#endif /* HAVE_VARIADIC_MACROS */ + #endif /* _WX_CPP_H_ */ diff --git a/Externals/wxWidgets3/include/wx/cppunit.h b/Externals/wxWidgets3/include/wx/cppunit.h index 7c5a114bf5..89edd9165f 100644 --- a/Externals/wxWidgets3/include/wx/cppunit.h +++ b/Externals/wxWidgets3/include/wx/cppunit.h @@ -3,7 +3,6 @@ // Purpose: wrapper header for CppUnit headers // Author: Vadim Zeitlin // Created: 15.02.04 -// RCS-ID: $Id: cppunit.h 69241 2011-09-30 14:00:52Z JJ $ // Copyright: (c) 2004 Vadim Zeitlin // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/crt.h b/Externals/wxWidgets3/include/wx/crt.h index 3ba993907a..9b939fd0f9 100644 --- a/Externals/wxWidgets3/include/wx/crt.h +++ b/Externals/wxWidgets3/include/wx/crt.h @@ -3,7 +3,6 @@ // Purpose: Header to include all headers with wrappers for CRT functions // Author: Robert Roebling // Created: 2007-05-30 -// RCS-ID: $Id: crt.h 49444 2007-10-26 06:19:08Z PC $ // Copyright: (c) 2007 wxWidgets dev team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/cshelp.h b/Externals/wxWidgets3/include/wx/cshelp.h index 0cc915177c..723ac14e0a 100644 --- a/Externals/wxWidgets3/include/wx/cshelp.h +++ b/Externals/wxWidgets3/include/wx/cshelp.h @@ -4,7 +4,6 @@ // Author: Julian Smart, Vadim Zeitlin // Modified by: // Created: 08/09/2000 -// RCS-ID: $Id: cshelp.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) 2000 Julian Smart, Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/ctrlsub.h b/Externals/wxWidgets3/include/wx/ctrlsub.h index 198aae24c6..88832e5b75 100644 --- a/Externals/wxWidgets3/include/wx/ctrlsub.h +++ b/Externals/wxWidgets3/include/wx/ctrlsub.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 22.10.99 -// RCS-ID: $Id: ctrlsub.h 68460 2011-07-30 11:30:08Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -441,6 +440,12 @@ public: // colour virtual bool ShouldInheritColours() const { return false; } + + // Implementation only from now on. + + // Generate an event of the given type for the selection change. + void SendSelectionChangedEvent(wxEventType eventType); + protected: // fill in the client object or data field of the event as appropriate // diff --git a/Externals/wxWidgets3/include/wx/cursor.h b/Externals/wxWidgets3/include/wx/cursor.h index a0ce868609..bdde8cdf66 100644 --- a/Externals/wxWidgets3/include/wx/cursor.h +++ b/Externals/wxWidgets3/include/wx/cursor.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: cursor.h 70353 2012-01-15 14:46:41Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -41,7 +40,11 @@ public: #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XBM #include "wx/motif/cursor.h" #elif defined(__WXGTK20__) - #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #ifdef __WINDOWS__ + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_CUR_RESOURCE + #else + #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #endif #include "wx/gtk/cursor.h" #elif defined(__WXGTK__) #define wxCURSOR_DEFAULT_TYPE wxBITMAP_TYPE_XPM diff --git a/Externals/wxWidgets3/include/wx/custombgwin.h b/Externals/wxWidgets3/include/wx/custombgwin.h index 62ef32261f..73890a4654 100644 --- a/Externals/wxWidgets3/include/wx/custombgwin.h +++ b/Externals/wxWidgets3/include/wx/custombgwin.h @@ -3,7 +3,6 @@ // Purpose: Class adding support for custom window backgrounds. // Author: Vadim Zeitlin // Created: 2011-10-10 -// RCS-ID: $Id: custombgwin.h 69930 2011-12-04 23:57:36Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dataobj.h b/Externals/wxWidgets3/include/wx/dataobj.h index f611b34e86..d099f4b6b1 100644 --- a/Externals/wxWidgets3/include/wx/dataobj.h +++ b/Externals/wxWidgets3/include/wx/dataobj.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin, Robert Roebling // Modified by: // Created: 26.05.99 -// RCS-ID: $Id: dataobj.h 63381 2010-02-04 01:02:43Z VZ $ // Copyright: (c) wxWidgets Team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -334,6 +333,45 @@ private: #endif #endif // wxUSE_UNICODE +class WXDLLIMPEXP_CORE wxHTMLDataObject : public wxDataObjectSimple +{ +public: + // ctor: you can specify the text here or in SetText(), or override + // GetText() + wxHTMLDataObject(const wxString& html = wxEmptyString) + : wxDataObjectSimple(wxDF_HTML), + m_html(html) + { + } + + // virtual functions which you may override if you want to provide text on + // demand only - otherwise, the trivial default versions will be used + virtual size_t GetLength() const { return m_html.Len() + 1; } + virtual wxString GetHTML() const { return m_html; } + virtual void SetHTML(const wxString& html) { m_html = html; } + + virtual size_t GetDataSize() const; + virtual bool GetDataHere(void *buf) const; + virtual bool SetData(size_t len, const void *buf); + + // Must provide overloads to avoid hiding them (and warnings about it) + virtual size_t GetDataSize(const wxDataFormat&) const + { + return GetDataSize(); + } + virtual bool GetDataHere(const wxDataFormat&, void *buf) const + { + return GetDataHere(buf); + } + virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) + { + return SetData(len, buf); + } + +private: + wxString m_html; +}; + class WXDLLIMPEXP_CORE wxTextDataObject : public wxDataObjectSimple { public: diff --git a/Externals/wxWidgets3/include/wx/dataview.h b/Externals/wxWidgets3/include/wx/dataview.h index 3e81791cd0..298ab7f979 100644 --- a/Externals/wxWidgets3/include/wx/dataview.h +++ b/Externals/wxWidgets3/include/wx/dataview.h @@ -4,7 +4,6 @@ // Author: Robert Roebling // Modified by: Bo Yang // Created: 08.01.06 -// RCS-ID: $Id: dataview.h 70377 2012-01-17 14:05:17Z VS $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,6 +18,7 @@ #include "wx/textctrl.h" #include "wx/headercol.h" #include "wx/variant.h" +#include "wx/dnd.h" // For wxDragResult declaration only. #include "wx/dynarray.h" #include "wx/icon.h" #include "wx/itemid.h" @@ -228,7 +228,7 @@ public: return true; } - // define hierachy + // define hierarchy virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const = 0; virtual bool IsContainer( const wxDataViewItem &item ) const = 0; // Is the container just a header or an item with all columns @@ -376,12 +376,6 @@ public: virtual unsigned GetRow( const wxDataViewItem &item ) const; wxDataViewItem GetItem( unsigned int row ) const; - // compare based on index - - virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2, - unsigned int column, bool ascending ) const; - virtual bool HasDefaultCompare() const; - // implement base methods virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const; @@ -437,7 +431,6 @@ public: private: unsigned int m_size; - bool m_ordered; }; #endif @@ -767,7 +760,9 @@ public: #if wxUSE_DRAG_AND_DROP , m_dataObject(NULL), m_dataBuffer(NULL), - m_dataSize(0) + m_dataSize(0), + m_dragFlags(0), + m_dropEffect(wxDragNone) #endif { } @@ -786,7 +781,9 @@ public: , m_dataObject(event.m_dataObject), m_dataFormat(event.m_dataFormat), m_dataBuffer(event.m_dataBuffer), - m_dataSize(event.m_dataSize) + m_dataSize(event.m_dataSize), + m_dragFlags(event.m_dragFlags), + m_dropEffect(event.m_dropEffect) #endif { } @@ -802,7 +799,7 @@ public: const wxVariant &GetValue() const { return m_value; } void SetValue( const wxVariant &value ) { m_value = value; } - // for wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE only + // for wxEVT_DATAVIEW_ITEM_EDITING_DONE only bool IsEditCancelled() const { return m_editCancelled; } void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; } @@ -814,7 +811,7 @@ public: wxPoint GetPosition() const { return m_pos; } void SetPosition( int x, int y ) { m_pos.x = x; m_pos.y = y; } - // For wxEVT_COMMAND_DATAVIEW_CACHE_HINT + // For wxEVT_DATAVIEW_CACHE_HINT int GetCacheFrom() const { return m_cacheFrom; } int GetCacheTo() const { return m_cacheTo; } void SetCache(int from, int to) { m_cacheFrom = from; m_cacheTo = to; } @@ -832,6 +829,10 @@ public: size_t GetDataSize() const { return m_dataSize; } void SetDataBuffer( void* buf ) { m_dataBuffer = buf;} void *GetDataBuffer() const { return m_dataBuffer; } + void SetDragFlags( int flags ) { m_dragFlags = flags; } + int GetDragFlags() const { return m_dragFlags; } + void SetDropEffect( wxDragResult effect ) { m_dropEffect = effect; } + wxDragResult GetDropEffect() const { return m_dropEffect; } #endif // wxUSE_DRAG_AND_DROP virtual wxEvent *Clone() const { return new wxDataViewEvent(*this); } @@ -853,36 +854,39 @@ protected: wxDataFormat m_dataFormat; void* m_dataBuffer; size_t m_dataSize; + + int m_dragFlags; + wxDragResult m_dropEffect; #endif // wxUSE_DRAG_AND_DROP private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewEvent) }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_SORTED, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_CACHE_HINT, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_CACHE_HINT, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_DROP, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_DATAVIEW_ITEM_DROP, wxDataViewEvent ); typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); @@ -890,7 +894,7 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); wxEVENT_HANDLER_CAST(wxDataViewEventFunction, func) #define wx__DECLARE_DATAVIEWEVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn)) #define EVT_DATAVIEW_SELECTION_CHANGED(id, fn) wx__DECLARE_DATAVIEWEVT(SELECTION_CHANGED, id, fn) @@ -907,7 +911,7 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); #define EVT_DATAVIEW_ITEM_CONTEXT_MENU(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_CONTEXT_MENU, id, fn) #define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn) -#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn) +#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn) #define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn) #define EVT_DATAVIEW_COLUMN_REORDERED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_REORDERED, id, fn) #define EVT_DATAVIEW_CACHE_HINT(id, fn) wx__DECLARE_DATAVIEWEVT(CACHE_HINT, id, fn) @@ -916,6 +920,9 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); #define EVT_DATAVIEW_ITEM_DROP_POSSIBLE(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP_POSSIBLE, id, fn) #define EVT_DATAVIEW_ITEM_DROP(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DROP, id, fn) +// Old and not documented synonym, don't use. +#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK(id, fn) + #ifdef wxHAS_GENERIC_DATAVIEWCTRL #include "wx/generic/dataview.h" #elif defined(__WXGTK20__) @@ -933,24 +940,20 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&); class WXDLLIMPEXP_ADV wxDataViewListStoreLine { public: - wxDataViewListStoreLine( wxClientData *data = NULL ) + wxDataViewListStoreLine( wxUIntPtr data = 0 ) { m_data = data; } - virtual ~wxDataViewListStoreLine() - { - delete m_data; - } - void SetData( wxClientData *data ) - { if (m_data) delete m_data; m_data = data; } - wxClientData *GetData() const + void SetData( wxUIntPtr data ) + { m_data = data; } + wxUIntPtr GetData() const { return m_data; } wxVector m_values; private: - wxClientData *m_data; + wxUIntPtr m_data; }; @@ -964,12 +967,17 @@ public: void InsertColumn( unsigned int pos, const wxString &varianttype ); void AppendColumn( const wxString &varianttype ); - void AppendItem( const wxVector &values, wxClientData *data = NULL ); - void PrependItem( const wxVector &values, wxClientData *data = NULL ); - void InsertItem( unsigned int row, const wxVector &values, wxClientData *data = NULL ); + void AppendItem( const wxVector &values, wxUIntPtr data = 0 ); + void PrependItem( const wxVector &values, wxUIntPtr data = 0 ); + void InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data = 0 ); void DeleteItem( unsigned int pos ); void DeleteAllItems(); + unsigned int GetItemCount() const; + + void SetItemData( const wxDataViewItem& item, wxUIntPtr data ); + wxUIntPtr GetItemData( const wxDataViewItem& item ) const; + // override base virtuals virtual unsigned int GetColumnCount() const; @@ -1046,11 +1054,11 @@ public: wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE ); - void AppendItem( const wxVector &values, wxClientData *data = NULL ) + void AppendItem( const wxVector &values, wxUIntPtr data = 0 ) { GetStore()->AppendItem( values, data ); } - void PrependItem( const wxVector &values, wxClientData *data = NULL ) + void PrependItem( const wxVector &values, wxUIntPtr data = 0 ) { GetStore()->PrependItem( values, data ); } - void InsertItem( unsigned int row, const wxVector &values, wxClientData *data = NULL ) + void InsertItem( unsigned int row, const wxVector &values, wxUIntPtr data = 0 ) { GetStore()->InsertItem( row, values, data ); } void DeleteItem( unsigned row ) { GetStore()->DeleteItem( row ); } @@ -1075,6 +1083,14 @@ public: bool GetToggleValue( unsigned int row, unsigned int col ) const { wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetBool(); } + void SetItemData( const wxDataViewItem& item, wxUIntPtr data ) + { GetStore()->SetItemData( item, data ); } + wxUIntPtr GetItemData( const wxDataViewItem& item ) const + { return GetStore()->GetItemData( item ); } + + int GetItemCount() const + { return GetStore()->GetItemCount(); } + void OnSize( wxSizeEvent &event ); private: @@ -1307,6 +1323,27 @@ private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxDataViewTreeCtrl) }; +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED wxEVT_DATAVIEW_SELECTION_CHANGED +#define wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED wxEVT_DATAVIEW_ITEM_ACTIVATED +#define wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED wxEVT_DATAVIEW_ITEM_COLLAPSED +#define wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED wxEVT_DATAVIEW_ITEM_EXPANDED +#define wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING wxEVT_DATAVIEW_ITEM_COLLAPSING +#define wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING wxEVT_DATAVIEW_ITEM_EXPANDING +#define wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING wxEVT_DATAVIEW_ITEM_START_EDITING +#define wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED wxEVT_DATAVIEW_ITEM_EDITING_STARTED +#define wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE wxEVT_DATAVIEW_ITEM_EDITING_DONE +#define wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED wxEVT_DATAVIEW_ITEM_VALUE_CHANGED +#define wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU wxEVT_DATAVIEW_ITEM_CONTEXT_MENU +#define wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK wxEVT_DATAVIEW_COLUMN_HEADER_CLICK +#define wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK +#define wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED wxEVT_DATAVIEW_COLUMN_SORTED +#define wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED wxEVT_DATAVIEW_COLUMN_REORDERED +#define wxEVT_COMMAND_DATAVIEW_CACHE_HINT wxEVT_DATAVIEW_CACHE_HINT +#define wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG wxEVT_DATAVIEW_ITEM_BEGIN_DRAG +#define wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE +#define wxEVT_COMMAND_DATAVIEW_ITEM_DROP wxEVT_DATAVIEW_ITEM_DROP + #endif // wxUSE_DATAVIEWCTRL #endif diff --git a/Externals/wxWidgets3/include/wx/datectrl.h b/Externals/wxWidgets3/include/wx/datectrl.h index 8b16f0a9f2..6fa4367c0a 100644 --- a/Externals/wxWidgets3/include/wx/datectrl.h +++ b/Externals/wxWidgets3/include/wx/datectrl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-09 -// RCS-ID: $Id: datectrl.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dateevt.h b/Externals/wxWidgets3/include/wx/dateevt.h index 7b10dd63b7..4131ab383e 100644 --- a/Externals/wxWidgets3/include/wx/dateevt.h +++ b/Externals/wxWidgets3/include/wx/dateevt.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-10 -// RCS-ID: $Id: dateevt.h 69224 2011-09-29 13:43:15Z VZ $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/datetime.h b/Externals/wxWidgets3/include/wx/datetime.h index 79cf5f1b7a..f500985f28 100644 --- a/Externals/wxWidgets3/include/wx/datetime.h +++ b/Externals/wxWidgets3/include/wx/datetime.h @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 10.02.99 -// RCS-ID: $Id: datetime.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -222,124 +221,6 @@ public: // TODO Hebrew, Chinese, Maya, ... (just kidding) (or then may be not?) }; - // these values only are used to identify the different dates of - // adoption of the Gregorian calendar (see IsGregorian()) - // - // All data and comments taken verbatim from "The Calendar FAQ (v 2.0)" - // by Claus Tøndering, http://www.pip.dknet.dk/~c-t/calendar.html - // except for the comments "we take". - // - // Symbol "->" should be read as "was followed by" in the comments - // which follow. - enum GregorianAdoption - { - Gr_Unknown, // no data for this country or it's too uncertain to use - Gr_Standard, // on the day 0 of Gregorian calendar: 15 Oct 1582 - - Gr_Alaska, // Oct 1867 when Alaska became part of the USA - Gr_Albania, // Dec 1912 - - Gr_Austria = Gr_Unknown, // Different regions on different dates - Gr_Austria_Brixen, // 5 Oct 1583 -> 16 Oct 1583 - Gr_Austria_Salzburg = Gr_Austria_Brixen, - Gr_Austria_Tyrol = Gr_Austria_Brixen, - Gr_Austria_Carinthia, // 14 Dec 1583 -> 25 Dec 1583 - Gr_Austria_Styria = Gr_Austria_Carinthia, - - Gr_Belgium, // Then part of the Netherlands - - Gr_Bulgaria = Gr_Unknown, // Unknown precisely (from 1915 to 1920) - Gr_Bulgaria_1, // 18 Mar 1916 -> 1 Apr 1916 - Gr_Bulgaria_2, // 31 Mar 1916 -> 14 Apr 1916 - Gr_Bulgaria_3, // 3 Sep 1920 -> 17 Sep 1920 - - Gr_Canada = Gr_Unknown, // Different regions followed the changes in - // Great Britain or France - - Gr_China = Gr_Unknown, // Different authorities say: - Gr_China_1, // 18 Dec 1911 -> 1 Jan 1912 - Gr_China_2, // 18 Dec 1928 -> 1 Jan 1929 - - Gr_Czechoslovakia, // (Bohemia and Moravia) 6 Jan 1584 -> 17 Jan 1584 - Gr_Denmark, // (including Norway) 18 Feb 1700 -> 1 Mar 1700 - Gr_Egypt, // 1875 - Gr_Estonia, // 1918 - Gr_Finland, // Then part of Sweden - - Gr_France, // 9 Dec 1582 -> 20 Dec 1582 - Gr_France_Alsace, // 4 Feb 1682 -> 16 Feb 1682 - Gr_France_Lorraine, // 16 Feb 1760 -> 28 Feb 1760 - Gr_France_Strasbourg, // February 1682 - - Gr_Germany = Gr_Unknown, // Different states on different dates: - Gr_Germany_Catholic, // 1583-1585 (we take 1584) - Gr_Germany_Prussia, // 22 Aug 1610 -> 2 Sep 1610 - Gr_Germany_Protestant, // 18 Feb 1700 -> 1 Mar 1700 - - Gr_GreatBritain, // 2 Sep 1752 -> 14 Sep 1752 (use 'cal(1)') - - Gr_Greece, // 9 Mar 1924 -> 23 Mar 1924 - Gr_Hungary, // 21 Oct 1587 -> 1 Nov 1587 - Gr_Ireland = Gr_GreatBritain, - Gr_Italy = Gr_Standard, - - Gr_Japan = Gr_Unknown, // Different authorities say: - Gr_Japan_1, // 19 Dec 1872 -> 1 Jan 1873 - Gr_Japan_2, // 19 Dec 1892 -> 1 Jan 1893 - Gr_Japan_3, // 18 Dec 1918 -> 1 Jan 1919 - - Gr_Latvia, // 1915-1918 (we take 1915) - Gr_Lithuania, // 1915 - Gr_Luxemburg, // 14 Dec 1582 -> 25 Dec 1582 - Gr_Netherlands = Gr_Belgium, // (including Belgium) 1 Jan 1583 - - // this is too weird to take into account: the Gregorian calendar was - // introduced twice in Groningen, first time 28 Feb 1583 was followed - // by 11 Mar 1583, then it has gone back to Julian in the summer of - // 1584 and then 13 Dec 1700 -> 12 Jan 1701 - which is - // the date we take here - Gr_Netherlands_Groningen, // 13 Dec 1700 -> 12 Jan 1701 - Gr_Netherlands_Gelderland, // 30 Jun 1700 -> 12 Jul 1700 - Gr_Netherlands_Utrecht, // (and Overijssel) 30 Nov 1700->12 Dec 1700 - Gr_Netherlands_Friesland, // (and Drenthe) 31 Dec 1700 -> 12 Jan 1701 - - Gr_Norway = Gr_Denmark, // Then part of Denmark - Gr_Poland = Gr_Standard, - Gr_Portugal = Gr_Standard, - Gr_Romania, // 31 Mar 1919 -> 14 Apr 1919 - Gr_Russia, // 31 Jan 1918 -> 14 Feb 1918 - Gr_Scotland = Gr_GreatBritain, - Gr_Spain = Gr_Standard, - - // Sweden has a curious history. Sweden decided to make a gradual - // change from the Julian to the Gregorian calendar. By dropping every - // leap year from 1700 through 1740 the eleven superfluous days would - // be omitted and from 1 Mar 1740 they would be in sync with the - // Gregorian calendar. (But in the meantime they would be in sync with - // nobody!) - // - // So 1700 (which should have been a leap year in the Julian calendar) - // was not a leap year in Sweden. However, by mistake 1704 and 1708 - // became leap years. This left Sweden out of synchronisation with - // both the Julian and the Gregorian world, so they decided to go back - // to the Julian calendar. In order to do this, they inserted an extra - // day in 1712, making that year a double leap year! So in 1712, - // February had 30 days in Sweden. - // - // Later, in 1753, Sweden changed to the Gregorian calendar by - // dropping 11 days like everyone else. - Gr_Sweden = Gr_Finland, // 17 Feb 1753 -> 1 Mar 1753 - - Gr_Switzerland = Gr_Unknown,// Different cantons used different dates - Gr_Switzerland_Catholic, // 1583, 1584 or 1597 (we take 1584) - Gr_Switzerland_Protestant, // 31 Dec 1700 -> 12 Jan 1701 - - Gr_Turkey, // 1 Jan 1927 - Gr_USA = Gr_GreatBritain, - Gr_Wales = Gr_GreatBritain, - Gr_Yugoslavia // 1919 - }; - // the country parameter is used so far for calculating the start and // the end of DST period and for deciding whether the date is a work // day or not @@ -408,7 +289,7 @@ public: // helper classes // ------------------------------------------------------------------------ - // a class representing a time zone: basicly, this is just an offset + // a class representing a time zone: basically, this is just an offset // (in seconds) from GMT class WXDLLIMPEXP_BASE TimeZone { @@ -693,7 +574,7 @@ public: // default assignment operator is ok // calendar calculations (functions which set the date only leave the time - // unchanged, e.g. don't explictly zero it): SetXXX() functions modify the + // unchanged, e.g. don't explicitly zero it): SetXXX() functions modify the // object itself, GetXXX() ones return a new object. // ------------------------------------------------------------------------ @@ -909,14 +790,6 @@ public: // 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; - // dos date and time format // ------------------------------------------------------------------------ @@ -1063,6 +936,8 @@ public: inline wxTimeSpan Subtract(const wxDateTime& dt) const; inline wxTimeSpan operator-(const wxDateTime& dt2) const; + wxDateSpan DiffAsDateSpan(const wxDateTime& dt) const; + // conversion to/from text // ------------------------------------------------------------------------ @@ -1205,6 +1080,52 @@ public: : wxAnyStrPtr(); } + // In addition to wxAnyStrPtr versions above we also must provide the + // overloads for C strings as we must return a pointer into the original + // string and not inside a temporary wxString which would have been created + // if the overloads above were used. + // + // And then we also have to provide the overloads for wxCStrData, as usual. + // Unfortunately those ones can't return anything as we don't have any + // sufficiently long-lived wxAnyStrPtr to return from them: any temporary + // strings it would point to would be destroyed when this function returns + // making it impossible to dereference the return value. So we just don't + // return anything from here which at least allows to keep compatibility + // with the code not testing the return value. Other uses of this method + // need to be converted to use one of the new bool-returning overloads + // above. + void ParseRfc822Date(const wxCStrData& date) + { ParseRfc822Date(wxString(date)); } + const char* ParseRfc822Date(const char* date); + const wchar_t* ParseRfc822Date(const wchar_t* date); + + void ParseFormat(const wxCStrData& date, + const wxString& format = wxDefaultDateTimeFormat, + const wxDateTime& dateDef = wxDefaultDateTime) + { ParseFormat(wxString(date), format, dateDef); } + const char* ParseFormat(const char* date, + const wxString& format = wxDefaultDateTimeFormat, + const wxDateTime& dateDef = wxDefaultDateTime); + const wchar_t* ParseFormat(const wchar_t* date, + const wxString& format = wxDefaultDateTimeFormat, + const wxDateTime& dateDef = wxDefaultDateTime); + + void ParseDateTime(const wxCStrData& datetime) + { ParseDateTime(wxString(datetime)); } + const char* ParseDateTime(const char* datetime); + const wchar_t* ParseDateTime(const wchar_t* datetime); + + void ParseDate(const wxCStrData& date) + { ParseDate(wxString(date)); } + const char* ParseDate(const char* date); + const wchar_t* ParseDate(const wchar_t* date); + + void ParseTime(const wxCStrData& time) + { ParseTime(wxString(time)); } + const char* ParseTime(const char* time); + const wchar_t* ParseTime(const wchar_t* time); + + // implementation // ------------------------------------------------------------------------ @@ -1531,6 +1452,8 @@ public: int GetYears() const { return m_years; } // get number of months int GetMonths() const { return m_months; } + // returns 12*GetYears() + GetMonths() + int GetTotalMonths() const { return 12*m_years + m_months; } // get number of weeks int GetWeeks() const { return m_weeks; } // get number of days @@ -1731,9 +1654,16 @@ inline wxDateTime wxDateTime::Today() #if (!(defined(__VISAGECPP__) && __IBMCPP__ >= 400)) inline wxDateTime& wxDateTime::Set(time_t timet) { - // assign first to avoid long multiplication overflow! - m_time = timet - WX_TIME_BASE_OFFSET ; - m_time *= TIME_T_FACTOR; + if ( timet == (time_t)-1 ) + { + m_time = wxInvalidDateTime.m_time; + } + else + { + // assign first to avoid long multiplication overflow! + m_time = timet - WX_TIME_BASE_OFFSET; + m_time *= TIME_T_FACTOR; + } return *this; } @@ -2069,9 +1999,9 @@ inline wxLongLong wxTimeSpan::GetSeconds() const inline int wxTimeSpan::GetMinutes() const { - // explicit cast to int suppresses a warning with CodeWarrior and possibly - // others (changing the return type to long from int is impossible in 2.8) - return (int)((GetSeconds() / 60l).GetLo()); + // For compatibility, this method (and the other accessors) return int, + // even though GetLo() actually returns unsigned long with greater range. + return static_cast((GetSeconds() / 60l).GetLo()); } inline int wxTimeSpan::GetHours() const diff --git a/Externals/wxWidgets3/include/wx/datetimectrl.h b/Externals/wxWidgets3/include/wx/datetimectrl.h index 8632d5f12e..30f23dfffe 100644 --- a/Externals/wxWidgets3/include/wx/datetimectrl.h +++ b/Externals/wxWidgets3/include/wx/datetimectrl.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxDateTimePickerCtrl class. // Author: Vadim Zeitlin // Created: 2011-09-22 -// RCS-ID: $Id: datetimectrl.h 70071 2011-12-20 21:27:14Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/datstrm.h b/Externals/wxWidgets3/include/wx/datstrm.h index a3b99180c7..477da30ec6 100644 --- a/Externals/wxWidgets3/include/wx/datstrm.h +++ b/Externals/wxWidgets3/include/wx/datstrm.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: Mickael Gilabert // Created: 28/06/1998 -// RCS-ID: $Id: datstrm.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -18,15 +17,64 @@ #if wxUSE_STREAMS -class WXDLLIMPEXP_BASE wxDataInputStream +// Common wxDataInputStream and wxDataOutputStream parameters. +class WXDLLIMPEXP_BASE wxDataStreamBase { public: + void BigEndianOrdered(bool be_order) { m_be_order = be_order; } + + // By default we use extended precision (80 bit) format for both float and + // doubles. Call this function to switch to alternative representation in + // which IEEE 754 single precision (32 bits) is used for floats and double + // precision (64 bits) is used for doubles. + void UseBasicPrecisions() + { +#if wxUSE_APPLE_IEEE + m_useExtendedPrecision = false; +#endif // wxUSE_APPLE_IEEE + } + + // UseExtendedPrecision() is not very useful as it corresponds to the + // default value, only call it in your code if you want the compilation + // fail with the error when using wxWidgets library compiled without + // extended precision support. +#if wxUSE_APPLE_IEEE + void UseExtendedPrecision() + { + m_useExtendedPrecision = true; + } +#endif // wxUSE_APPLE_IEEE + #if wxUSE_UNICODE - wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvUTF8 ); -#else - wxDataInputStream(wxInputStream& s); + void SetConv( const wxMBConv &conv ); + wxMBConv *GetConv() const { return m_conv; } #endif - ~wxDataInputStream(); + +protected: + // Ctor and dtor are both protected, this class is never used directly but + // only by its derived classes. + wxDataStreamBase(const wxMBConv& conv); + ~wxDataStreamBase(); + + + bool m_be_order; + +#if wxUSE_APPLE_IEEE + bool m_useExtendedPrecision; +#endif // wxUSE_APPLE_IEEE + +#if wxUSE_UNICODE + wxMBConv *m_conv; +#endif + + wxDECLARE_NO_COPY_CLASS(wxDataStreamBase); +}; + + +class WXDLLIMPEXP_BASE wxDataInputStream : public wxDataStreamBase +{ +public: + wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvUTF8); bool IsOk() { return m_input->IsOk(); } @@ -40,6 +88,7 @@ public: wxUint16 Read16(); wxUint8 Read8(); double ReadDouble(); + float ReadFloat(); wxString ReadString(); #if wxHAS_INT64 @@ -58,6 +107,7 @@ public: void Read16(wxUint16 *buffer, size_t size); void Read8(wxUint8 *buffer, size_t size); void ReadDouble(double *buffer, size_t size); + void ReadFloat(float *buffer, size_t size); wxDataInputStream& operator>>(wxString& s); wxDataInputStream& operator>>(wxInt8& c); @@ -74,35 +124,19 @@ public: wxDataInputStream& operator>>(wxULongLong& i); wxDataInputStream& operator>>(wxLongLong& i); #endif - wxDataInputStream& operator>>(double& i); + wxDataInputStream& operator>>(double& d); wxDataInputStream& operator>>(float& f); - void BigEndianOrdered(bool be_order) { m_be_order = be_order; } - -#if wxUSE_UNICODE - void SetConv( const wxMBConv &conv ); - wxMBConv *GetConv() const { return m_conv; } -#endif - protected: wxInputStream *m_input; - bool m_be_order; -#if wxUSE_UNICODE - wxMBConv *m_conv; -#endif wxDECLARE_NO_COPY_CLASS(wxDataInputStream); }; -class WXDLLIMPEXP_BASE wxDataOutputStream +class WXDLLIMPEXP_BASE wxDataOutputStream : public wxDataStreamBase { public: -#if wxUSE_UNICODE - wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvUTF8 ); -#else - wxDataOutputStream(wxOutputStream& s); -#endif - ~wxDataOutputStream(); + wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvUTF8); bool IsOk() { return m_output->IsOk(); } @@ -118,6 +152,7 @@ public: void Write16(wxUint16 i); void Write8(wxUint8 i); void WriteDouble(double d); + void WriteFloat(float f); void WriteString(const wxString& string); #if wxHAS_INT64 @@ -136,6 +171,7 @@ public: void Write16(const wxUint16 *buffer, size_t size); void Write8(const wxUint8 *buffer, size_t size); void WriteDouble(const double *buffer, size_t size); + void WriteFloat(const float *buffer, size_t size); wxDataOutputStream& operator<<(const wxString& string); wxDataOutputStream& operator<<(wxInt8 c); @@ -152,22 +188,11 @@ public: wxDataOutputStream& operator<<(const wxULongLong &i); wxDataOutputStream& operator<<(const wxLongLong &i); #endif - wxDataOutputStream& operator<<(double f); + wxDataOutputStream& operator<<(double d); wxDataOutputStream& operator<<(float f); - void BigEndianOrdered(bool be_order) { m_be_order = be_order; } - -#if wxUSE_UNICODE - void SetConv( const wxMBConv &conv ); - wxMBConv *GetConv() const { return m_conv; } -#endif - protected: wxOutputStream *m_output; - bool m_be_order; -#if wxUSE_UNICODE - wxMBConv *m_conv; -#endif wxDECLARE_NO_COPY_CLASS(wxDataOutputStream); }; diff --git a/Externals/wxWidgets3/include/wx/dc.h b/Externals/wxWidgets3/include/wx/dc.h index 2e66988c37..d13720500b 100644 --- a/Externals/wxWidgets3/include/wx/dc.h +++ b/Externals/wxWidgets3/include/wx/dc.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 05/25/99 -// RCS-ID: $Id: dc.h 68935 2011-08-27 23:26:53Z RD $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -283,6 +282,8 @@ public: return NULL; } + virtual void* GetHandle() const { return NULL; } + // query dimension, colour deps, resolution virtual void DoGetSize(int *width, int *height) const = 0; @@ -431,8 +432,12 @@ public: // clipping + // Note that this pure virtual method has an implementation that updates + // the values returned by DoGetClippingBox() and so can be called from the + // derived class overridden version if it makes sense (i.e. if the clipping + // box coordinates are not already updated in some other way). virtual void DoSetClippingRegion(wxCoord x, wxCoord y, - wxCoord width, wxCoord height) = 0; + wxCoord w, wxCoord h) = 0; // NB: this function works with device coordinates, not the logical ones! virtual void DoSetDeviceClippingRegion(const wxRegion& region) = 0; @@ -515,6 +520,8 @@ public: // this needs to overidden if the axis is inverted virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp); + + virtual double GetContentScaleFactor() const { return m_contentScaleFactor; } #ifdef __WXMSW__ // Native Windows functions using the underlying HDC don't honour GDI+ @@ -598,15 +605,15 @@ public: { return wxNullBitmap; } - virtual void DoDrawLines(int n, wxPoint points[], + virtual void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset ) = 0; virtual void DrawLines(const wxPointList *list, wxCoord xoffset, wxCoord yoffset ); - virtual void DoDrawPolygon(int n, wxPoint points[], + virtual void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle = wxODDEVEN_RULE) = 0; - virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[], + virtual void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle); void DrawPolygon(const wxPointList *list, @@ -618,7 +625,7 @@ public: void DrawSpline(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord x3, wxCoord y3); - void DrawSpline(int n, wxPoint points[]); + void DrawSpline(int n, const wxPoint points[]); void DrawSpline(const wxPointList *points) { DoDrawSpline(points); } virtual void DoDrawSpline(const wxPointList *points); @@ -741,6 +748,8 @@ protected: double m_scaleX, m_scaleY; // calculated from logical scale and user scale int m_signX, m_signY; // Used by SetAxisOrientation() to invert the axes + + double m_contentScaleFactor; // used by high resolution displays (retina) // what is a mm on a screen you don't know the size of? double m_mm_to_pix_x, @@ -787,6 +796,9 @@ public: wxWindow *GetWindow() const { return m_pimpl->GetWindow(); } + void *GetHandle() const + { return m_pimpl->GetHandle(); } + bool IsOk() const { return m_pimpl && m_pimpl->IsOk(); } @@ -821,6 +833,9 @@ public: virtual int GetResolution() const { return m_pimpl->GetResolution(); } + double GetContentScaleFactor() const + { return m_pimpl->GetContentScaleFactor(); } + // Right-To-Left (RTL) modes void SetLayoutDirection(wxLayoutDirection dir) @@ -1130,7 +1145,7 @@ public: void DrawPoint(const wxPoint& pt) { m_pimpl->DoDrawPoint(pt.x, pt.y); } - void DrawLines(int n, wxPoint points[], + void DrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0) { m_pimpl->DoDrawLines(n, points, xoffset, yoffset); } void DrawLines(const wxPointList *list, @@ -1141,7 +1156,7 @@ public: wxCoord xoffset = 0, wxCoord yoffset = 0) ); #endif // WXWIN_COMPATIBILITY_2_8 - void DrawPolygon(int n, wxPoint points[], + void DrawPolygon(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle = wxODDEVEN_RULE) { m_pimpl->DoDrawPolygon(n, points, xoffset, yoffset, fillStyle); } @@ -1149,7 +1164,7 @@ public: wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle = wxODDEVEN_RULE) { m_pimpl->DrawPolygon( list, xoffset, yoffset, fillStyle ); } - void DrawPolyPolygon(int n, int count[], wxPoint points[], + void DrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle = wxODDEVEN_RULE) { m_pimpl->DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle); } @@ -1272,7 +1287,7 @@ public: wxCoord x2, wxCoord y2, wxCoord x3, wxCoord y3) { m_pimpl->DrawSpline(x1,y1,x2,y2,x3,y3); } - void DrawSpline(int n, wxPoint points[]) + void DrawSpline(int n, const wxPoint points[]) { m_pimpl->DrawSpline(n,points); } void DrawSpline(const wxPointList *points) { m_pimpl->DrawSpline(points); } diff --git a/Externals/wxWidgets3/include/wx/dcbuffer.h b/Externals/wxWidgets3/include/wx/dcbuffer.h index 5e150eca83..f4d27c7fb8 100644 --- a/Externals/wxWidgets3/include/wx/dcbuffer.h +++ b/Externals/wxWidgets3/include/wx/dcbuffer.h @@ -4,7 +4,6 @@ // Author: Ron Lee // Modified by: Vadim Zeitlin (refactored, added bg preservation) // Created: 16/03/02 -// RCS-ID: $Id: dcbuffer.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) Ron Lee // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -134,6 +133,8 @@ private: // the buffering style int m_style; + wxSize m_area; + DECLARE_DYNAMIC_CLASS(wxBufferedDC) wxDECLARE_NO_COPY_CLASS(wxBufferedDC); }; diff --git a/Externals/wxWidgets3/include/wx/dcclient.h b/Externals/wxWidgets3/include/wx/dcclient.h index c036a7d3ad..f4bf74f75f 100644 --- a/Externals/wxWidgets3/include/wx/dcclient.h +++ b/Externals/wxWidgets3/include/wx/dcclient.h @@ -3,7 +3,6 @@ // Purpose: wxClientDC base header // Author: Julian Smart // Copyright: (c) Julian Smart -// RCS-ID: $Id: dcclient.h 50385 2007-11-30 20:56:12Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dcgraph.h b/Externals/wxWidgets3/include/wx/dcgraph.h index b636f239de..06cca91298 100644 --- a/Externals/wxWidgets3/include/wx/dcgraph.h +++ b/Externals/wxWidgets3/include/wx/dcgraph.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Stefan Csomor -// RCS-ID: $Id: dcgraph.h 68935 2011-08-27 23:26:53Z RD $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -68,9 +67,6 @@ public: virtual ~wxGCDCImpl(); - void Init(); - - // implement base class pure virtuals // ---------------------------------- @@ -102,8 +98,6 @@ public: virtual int GetDepth() const; virtual wxSize GetPPI() const; - virtual void SetMapMode(wxMappingMode mode); - virtual void SetLogicalFunction(wxRasterOperationMode function); virtual void SetTextForeground(const wxColour& colour); @@ -114,6 +108,8 @@ public: wxGraphicsContext* GetGraphicsContext() const { return m_graphicContext; } virtual void SetGraphicsContext( wxGraphicsContext* ctx ); + virtual void* GetHandle() const; + // the true implementations virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, wxFloodFillStyle style = wxFLOOD_SURFACE); @@ -180,12 +176,12 @@ public: virtual void DoGetSize(int *,int *) const; virtual void DoGetSizeMM(int* width, int* height) const; - virtual void DoDrawLines(int n, wxPoint points[], + virtual void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset); - virtual void DoDrawPolygon(int n, wxPoint points[], + virtual void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); - virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[], + virtual void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle); @@ -206,9 +202,12 @@ public: #endif // __WXMSW__ protected: + // unused int parameter distinguishes this version, which does not create a + // wxGraphicsContext, in the expectation that the derived class will do it + wxGCDCImpl(wxDC* owner, int); + // scaling variables bool m_logicalFunctionSupported; - double m_mm_to_pix_x, m_mm_to_pix_y; wxGraphicsMatrix m_matrixOriginal; wxGraphicsMatrix m_matrixCurrent; @@ -216,6 +215,9 @@ protected: wxGraphicsContext* m_graphicContext; +private: + void Init(wxGraphicsContext*); + DECLARE_CLASS(wxGCDCImpl) wxDECLARE_NO_COPY_CLASS(wxGCDCImpl); }; diff --git a/Externals/wxWidgets3/include/wx/dcmemory.h b/Externals/wxWidgets3/include/wx/dcmemory.h index 80f21e69d6..d5f301c942 100644 --- a/Externals/wxWidgets3/include/wx/dcmemory.h +++ b/Externals/wxWidgets3/include/wx/dcmemory.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: dcmemory.h 61724 2009-08-21 10:41:26Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dcmirror.h b/Externals/wxWidgets3/include/wx/dcmirror.h index f6667d7c8f..42deb9771c 100644 --- a/Externals/wxWidgets3/include/wx/dcmirror.h +++ b/Externals/wxWidgets3/include/wx/dcmirror.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 21.07.2003 -// RCS-ID: $Id: dcmirror.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -66,6 +65,9 @@ public: virtual void SetLogicalFunction(wxRasterOperationMode function) { m_dc.SetLogicalFunction(function); } + virtual void* GetHandle() const + { return m_dc.GetHandle(); } + protected: // returns x and y if not mirroring or y and x if mirroring wxCoord GetX(wxCoord x, wxCoord y) const { return m_mirror ? y : x; } @@ -79,27 +81,23 @@ protected: wxCoord *GetX(wxCoord *x, wxCoord *y) const { return m_mirror ? y : x; } wxCoord *GetY(wxCoord *x, wxCoord *y) const { return m_mirror ? x : y; } - // exchange x and y unconditionally - static void Swap(wxCoord& x, wxCoord& y) - { - wxCoord t = x; - x = y; - y = t; - } - // exchange x and y components of all points in the array if necessary - void Mirror(int n, wxPoint points[]) const + wxPoint* Mirror(int n, const wxPoint*& points) const { + wxPoint* points_alloc = NULL; if ( m_mirror ) { + points_alloc = new wxPoint[n]; for ( int i = 0; i < n; i++ ) { - Swap(points[i].x, points[i].y); + points_alloc[i].x = points[i].y; + points_alloc[i].y = points[i].x; } + points = points_alloc; } + return points_alloc; } - // wxDCBase functions virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, wxFloodFillStyle style = wxFLOOD_SURFACE) @@ -223,28 +221,28 @@ protected: m_dc.DoGetSizeMM(GetX(w, h), GetY(w, h)); } - virtual void DoDrawLines(int n, wxPoint points[], + virtual void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset) { - Mirror(n, points); + wxPoint* points_alloc = Mirror(n, points); m_dc.DoDrawLines(n, points, GetX(xoffset, yoffset), GetY(xoffset, yoffset)); - Mirror(n, points); + delete[] points_alloc; } - virtual void DoDrawPolygon(int n, wxPoint points[], + virtual void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle = wxODDEVEN_RULE) { - Mirror(n, points); + wxPoint* points_alloc = Mirror(n, points); m_dc.DoDrawPolygon(n, points, GetX(xoffset, yoffset), GetY(xoffset, yoffset), fillStyle); - Mirror(n, points); + delete[] points_alloc; } virtual void DoSetDeviceClippingRegion(const wxRegion& WXUNUSED(region)) diff --git a/Externals/wxWidgets3/include/wx/dcprint.h b/Externals/wxWidgets3/include/wx/dcprint.h index b1b563c775..6d84731116 100644 --- a/Externals/wxWidgets3/include/wx/dcprint.h +++ b/Externals/wxWidgets3/include/wx/dcprint.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: dcprint.h 56783 2008-11-15 11:10:34Z FM $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dcps.h b/Externals/wxWidgets3/include/wx/dcps.h index 2615d33243..659eb595f1 100644 --- a/Externals/wxWidgets3/include/wx/dcps.h +++ b/Externals/wxWidgets3/include/wx/dcps.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: dcps.h 33948 2005-05-04 18:57:50Z JS $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dcscreen.h b/Externals/wxWidgets3/include/wx/dcscreen.h index 85ceb8dd82..391e91aacf 100644 --- a/Externals/wxWidgets3/include/wx/dcscreen.h +++ b/Externals/wxWidgets3/include/wx/dcscreen.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: dcscreen.h 61724 2009-08-21 10:41:26Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dcsvg.h b/Externals/wxWidgets3/include/wx/dcsvg.h index 2321a227eb..c6485ff131 100644 --- a/Externals/wxWidgets3/include/wx/dcsvg.h +++ b/Externals/wxWidgets3/include/wx/dcsvg.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Chris Elliott -// RCS-ID: $Id: dcsvg.h 61724 2009-08-21 10:41:26Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -54,10 +53,7 @@ public: wxFAIL_MSG(wxT("wxSVGFILEDC::Clear() Call not implemented \nNot sensible for an output file?")); } - virtual void DestroyClippingRegion() - { - wxFAIL_MSG(wxT("wxSVGFILEDC::void Call not yet implemented")); - } + virtual void DestroyClippingRegion(); virtual wxCoord GetCharHeight() const; virtual wxCoord GetCharWidth() const; @@ -96,6 +92,8 @@ public: virtual void SetFont(const wxFont& font); virtual void SetPen(const wxPen& pen); + virtual void* GetHandle() const { return NULL; } + private: virtual bool DoGetPixel(wxCoord, wxCoord, wxColour *) const { @@ -127,12 +125,12 @@ private: virtual void DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); - virtual void DoDrawLines(int n, wxPoint points[], + virtual void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); virtual void DoDrawPoint(wxCoord, wxCoord); - virtual void DoDrawPolygon(int n, wxPoint points[], + virtual void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle); @@ -173,10 +171,7 @@ private: wxFAIL_MSG(wxT("wxSVGFILEDC::DoSetDeviceClippingRegion not yet implemented")); } - virtual void DoSetClippingRegion( int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height) ) - { - wxFAIL_MSG(wxT("wxSVGFILEDC::DoSetClippingRegion not yet implemented")); - } + virtual void DoSetClippingRegion(int x, int y, int width, int height); virtual void DoGetSizeMM( int *width, int *height ) const; @@ -184,20 +179,33 @@ private: void Init (const wxString &filename, int width, int height, double dpi); - void NewGraphics(); - void write( const wxString &s ); private: + // If m_graphics_changed is true, close the current element and start a + // new one for the last pen/brush change. + void NewGraphicsIfNeeded(); + + // Open a new graphics group setting up all the attributes according to + // their current values in wxDC. + void DoStartNewGraphics(); + wxFileOutputStream *m_outfile; wxString m_filename; int m_sub_images; // number of png format images we have bool m_OK; - bool m_graphics_changed; + bool m_graphics_changed; // set by Set{Brush,Pen}() int m_width, m_height; double m_dpi; -private: + // The clipping nesting level is incremented by every call to + // SetClippingRegion() and reset when DestroyClippingRegion() is called. + size_t m_clipNestingLevel; + + // Unique ID for every clipping graphics group: this is simply always + // incremented in each SetClippingRegion() call. + size_t m_clipUniqueId; + DECLARE_ABSTRACT_CLASS(wxSVGFileDCImpl) }; diff --git a/Externals/wxWidgets3/include/wx/dde.h b/Externals/wxWidgets3/include/wx/dde.h index 1c15a1f3ce..d6524e1ff6 100644 --- a/Externals/wxWidgets3/include/wx/dde.h +++ b/Externals/wxWidgets3/include/wx/dde.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: dde.h 70808 2012-03-04 20:31:42Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/debug.h b/Externals/wxWidgets3/include/wx/debug.h index 589ae85f67..f80f7be680 100644 --- a/Externals/wxWidgets3/include/wx/debug.h +++ b/Externals/wxWidgets3/include/wx/debug.h @@ -3,7 +3,6 @@ // Purpose: Misc debug functions and macros // Author: Vadim Zeitlin // Created: 29/01/98 -// RCS-ID: $Id: debug.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) 1998-2009 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -178,28 +177,28 @@ inline void wxDisableAsserts() { wxSetAssertHandler(NULL); } // // also notice that these functions can't be inline as wxString is not defined // yet (and can't be as wxString code itself may use assertions) -extern void WXDLLIMPEXP_BASE wxOnAssert(const char *file, +extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, int line, const char *func, const char *cond); -extern void WXDLLIMPEXP_BASE wxOnAssert(const char *file, +extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, int line, const char *func, const char *cond, const char *msg); -extern void WXDLLIMPEXP_BASE wxOnAssert(const char *file, +extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, int line, const char *func, const char *cond, - const wxChar *msg); + const wxChar *msg) ; #endif /* wxUSE_UNICODE */ // this version is for compatibility with wx 2.8 Unicode build only, we don't // use it ourselves any more except in ANSI-only build in which case it is all // we need -extern void WXDLLIMPEXP_BASE wxOnAssert(const wxChar *file, +extern WXDLLIMPEXP_BASE void wxOnAssert(const wxChar *file, int line, const char *func, const wxChar *cond, @@ -208,24 +207,24 @@ extern void WXDLLIMPEXP_BASE wxOnAssert(const wxChar *file, // these overloads work when msg passed to debug macro is a string and we // also have to provide wxCStrData overload to resolve ambiguity which would // otherwise arise from wxASSERT( s.c_str() ) -extern void WXDLLIMPEXP_BASE wxOnAssert(const wxString& file, +extern WXDLLIMPEXP_BASE void wxOnAssert(const wxString& file, int line, const wxString& func, const wxString& cond, const wxString& msg); -extern void WXDLLIMPEXP_BASE wxOnAssert(const wxString& file, +extern WXDLLIMPEXP_BASE void wxOnAssert(const wxString& file, int line, const wxString& func, const wxString& cond); -extern void WXDLLIMPEXP_BASE wxOnAssert(const char *file, +extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, int line, const char *func, const char *cond, const wxCStrData& msg); -extern void WXDLLIMPEXP_BASE wxOnAssert(const char *file, +extern WXDLLIMPEXP_BASE void wxOnAssert(const char *file, int line, const char *func, const char *cond, @@ -251,22 +250,41 @@ extern void WXDLLIMPEXP_BASE wxOnAssert(const char *file, this macro only does anything if wxDEBUG_LEVEL >= 2. */ #if wxDEBUG_LEVEL - // call this function to break into the debugger unconditionally (assuming - // the program is running under debugger, of course) - extern void WXDLLIMPEXP_BASE wxTrap(); - - // assert checks if the condition is true and calls the assert handler with - // the provided message if it isn't + // wxTrap() can be used to break into the debugger unconditionally + // (assuming the program is running under debugger, of course). // - // NB: the macro is defined like this to ensure that nested if/else - // statements containing it are compiled in the same way whether it is - // defined as empty or not; also notice that we can't use ";" instead - // of "{}" as some compilers warn about "possible unwanted ;" then + // If possible, we prefer to define it as a macro rather than as a function + // to open the debugger at the position where we trapped and not inside the + // trap function itself which is not very useful. + #if wxCHECK_VISUALC_VERSION(7) + #define wxTrap() __debugbreak() + #else + extern WXDLLIMPEXP_BASE void wxTrap(); + #endif // Win VisualC + + // Global flag used to indicate that assert macros should call wxTrap(): it + // is set by the default assert handler if the user answers yes to the + // question of whether to trap. + extern WXDLLIMPEXP_DATA_BASE(bool) wxTrapInAssert; + + // This macro checks if the condition is true and calls the assert handler + // with the provided message if it isn't and finally traps if the special + // flag indicating that it should do it was set by the handler. + // + // Notice that we don't use the handler return value for compatibility + // reasons (if we changed its return type, we'd need to change wxApp:: + // OnAssertFailure() too which would break user code overriding it), hence + // the need for the ugly global flag. #define wxASSERT_MSG(cond, msg) \ - if ( !wxTheAssertHandler || (cond) ) \ - {} \ - else \ - wxOnAssert(__FILE__, __LINE__, __WXFUNCTION__, #cond, msg) + wxSTATEMENT_MACRO_BEGIN \ + if ( wxTheAssertHandler && !(cond) && \ + (wxOnAssert(__FILE__, __LINE__, __WXFUNCTION__, \ + #cond, msg), wxTrapInAssert) ) \ + { \ + wxTrapInAssert = false; \ + wxTrap(); \ + } \ + wxSTATEMENT_MACRO_END // a version without any additional message, don't use unless condition // itself is fully self-explanatory @@ -274,11 +292,17 @@ extern void WXDLLIMPEXP_BASE wxOnAssert(const char *file, // wxFAIL is a special form of assert: it always triggers (and so is // usually used in normally unreachable code) - #define wxFAIL_COND_MSG(cond, msg) \ - if ( !wxTheAssertHandler ) \ - {} \ - else \ - wxOnAssert(__FILE__, __LINE__, __WXFUNCTION__, cond, msg) + #define wxFAIL_COND_MSG(cond, msg) \ + wxSTATEMENT_MACRO_BEGIN \ + if ( wxTheAssertHandler && \ + (wxOnAssert(__FILE__, __LINE__, __WXFUNCTION__, \ + cond, msg), wxTrapInAssert) ) \ + { \ + wxTrapInAssert = false; \ + wxTrap(); \ + } \ + wxSTATEMENT_MACRO_END + #define wxFAIL_MSG(msg) wxFAIL_COND_MSG("Assert failure", msg) #define wxFAIL wxFAIL_MSG((const char*)NULL) #else // !wxDEBUG_LEVEL @@ -437,10 +461,9 @@ template struct static_assert_test{}; /* Return true if we're running under debugger. - Currently this only really works under Win32 and Mac in CodeWarrior builds, - it always returns false in other cases. + Currently only really works under Win32 and just returns false elsewhere. */ -#if defined(__WXMAC__) || defined(__WIN32__) +#if defined(__WIN32__) extern bool WXDLLIMPEXP_BASE wxIsDebuggerRunning(); #else // !Mac inline bool wxIsDebuggerRunning() { return false; } diff --git a/Externals/wxWidgets3/include/wx/debugrpt.h b/Externals/wxWidgets3/include/wx/debugrpt.h index 4aae1055a1..421bede975 100644 --- a/Externals/wxWidgets3/include/wx/debugrpt.h +++ b/Externals/wxWidgets3/include/wx/debugrpt.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxDebugReport class // Author: Vadim Zeitlin // Created: 2005-01-17 -// RCS-ID: $Id: debugrpt.h 61663 2009-08-14 00:06:03Z VZ $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/defs.h b/Externals/wxWidgets3/include/wx/defs.h index 27e685a535..00c6427636 100644 --- a/Externals/wxWidgets3/include/wx/defs.h +++ b/Externals/wxWidgets3/include/wx/defs.h @@ -4,7 +4,6 @@ * Author: Julian Smart and others * Modified by: Ryan Norton (Converted to C) * Created: 01/02/97 - * RCS-ID: $Id: defs.h 70353 2012-01-15 14:46:41Z VZ $ * Copyright: (c) Julian Smart * Licence: wxWindows licence */ @@ -30,7 +29,7 @@ #ifdef __cplusplus /* Make sure the environment is set correctly */ # if defined(__WXMSW__) && defined(__X__) -# error "Target can't be both X and Windows" +# error "Target can't be both X and MSW" # elif !defined(__WXMOTIF__) && \ !defined(__WXMSW__) && \ !defined(__WXGTK__) && \ @@ -175,6 +174,18 @@ # define wxSUPPRESS_GCC_PRIVATE_DTOR_WARNING(name) #endif +/* + Clang Support + */ + +#ifndef WX_HAS_CLANG_FEATURE +# ifndef __has_feature +# define WX_HAS_CLANG_FEATURE(x) 0 +# else +# define WX_HAS_CLANG_FEATURE(x) __has_feature(x) +# endif +#endif + /* ---------------------------------------------------------------------------- */ /* wxWidgets version and compatibility defines */ /* ---------------------------------------------------------------------------- */ @@ -205,7 +216,7 @@ /* Prevents conflicts between sys/types.h and winsock.h with Cygwin, */ /* when using Windows sockets. */ -#ifdef __CYGWIN__ +#if defined(__CYGWIN__) && defined(__WXMSW__) #define __USE_W32_SOCKETS #endif @@ -252,9 +263,6 @@ typedef short int WXTYPE; #elif defined(__BORLANDC__) && (__BORLANDC__ >= 0x0520) /* BC++ 4.52 doesn't support explicit, CBuilder 1 does */ #define HAVE_EXPLICIT - #elif defined(__MWERKS__) && (__MWERKS__ >= 0x2400) - /* Metrowerks CW6 or higher has explicit */ - #define HAVE_EXPLICIT #elif defined(__DIGITALMARS__) #define HAVE_EXPLICIT #elif defined(__WATCOMC__) @@ -347,6 +355,32 @@ typedef short int WXTYPE; #endif #endif +#if defined(__has_include) + #if !defined(HAVE_TYPE_TRAITS) && __has_include() + #define HAVE_TYPE_TRAITS + #endif + + #if !defined(HAVE_TR1_TYPE_TRAITS) && __has_include() + #define HAVE_TR1_TYPE_TRAITS + #endif + + #if !defined(HAVE_STD_UNORDERED_MAP) && __has_include() + #define HAVE_STD_UNORDERED_MAP + #endif + + #if !defined(HAVE_TR1_UNORDERED_MAP) && __has_include() + #define HAVE_TR1_UNORDERED_MAP + #endif + + #if !defined(HAVE_STD_UNORDERED_SET) && __has_include() + #define HAVE_STD_UNORDERED_SET + #endif + + #if !defined(HAVE_TR1_UNORDERED_SET) && __has_include() + #define HAVE_TR1_UNORDERED_SET + #endif +#endif // defined(__has_include) + /* provide replacement for C99 va_copy() if the compiler doesn't have it */ /* could be already defined by configure or the user */ @@ -390,13 +424,6 @@ typedef short int WXTYPE; #endif /* va_copy/!va_copy */ #endif /* wxVaCopy */ -#ifndef HAVE_VARIADIC_MACROS - #if wxCHECK_WATCOM_VERSION(1,2) - #define HAVE_VARIADIC_MACROS - #endif -#endif /* HAVE_VARIADIC_MACROS */ - - #ifndef HAVE_WOSTREAM /* Mingw <= 3.4 and all versions of Cygwin don't have std::wostream @@ -461,7 +488,7 @@ typedef short int WXTYPE; #define wxSTDCALL #endif /* platform */ -/* LINKAGEMODE mode is empty for everyting except OS/2 */ +/* LINKAGEMODE mode is empty for everything except OS/2 */ #ifndef LINKAGEMODE #define LINKAGEMODE #endif /* LINKAGEMODE */ @@ -513,16 +540,71 @@ typedef short int WXTYPE; # define WX_ATTRIBUTE_PRINTF_5 WX_ATTRIBUTE_PRINTF(5, 6) #endif /* !defined(WX_ATTRIBUTE_PRINTF) */ - -/* Macro to issue warning when using deprecated functions with gcc3 or MSVC7: */ -#if wxCHECK_GCC_VERSION(3, 1) - #define wxDEPRECATED(x) __attribute__((deprecated)) x -#elif defined(__VISUALC__) && (__VISUALC__ >= 1300) - #define wxDEPRECATED(x) __declspec(deprecated) x -#else - #define wxDEPRECATED(x) x +#ifndef WX_ATTRIBUTE_NORETURN +# if WX_HAS_CLANG_FEATURE(attribute_analyzer_noreturn) +# define WX_ATTRIBUTE_NORETURN __attribute__((analyzer_noreturn)) +# elif defined( __GNUC__ ) +# define WX_ATTRIBUTE_NORETURN __attribute__ ((noreturn)) +# elif wxCHECK_VISUALC_VERSION(7) +# define WX_ATTRIBUTE_NORETURN __declspec(noreturn) +# else +# define WX_ATTRIBUTE_NORETURN +# endif #endif +#if defined(__GNUC__) + #define WX_ATTRIBUTE_UNUSED __attribute__ ((unused)) +#else + #define WX_ATTRIBUTE_UNUSED +#endif + +/* + Macros for marking functions as being deprecated. + + The preferred macro in the new code is wxDEPRECATED_MSG() which allows to + explain why is the function deprecated. Almost all the existing code uses + the older wxDEPRECATED() or its variants currently, but this will hopefully + change in the future. + */ + +/* The basic compiler-specific construct to generate a deprecation warning. */ +#ifdef __clang__ + #define wxDEPRECATED_DECL __attribute__((deprecated)) +#elif wxCHECK_GCC_VERSION(3, 1) + #define wxDEPRECATED_DECL __attribute__((deprecated)) +#elif defined(__VISUALC__) && (__VISUALC__ >= 1300) + #define wxDEPRECATED_DECL __declspec(deprecated) +#else + #define wxDEPRECATED_DECL +#endif + +/* + Macro taking the deprecation message. It applies to the next declaration. + + If the compiler doesn't support showing the message, this degrades to a + simple wxDEPRECATED(), i.e. at least gives a warning, if possible. + */ +#if defined(__clang__) && defined(__has_extension) + #if __has_extension(attribute_deprecated_with_message) + #define wxDEPRECATED_MSG(msg) __attribute__((deprecated(msg))) + #else + #define wxDEPRECATED_MSG(msg) __attribute__((deprecated)) + #endif +#elif wxCHECK_GCC_VERSION(4, 5) + #define wxDEPRECATED_MSG(msg) __attribute__((deprecated(msg))) +#elif wxCHECK_VISUALC_VERSION(8) + #define wxDEPRECATED_MSG(msg) __declspec(deprecated("deprecated: " msg)) +#else + #define wxDEPRECATED_MSG(msg) wxDEPRECATED_DECL +#endif + +/* + Macro taking the declaration that it deprecates. Prefer to use + wxDEPRECATED_MSG() instead as it's simpler (wrapping the entire declaration + makes the code unclear) and allows to specify the explanation. + */ +#define wxDEPRECATED(x) wxDEPRECATED_DECL x + #if defined(__GNUC__) && !wxCHECK_GCC_VERSION(3, 4) /* We need to add dummy "inline" to allow gcc < 3.4 to handle the @@ -559,6 +641,27 @@ typedef short int WXTYPE; # define wxDEPRECATED_BUT_USED_INTERNALLY(x) wxDEPRECATED(x) #endif +/* + Macros to suppress and restore gcc warnings, requires g++ >= 4.6 and don't + do anything otherwise. + + Example of use: + + wxGCC_WARNING_SUPPRESS(float-equal) + inline bool wxIsSameDouble(double x, double y) { return x == y; } + wxGCC_WARNING_RESTORE(float-equal) + */ +#if wxCHECK_GCC_VERSION(4, 6) +# define wxGCC_WARNING_SUPPRESS(x) \ + _Pragma (wxSTRINGIZE(GCC diagnostic push)) \ + _Pragma (wxSTRINGIZE(GCC diagnostic ignored wxSTRINGIZE(wxCONCAT(-W,x)))) +# define wxGCC_WARNING_RESTORE(x) \ + _Pragma (wxSTRINGIZE(GCC diagnostic pop)) +#else /* gcc < 4.6 or not gcc at all */ +# define wxGCC_WARNING_SUPPRESS(x) +# define wxGCC_WARNING_RESTORE(x) +#endif + /* Combination of the two variants above: should be used for deprecated functions which are defined inline and are used by wxWidgets itself. @@ -577,14 +680,6 @@ typedef short int WXTYPE; #include #endif - -#if defined(__GNUC__) - #define WX_ATTRIBUTE_UNUSED __attribute__ ((unused)) -#else - #define WX_ATTRIBUTE_UNUSED -#endif - - #ifdef __cplusplus // everybody gets the assert and other debug macros @@ -657,9 +752,13 @@ typedef short int WXTYPE; m(==,x,y,z) m(!=,x,y,z) m(>=,x,y,z) m(<=,x,y,z) m(>,x,y,z) m(<,x,y,z) /* - This is only used with wxDEFINE_COMPARISON_REV: it passes both the normal - and the reversed comparison operators to the macro. + These are only used with wxDEFINE_COMPARISON_[BY_]REV: they pass both the + normal and the reversed comparison operators to the macro. */ +#define wxFOR_ALL_COMPARISONS_2_REV(m, x, y) \ + m(==,x,y,==) m(!=,x,y,!=) m(>=,x,y,<=) \ + m(<=,x,y,>=) m(>,x,y,<) m(<,x,y,>) + #define wxFOR_ALL_COMPARISONS_3_REV(m, x, y, z) \ m(==,x,y,z,==) m(!=,x,y,z,!=) m(>=,x,y,z,<=) \ m(<=,x,y,z,>=) m(>,x,y,z,<) m(<,x,y,z,>) @@ -671,6 +770,9 @@ typedef short int WXTYPE; #define wxDEFINE_COMPARISON_REV(op, T1, T2, cmp, oprev) \ inline bool operator op(T2 y, T1 x) { return cmp(x, y, oprev); } +#define wxDEFINE_COMPARISON_BY_REV(op, T1, T2, oprev) \ + inline bool operator op(T1 x, T2 y) { return y oprev x; } + /* Define all 6 comparison operators (==, !=, <, <=, >, >=) for the given types in the specified order. The implementation is provided by the cmp @@ -680,6 +782,14 @@ typedef short int WXTYPE; #define wxDEFINE_COMPARISONS(T1, T2, cmp) \ wxFOR_ALL_COMPARISONS_3(wxDEFINE_COMPARISON, T1, T2, cmp) +/* + Define all 6 comparison operators (==, !=, <, <=, >, >=) for the given + types in the specified order, implemented in terms of existing operators + for the reverse order. + */ +#define wxDEFINE_COMPARISONS_BY_REV(T1, T2) \ + wxFOR_ALL_COMPARISONS_2_REV(wxDEFINE_COMPARISON_BY_REV, T1, T2) + /* This macro allows to define all 12 comparison operators (6 operators for both orders of arguments) for the given types using the provided "cmp" @@ -748,13 +858,6 @@ typedef short int WXTYPE; /* compiler specific settings */ /* ---------------------------------------------------------------------------- */ -#if defined(__MWERKS__) - #undef try - #undef except - #undef finally - #define except(x) catch(...) -#endif /* Metrowerks */ - #if wxONLY_WATCOM_EARLIER_THAN(1,4) typedef short mode_t; #endif @@ -762,13 +865,10 @@ typedef short int WXTYPE; /* 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__ */ # ifdef wxUSE_DEBUG_NEW_ALWAYS # undef wxUSE_DEBUG_NEW_ALWAYS # define wxUSE_DEBUG_NEW_ALWAYS 0 # endif -# endif #endif /* ---------------------------------------------------------------------------- */ @@ -785,9 +885,7 @@ enum { wxDefaultCoord = -1 }; /* ---------------------------------------------------------------------------- */ #if defined(__MINGW32__) - #if !defined(__MWERKS__) #include - #endif #endif /* chars are always one byte (by definition), shorts are always two (in */ @@ -994,7 +1092,7 @@ typedef wxUint32 wxDword; architectures to be able to pass wxLongLong_t to the standard functions prototyped as taking "long long" such as strtoll(). */ -#if (defined(__VISUALC__) && defined(__WIN32__)) +#if (defined(__VISUALC__) || defined(__INTELC__)) && defined(__WIN32__) #define wxLongLong_t __int64 #define wxLongLongSuffix i64 #define wxLongLongFmtSpec "I64" @@ -1014,15 +1112,6 @@ typedef wxUint32 wxDword; #define wxLongLong_t long long #define wxLongLongSuffix ll #define wxLongLongFmtSpec "I64" -#elif defined(__MWERKS__) - #if __option(longlong) - #define wxLongLong_t long long - #define wxLongLongSuffix ll - #define wxLongLongFmtSpec "ll" - #else - #error "The 64 bit integer support in CodeWarrior has been disabled." - #error "See the documentation on the 'longlong' pragma." - #endif #elif defined(__VISAGECPP__) && __IBMCPP__ >= 400 #define wxLongLong_t long long #elif (defined(SIZEOF_LONG_LONG) && SIZEOF_LONG_LONG >= 8) || \ @@ -1084,6 +1173,17 @@ typedef wxUint32 wxDword; #endif +/* + Helper macro for conditionally compiling some code only if wxLongLong_t is + available and is a type different from the other integer types (i.e. not + long). + */ +#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG + #define wxIF_LONG_LONG_TYPE(x) x +#else + #define wxIF_LONG_LONG_TYPE(x) +#endif + /* Make sure ssize_t is defined (a signed type the same size as size_t). */ /* (HAVE_SSIZE_T is not already defined by configure) */ @@ -1216,11 +1316,7 @@ inline void *wxUIntToPtr(wxUIntPtr p) /* calculations */ typedef float wxFloat32; -#if (defined( __WXMAC__ ) || defined(__WXCOCOA__)) && defined (__MWERKS__) - typedef short double wxFloat64; -#else - typedef double wxFloat64; -#endif +typedef double wxFloat64; typedef double wxDouble; @@ -1280,6 +1376,63 @@ typedef double wxDouble; #endif +/* + Helper macro expanding into the given "m" macro invoked with each of the + integer types as parameter (notice that this does not include char/unsigned + char and bool but does include wchar_t). + */ +#define wxDO_FOR_INT_TYPES(m) \ + m(short) \ + m(unsigned short) \ + m(int) \ + m(unsigned int) \ + m(long) \ + m(unsigned long) \ + wxIF_LONG_LONG_TYPE( m(wxLongLong_t) ) \ + wxIF_LONG_LONG_TYPE( m(wxULongLong_t) ) \ + wxIF_WCHAR_T_TYPE( m(wchar_t) ) + +/* + Same as wxDO_FOR_INT_TYPES() but does include char and unsigned char. + + Notice that we use "char" and "unsigned char" here but not "signed char" + which would be more correct as "char" could be unsigned by default. But + wxWidgets code currently supposes that char is signed and we'd need to + clean up assumptions about it, notably in wx/unichar.h, to be able to use + "signed char" here. + */ +#define wxDO_FOR_CHAR_INT_TYPES(m) \ + m(char) \ + m(unsigned char) \ + wxDO_FOR_INT_TYPES(m) + +/* + Same as wxDO_FOR_INT_TYPES() above except that m macro takes the + type as the first argument and some extra argument, passed from this macro + itself, as the second one. + */ +#define wxDO_FOR_INT_TYPES_1(m, arg) \ + m(short, arg) \ + m(unsigned short, arg) \ + m(int, arg) \ + m(unsigned int, arg) \ + m(long, arg) \ + m(unsigned long, arg) \ + wxIF_LONG_LONG_TYPE( m(wxLongLong_t, arg) ) \ + wxIF_LONG_LONG_TYPE( m(wxULongLong_t, arg) ) \ + wxIF_WCHAR_T_TYPE( m(wchar_t, arg) ) + +/* + Combination of wxDO_FOR_CHAR_INT_TYPES() and wxDO_FOR_INT_TYPES_1(): + invokes the given macro with the specified argument as its second parameter + for all char and int types. + */ +#define wxDO_FOR_CHAR_INT_TYPES_1(m, arg) \ + m(char, arg) \ + m(unsigned char, arg) \ + wxDO_FOR_INT_TYPES_1(m, arg) + + /* ---------------------------------------------------------------------------- */ /* byte ordering related definition and macros */ /* ---------------------------------------------------------------------------- */ @@ -1298,36 +1451,6 @@ typedef double wxDouble; /* byte swapping */ -#if defined (__MWERKS__) && ( (__MWERKS__ < 0x0900) || macintosh ) -/* assembler versions for these */ -#ifdef __POWERPC__ - inline wxUint16 wxUINT16_SWAP_ALWAYS( wxUint16 i ) - {return (__lhbrx( &i , 0 ) );} - inline wxInt16 wxINT16_SWAP_ALWAYS( wxInt16 i ) - {return (__lhbrx( &i , 0 ) );} - inline wxUint32 wxUINT32_SWAP_ALWAYS( wxUint32 i ) - {return (__lwbrx( &i , 0 ) );} - inline wxInt32 wxINT32_SWAP_ALWAYS( wxInt32 i ) - {return (__lwbrx( &i , 0 ) );} -#else - #pragma parameter __D0 wxUINT16_SWAP_ALWAYS(__D0) - pascal wxUint16 wxUINT16_SWAP_ALWAYS(wxUint16 value) - = { 0xE158 }; - - #pragma parameter __D0 wxINT16_SWAP_ALWAYS(__D0) - pascal wxInt16 wxINT16_SWAP_ALWAYS(wxInt16 value) - = { 0xE158 }; - - #pragma parameter __D0 wxUINT32_SWAP_ALWAYS (__D0) - pascal wxUint32 wxUINT32_SWAP_ALWAYS(wxUint32 value) - = { 0xE158, 0x4840, 0xE158 }; - - #pragma parameter __D0 wxINT32_SWAP_ALWAYS (__D0) - pascal wxInt32 wxINT32_SWAP_ALWAYS(wxInt32 value) - = { 0xE158, 0x4840, 0xE158 }; - -#endif -#else /* !MWERKS */ #define wxUINT16_SWAP_ALWAYS(val) \ ((wxUint16) ( \ (((wxUint16) (val) & (wxUint16) 0x00ffU) << 8) | \ @@ -1351,7 +1474,6 @@ typedef double wxDouble; (((wxUint32) (val) & (wxUint32) 0x0000ff00U) << 8) | \ (((wxUint32) (val) & (wxUint32) 0x00ff0000U) >> 8) | \ (((wxUint32) (val) & (wxUint32) 0xff000000U) >> 24))) -#endif /* machine specific byte swapping */ #ifdef wxLongLong_t @@ -1928,9 +2050,10 @@ enum wxBorder #define wxMORE 0x00010000 #define wxSETUP 0x00020000 #define wxICON_NONE 0x00040000 +#define wxICON_AUTH_NEEDED 0x00080000 #define wxICON_MASK \ - (wxICON_EXCLAMATION|wxICON_HAND|wxICON_QUESTION|wxICON_INFORMATION|wxICON_NONE) + (wxICON_EXCLAMATION|wxICON_HAND|wxICON_QUESTION|wxICON_INFORMATION|wxICON_NONE|wxICON_AUTH_NEEDED) /* * Background styles. See wxWindow::SetBackgroundStyle @@ -2267,6 +2390,28 @@ enum wxHitTest /* GDI descriptions */ /* ---------------------------------------------------------------------------- */ +// Hatch styles used by both pen and brush styles. +// +// NB: Do not use these constants directly, they're for internal use only, use +// wxBRUSHSTYLE_XXX_HATCH and wxPENSTYLE_XXX_HATCH instead. +enum wxHatchStyle +{ + wxHATCHSTYLE_INVALID = -1, + + /* + The value of the first style is chosen to fit with + wxDeprecatedGUIConstants values below, don't change it. + */ + wxHATCHSTYLE_FIRST = 111, + wxHATCHSTYLE_BDIAGONAL = wxHATCHSTYLE_FIRST, + wxHATCHSTYLE_CROSSDIAG, + wxHATCHSTYLE_FDIAGONAL, + wxHATCHSTYLE_CROSS, + wxHATCHSTYLE_HORIZONTAL, + wxHATCHSTYLE_VERTICAL, + wxHATCHSTYLE_LAST = wxHATCHSTYLE_VERTICAL +}; + /* WARNING: the following styles are deprecated; use the wxFontFamily, wxFontStyle, wxFontWeight, wxBrushStyle, @@ -2315,14 +2460,14 @@ enum wxDeprecatedGUIConstants /* drawn with a Pen, and without any Brush -- and it can be stippled. */ wxSTIPPLE = 110, - wxBDIAGONAL_HATCH, /* In wxWidgets < 2.6 use WX_HATCH macro */ - wxCROSSDIAG_HATCH, /* to verify these wx*_HATCH are in style */ - wxFDIAGONAL_HATCH, /* of wxBrush. In wxWidgets >= 2.6 use */ - wxCROSS_HATCH, /* wxBrush::IsHatch() instead. */ - wxHORIZONTAL_HATCH, - wxVERTICAL_HATCH, - wxFIRST_HATCH = wxBDIAGONAL_HATCH, - wxLAST_HATCH = wxVERTICAL_HATCH + wxBDIAGONAL_HATCH = wxHATCHSTYLE_BDIAGONAL, + wxCROSSDIAG_HATCH = wxHATCHSTYLE_CROSSDIAG, + wxFDIAGONAL_HATCH = wxHATCHSTYLE_FDIAGONAL, + wxCROSS_HATCH = wxHATCHSTYLE_CROSS, + wxHORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL, + wxVERTICAL_HATCH = wxHATCHSTYLE_VERTICAL, + wxFIRST_HATCH = wxHATCHSTYLE_FIRST, + wxLAST_HATCH = wxHATCHSTYLE_LAST }; #endif @@ -2793,10 +2938,15 @@ typedef int (* LINKAGEMODE wxListIterateFunction)(void *current); /* --------------------------------------------------------------------------- */ /* macros that enable wxWidgets apps to be compiled in absence of the */ -/* sytem headers, although some platform specific types are used in the */ +/* system headers, although some platform specific types are used in the */ /* platform specific (implementation) parts of the headers */ /* --------------------------------------------------------------------------- */ +#ifdef __DARWIN__ +#define DECLARE_WXOSX_OPAQUE_CFREF( name ) typedef struct __##name* name##Ref; +#define DECLARE_WXOSX_OPAQUE_CONST_CFREF( name ) typedef const struct __##name* name##Ref; +#endif + #ifdef __WXMAC__ #define WX_OPAQUE_TYPE( name ) struct wxOpaque##name @@ -2833,9 +2983,6 @@ typedef const void * CFTypeRef; /* typedef const struct __CFString * CFStringRef; */ -#define DECLARE_WXOSX_OPAQUE_CFREF( name ) typedef struct __##name* name##Ref; -#define DECLARE_WXOSX_OPAQUE_CONST_CFREF( name ) typedef const struct __##name* name##Ref; - DECLARE_WXOSX_OPAQUE_CONST_CFREF( CFString ) typedef struct __CFString * CFMutableStringRef; @@ -2908,7 +3055,7 @@ typedef unsigned int NSUInteger; */ /* NOTE: This ought to work with other compilers too, but I'm being cautious */ -#if (defined(__GNUC__) && defined(__APPLE__)) || defined(__MWERKS__) +#if (defined(__GNUC__) && defined(__APPLE__)) /* It's desirable to have type safety for Objective-C(++) code as it does at least catch typos of method names among other things. However, it is not possible to declare an Objective-C class from plain old C or C++ @@ -2928,7 +3075,7 @@ typedef klass *WX_##klass typedef struct klass *WX_##klass #endif /* defined(__OBJC__) */ -#else /* not Apple's GNU or CodeWarrior */ +#else /* not Apple's gcc */ #warning "Objective-C types will not be checked by the compiler." /* NOTE: typedef struct objc_object *id; */ /* IOW, we're declaring these using the id type without using that name, */ @@ -2938,7 +3085,7 @@ typedef struct klass *WX_##klass #define DECLARE_WXCOCOA_OBJC_CLASS(klass) \ typedef struct objc_object *WX_##klass -#endif /* (defined(__GNUC__) && defined(__APPLE__)) || defined(__MWERKS__) */ +#endif /* (defined(__GNUC__) && defined(__APPLE__)) */ DECLARE_WXCOCOA_OBJC_CLASS(NSApplication); DECLARE_WXCOCOA_OBJC_CLASS(NSBitmapImageRep); @@ -2961,6 +3108,7 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSMutableArray); DECLARE_WXCOCOA_OBJC_CLASS(NSNotification); DECLARE_WXCOCOA_OBJC_CLASS(NSObject); DECLARE_WXCOCOA_OBJC_CLASS(NSPanel); +DECLARE_WXCOCOA_OBJC_CLASS(NSResponder); DECLARE_WXCOCOA_OBJC_CLASS(NSScrollView); DECLARE_WXCOCOA_OBJC_CLASS(NSSound); DECLARE_WXCOCOA_OBJC_CLASS(NSStatusItem); @@ -3058,7 +3206,9 @@ typedef void * WXDRAWITEMSTRUCT; typedef void * WXMEASUREITEMSTRUCT; typedef void * WXLPCREATESTRUCT; +#ifdef __WXMSW__ typedef WXHWND WXWidget; +#endif #ifdef __WIN64__ typedef unsigned __int64 WXWPARAM; @@ -3231,14 +3381,14 @@ typedef struct _GdkDragContext GdkDragContext; typedef unsigned long GdkAtom; #endif -#if !defined(__WXGTK30__) +#if !defined(__WXGTK3__) typedef struct _GdkColormap GdkColormap; typedef struct _GdkFont GdkFont; typedef struct _GdkGC GdkGC; typedef struct _GdkRegion GdkRegion; #endif -#if defined(__WXGTK30__) +#if defined(__WXGTK3__) typedef struct _GdkWindow GdkWindow; #elif defined(__WXGTK20__) typedef struct _GdkDrawable GdkWindow; @@ -3294,9 +3444,9 @@ typedef const void* WXWidget; /* included before or after wxWidgets classes, and therefore must be */ /* disabled here before any significant wxWidgets headers are included. */ #ifdef __cplusplus -#ifdef __WXMSW__ +#ifdef __WINDOWS__ #include "wx/msw/winundef.h" -#endif /* __WXMSW__ */ +#endif /* __WINDOWS__ */ #endif /* __cplusplus */ @@ -3338,7 +3488,8 @@ typedef const void* WXWidget; /* If a manifest is being automatically generated, add common controls 6 to it */ /* --------------------------------------------------------------------------- */ -#if (!defined wxUSE_NO_MANIFEST || wxUSE_NO_MANIFEST == 0 ) && \ +#if wxUSE_GUI && \ + (!defined wxUSE_NO_MANIFEST || wxUSE_NO_MANIFEST == 0 ) && \ ( defined _MSC_FULL_VER && _MSC_FULL_VER >= 140040130 ) #define WX_CC_MANIFEST(cpu) \ @@ -3361,5 +3512,13 @@ typedef const void* WXWidget; #endif /* !wxUSE_NO_MANIFEST && _MSC_FULL_VER >= 140040130 */ +/* wxThread and wxProcess priorities */ +enum +{ + wxPRIORITY_MIN = 0u, /* lowest possible priority */ + wxPRIORITY_DEFAULT = 50u, /* normal priority */ + wxPRIORITY_MAX = 100u /* highest possible priority */ +}; + #endif /* _WX_DEFS_H_ */ diff --git a/Externals/wxWidgets3/include/wx/dialog.h b/Externals/wxWidgets3/include/wx/dialog.h index 3ce0c53ccc..e32cabb018 100644 --- a/Externals/wxWidgets3/include/wx/dialog.h +++ b/Externals/wxWidgets3/include/wx/dialog.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29.06.99 -// RCS-ID: $Id: dialog.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,8 +11,8 @@ #ifndef _WX_DIALOG_H_BASE_ #define _WX_DIALOG_H_BASE_ -#include "wx/defs.h" #include "wx/toplevel.h" +#include "wx/containr.h" class WXDLLIMPEXP_FWD_CORE wxSizer; class WXDLLIMPEXP_FWD_CORE wxStdDialogButtonSizer; @@ -65,10 +64,10 @@ enum wxDialogModality extern WXDLLIMPEXP_DATA_CORE(const char) wxDialogNameStr[]; -class WXDLLIMPEXP_CORE wxDialogBase : public wxTopLevelWindow +class WXDLLIMPEXP_CORE wxDialogBase : public wxNavigationEnabled { public: - wxDialogBase() { Init(); } + wxDialogBase(); virtual ~wxDialogBase() { } // define public wxDialog methods to be implemented by the derived classes @@ -80,6 +79,11 @@ public: virtual void ShowWindowModal () ; virtual void SendWindowModalDialogEvent ( wxEventType type ); +#ifdef wxHAS_EVENT_BIND + template + void ShowWindowModalThenDo(const Functor& onEndModal); +#endif // wxHAS_EVENT_BIND + // Modal dialogs have a return code - usually the id of the last // pressed button void SetReturnCode(int returnCode) { m_returnCode = returnCode; } @@ -242,9 +246,6 @@ protected: static bool sm_layoutAdaptation; private: - // common part of all ctors - void Init(); - // helper of GetParentForModalDialog(): returns the passed in window if it // can be used as our parent or NULL if it can't wxWindow *CheckIfCanBeUsedAsParent(wxWindow *parent) const; @@ -395,5 +396,40 @@ typedef void (wxEvtHandler::*wxWindowModalDialogEventFunction)(wxWindowModalDial #define EVT_WINDOW_MODAL_DIALOG_CLOSED(winid, func) \ wx__DECLARE_EVT1(wxEVT_WINDOW_MODAL_DIALOG_CLOSED, winid, wxWindowModalDialogEventHandler(func)) +#ifdef wxHAS_EVENT_BIND +template +class wxWindowModalDialogEventFunctor +{ +public: + wxWindowModalDialogEventFunctor(const Functor& f) + : m_f(f), m_wasCalled(false) + {} + + void operator()(wxWindowModalDialogEvent& event) + { + if ( m_wasCalled ) + { + event.Skip(); + return; + } + + m_wasCalled = true; + m_f(event.GetReturnCode()); + } + +private: + Functor m_f; + bool m_wasCalled; +}; + +template +void wxDialogBase::ShowWindowModalThenDo(const Functor& onEndModal) +{ + Bind(wxEVT_WINDOW_MODAL_DIALOG_CLOSED, + wxWindowModalDialogEventFunctor(onEndModal)); + ShowWindowModal(); +}; +#endif // wxHAS_EVENT_BIND + #endif // _WX_DIALOG_H_BASE_ diff --git a/Externals/wxWidgets3/include/wx/dialup.h b/Externals/wxWidgets3/include/wx/dialup.h index ba591ebe71..7688d4a1f8 100644 --- a/Externals/wxWidgets3/include/wx/dialup.h +++ b/Externals/wxWidgets3/include/wx/dialup.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 07.07.99 -// RCS-ID: $Id: dialup.h 67384 2011-04-03 20:31:32Z DS $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dir.h b/Externals/wxWidgets3/include/wx/dir.h index a4ad56ce18..f23862e0a9 100644 --- a/Externals/wxWidgets3/include/wx/dir.h +++ b/Externals/wxWidgets3/include/wx/dir.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 08.12.99 -// RCS-ID: $Id: dir.h 65680 2010-09-30 11:44:45Z VZ $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -22,14 +21,17 @@ class WXDLLIMPEXP_FWD_BASE wxArrayString; // constants // ---------------------------------------------------------------------------- -// these flags define what kind of filenames is included in the list of files -// enumerated by GetFirst/GetNext +// These flags affect the behaviour of GetFirst/GetNext() and Traverse(). +// They define what types are included in the list of items they produce. +// Note that wxDIR_NO_FOLLOW is relevant only on Unix and ignored under systems +// not supporting symbolic links. enum wxDirFlags { wxDIR_FILES = 0x0001, // include files wxDIR_DIRS = 0x0002, // include directories wxDIR_HIDDEN = 0x0004, // include hidden files wxDIR_DOTDOT = 0x0008, // include '.' and '..' + wxDIR_NO_FOLLOW = 0x0010, // don't dereference any symlink // by default, enumerate everything except '.' and '..' wxDIR_DEFAULT = wxDIR_FILES | wxDIR_DIRS | wxDIR_HIDDEN @@ -94,18 +96,25 @@ public: // opens the directory for enumeration, use IsOpened() to test success wxDir(const wxString& dir); - // dtor cleans up the associated resources - ~wxDir(); + // dtor calls Close() automatically + ~wxDir() { Close(); } // open the directory for enumerating bool Open(const wxString& dir); + // close the directory, Open() can be called again later + void Close(); + // returns true if the directory was successfully opened bool IsOpened() const; // get the full name of the directory (without '/' at the end) wxString GetName() const; + // Same as GetName() but does include the trailing separator, unless the + // string is empty (only for invalid directories). + wxString GetNameWithSep() const; + // file enumeration routines // ------------------------- diff --git a/Externals/wxWidgets3/include/wx/dirctrl.h b/Externals/wxWidgets3/include/wx/dirctrl.h index 704f8bb768..1d9d1ba186 100644 --- a/Externals/wxWidgets3/include/wx/dirctrl.h +++ b/Externals/wxWidgets3/include/wx/dirctrl.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: dirctrl.h 33948 2005-05-04 18:57:50Z JS $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dirdlg.h b/Externals/wxWidgets3/include/wx/dirdlg.h index 16f7beef5d..b7b7474ab5 100644 --- a/Externals/wxWidgets3/include/wx/dirdlg.h +++ b/Externals/wxWidgets3/include/wx/dirdlg.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Robert Roebling -// RCS-ID: $Id: dirdlg.h 70353 2012-01-15 14:46:41Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/display.h b/Externals/wxWidgets3/include/wx/display.h index c04e8b55b3..4678672138 100644 --- a/Externals/wxWidgets3/include/wx/display.h +++ b/Externals/wxWidgets3/include/wx/display.h @@ -3,7 +3,6 @@ // Purpose: wxDisplay class // Author: Royce Mitchell III, Vadim Zeitlin // Created: 06/21/02 -// RCS-ID: $Id: display.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2002-2006 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/display_impl.h b/Externals/wxWidgets3/include/wx/display_impl.h index e228214779..b6674ebfad 100644 --- a/Externals/wxWidgets3/include/wx/display_impl.h +++ b/Externals/wxWidgets3/include/wx/display_impl.h @@ -3,7 +3,6 @@ // Purpose: wxDisplayImpl class declaration // Author: Vadim Zeitlin // Created: 2006-03-15 -// RCS-ID: $Id: display_impl.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2002-2006 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dlimpexp.h b/Externals/wxWidgets3/include/wx/dlimpexp.h index 1042938b40..800b745fa6 100644 --- a/Externals/wxWidgets3/include/wx/dlimpexp.h +++ b/Externals/wxWidgets3/include/wx/dlimpexp.h @@ -4,7 +4,6 @@ * Author: Vadim Zeitlin * Modified by: * Created: 16.10.2003 (extracted from wx/defs.h) - * RCS-ID: $Id: dlimpexp.h 69049 2011-09-10 18:09:12Z SJL $ * Copyright: (c) 2003 Vadim Zeitlin * Licence: wxWindows licence */ @@ -57,11 +56,6 @@ # define WXEXPORT _Export # define WXIMPORT _Export # endif -#elif defined(__WXMAC__) || defined(__WXCOCOA__) -# ifdef __MWERKS__ -# define WXEXPORT __declspec(export) -# define WXIMPORT __declspec(import) -# endif #elif defined(__CYGWIN__) # define WXEXPORT __declspec(dllexport) # define WXIMPORT __declspec(dllimport) @@ -97,8 +91,8 @@ # define WXMAKINGDLL_XML # define WXMAKINGDLL_XRC # define WXMAKINGDLL_AUI -# define WXMAKINGDLL_RIBBON # define WXMAKINGDLL_PROPGRID +# define WXMAKINGDLL_RIBBON # define WXMAKINGDLL_RICHTEXT # define WXMAKINGDLL_MEDIA # define WXMAKINGDLL_STC @@ -229,14 +223,6 @@ # define WXDLLIMPEXP_AUI #endif -#ifdef WXMAKINGDLL_RIBBON -# define WXDLLIMPEXP_RIBBON WXEXPORT -#elif defined(WXUSINGDLL) -# define WXDLLIMPEXP_RIBBON WXIMPORT -#else /* not making nor using DLL */ -# define WXDLLIMPEXP_RIBBON -#endif - #ifdef WXMAKINGDLL_PROPGRID # define WXDLLIMPEXP_PROPGRID WXEXPORT # define WXDLLIMPEXP_DATA_PROPGRID(type) WXEXPORT type @@ -248,6 +234,14 @@ # define WXDLLIMPEXP_DATA_PROPGRID(type) type #endif +#ifdef WXMAKINGDLL_RIBBON +# define WXDLLIMPEXP_RIBBON WXEXPORT +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_RIBBON WXIMPORT +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_RIBBON +#endif + #ifdef WXMAKINGDLL_RICHTEXT # define WXDLLIMPEXP_RICHTEXT WXEXPORT #elif defined(WXUSINGDLL) @@ -304,6 +298,7 @@ #define WXDLLIMPEXP_FWD_XRC #define WXDLLIMPEXP_FWD_AUI #define WXDLLIMPEXP_FWD_PROPGRID + #define WXDLLIMPEXP_FWD_RIBBON #define WXDLLIMPEXP_FWD_RICHTEXT #define WXDLLIMPEXP_FWD_MEDIA #define WXDLLIMPEXP_FWD_STC @@ -320,6 +315,7 @@ #define WXDLLIMPEXP_FWD_XRC WXDLLIMPEXP_XRC #define WXDLLIMPEXP_FWD_AUI WXDLLIMPEXP_AUI #define WXDLLIMPEXP_FWD_PROPGRID WXDLLIMPEXP_PROPGRID + #define WXDLLIMPEXP_FWD_RIBBON WXDLLIMPEXP_RIBBON #define WXDLLIMPEXP_FWD_RICHTEXT WXDLLIMPEXP_RICHTEXT #define WXDLLIMPEXP_FWD_MEDIA WXDLLIMPEXP_MEDIA #define WXDLLIMPEXP_FWD_STC WXDLLIMPEXP_STC diff --git a/Externals/wxWidgets3/include/wx/dnd.h b/Externals/wxWidgets3/include/wx/dnd.h index 7b832d109c..9d9f2e25ca 100644 --- a/Externals/wxWidgets3/include/wx/dnd.h +++ b/Externals/wxWidgets3/include/wx/dnd.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin, Robert Roebling // Modified by: // Created: 26.05.99 -// RCS-ID: $Id: dnd.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) wxWidgets Team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -66,7 +65,7 @@ public: { m_data = NULL; } virtual ~wxDropSourceBase() { } - // set the data which is transfered by drag and drop + // set the data which is transferred by drag and drop void SetData(wxDataObject& data) { m_data = &data; } diff --git a/Externals/wxWidgets3/include/wx/docmdi.h b/Externals/wxWidgets3/include/wx/docmdi.h index a24492492a..e7dcb7ad02 100644 --- a/Externals/wxWidgets3/include/wx/docmdi.h +++ b/Externals/wxWidgets3/include/wx/docmdi.h @@ -3,7 +3,6 @@ // Purpose: Frame classes for MDI document/view applications // Author: Julian Smart // Created: 01/02/97 -// RCS-ID: $Id: docmdi.h 64295 2010-05-12 14:34:18Z VZ $ // Copyright: (c) 1997 Julian Smart // (c) 2010 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/docview.h b/Externals/wxWidgets3/include/wx/docview.h index e15414e65f..44fbe90639 100644 --- a/Externals/wxWidgets3/include/wx/docview.h +++ b/Externals/wxWidgets3/include/wx/docview.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: docview.h 70098 2011-12-23 05:59:59Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -21,6 +20,7 @@ #include "wx/string.h" #include "wx/frame.h" #include "wx/filehistory.h" +#include "wx/vector.h" #if wxUSE_PRINTING_ARCHITECTURE #include "wx/print.h" @@ -60,6 +60,10 @@ enum #define wxMAX_FILE_HISTORY 9 +typedef wxVector wxDocVector; +typedef wxVector wxViewVector; +typedef wxVector wxDocTemplateVector; + class WXDLLIMPEXP_CORE wxDocument : public wxEvtHandler { public: @@ -81,6 +85,9 @@ public: bool GetDocumentSaved() const { return m_savedYet; } void SetDocumentSaved(bool saved = true) { m_savedYet = saved; } + // activate the first view of the document if any + void Activate(); + // return true if the document hasn't been modified since the last time it // was saved (implying that it returns false if it was never saved, even if // the document is not modified) @@ -140,8 +147,14 @@ public: virtual bool AddView(wxView *view); virtual bool RemoveView(wxView *view); + +#ifndef __VISUALC6__ + wxViewVector GetViewsVector() const; +#endif // !__VISUALC6__ + wxList& GetViews() { return m_documentViews; } const wxList& GetViews() const { return m_documentViews; } + wxView *GetFirstView() const; virtual void UpdateAllViews(wxView *sender = NULL, wxObject *hint = NULL); @@ -432,6 +445,9 @@ public: // Find template from document class info, may return NULL. wxDocTemplate* FindTemplate(const wxClassInfo* documentClassInfo); + // Find document from file name, may return NULL. + wxDocument* FindDocumentByPath(const wxString& path) const; + wxDocument *GetCurrentDocument() const; void SetMaxDocsOpen(int n) { m_maxDocsOpen = n; } @@ -455,6 +471,17 @@ public: virtual void ActivateView(wxView *view, bool activate = true); virtual wxView *GetCurrentView() const { return m_currentView; } + // This method tries to find an active view harder than GetCurrentView(): + // if the latter is NULL, it also checks if we don't have just a single + // view and returns it then. + wxView *GetAnyUsableView() const; + + +#ifndef __VISUALC6__ + wxDocVector GetDocumentsVector() const; + wxDocTemplateVector GetTemplatesVector() const; +#endif // !__VISUALC6__ + wxList& GetDocuments() { return m_docs; } wxList& GetTemplates() { return m_templates; } @@ -529,15 +556,6 @@ protected: // return the command processor for the current document, if any wxCommandProcessor *GetCurrentCommandProcessor() const; - // this method tries to find an active view harder than GetCurrentView(): - // if the latter is NULL, it also checks if we don't have just a single - // view and returns it then - wxView *GetActiveView() const; - - // activate the first view of the given document if any - void ActivateDocument(wxDocument *doc); - - int m_defaultDocumentNameCounter; int m_maxDocsOpen; wxList m_docs; @@ -624,10 +642,7 @@ protected: // we're not a wxEvtHandler but we provide this wxEvtHandler-like function // which is called from TryBefore() of the derived classes to give our view // a chance to process the message before the frame event handlers are used - bool TryProcessEvent(wxEvent& event) - { - return m_childView && m_childView->ProcessEventLocally(event); - } + bool TryProcessEvent(wxEvent& event); // called from EVT_CLOSE handler in the frame: check if we can close and do // cleanup if so; veto the event otherwise @@ -811,11 +826,22 @@ private: class WXDLLIMPEXP_CORE wxDocParentFrameAnyBase { public: - wxDocParentFrameAnyBase() { m_docManager = NULL; } + wxDocParentFrameAnyBase(wxWindow* frame) + : m_frame(frame) + { + m_docManager = NULL; + } wxDocManager *GetDocumentManager() const { return m_docManager; } protected: + // This is similar to wxDocChildFrameAnyBase method with the same name: + // while we're not an event handler ourselves and so can't override + // TryBefore(), we provide a helper that the derived template class can use + // from its TryBefore() implementation. + bool TryProcessEvent(wxEvent& event); + + wxWindow* const m_frame; wxDocManager *m_docManager; wxDECLARE_NO_COPY_CLASS(wxDocParentFrameAnyBase); @@ -828,7 +854,7 @@ class WXDLLIMPEXP_CORE wxDocParentFrameAny : public BaseFrame, public wxDocParentFrameAnyBase { public: - wxDocParentFrameAny() { } + wxDocParentFrameAny() : wxDocParentFrameAnyBase(this) { } wxDocParentFrameAny(wxDocManager *manager, wxFrame *frame, wxWindowID id, @@ -837,6 +863,7 @@ public: const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr) + : wxDocParentFrameAnyBase(this) { Create(manager, frame, id, title, pos, size, style, name); } @@ -855,7 +882,7 @@ public: if ( !BaseFrame::Create(frame, id, title, pos, size, style, name) ) return false; - this->Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, + this->Connect(wxID_EXIT, wxEVT_MENU, wxCommandEventHandler(wxDocParentFrameAny::OnExit)); this->Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(wxDocParentFrameAny::OnCloseWindow)); @@ -867,10 +894,7 @@ protected: // hook the document manager into event handling chain here virtual bool TryBefore(wxEvent& event) { - if ( m_docManager && m_docManager->ProcessEventLocally(event) ) - return true; - - return BaseFrame::TryBefore(event); + return TryProcessEvent(event) || BaseFrame::TryBefore(event); } private: @@ -995,6 +1019,23 @@ enum }; #endif // WXWIN_COMPATIBILITY_2_8 +#ifndef __VISUALC6__ +inline wxViewVector wxDocument::GetViewsVector() const +{ + return m_documentViews.AsVector(); +} + +inline wxDocVector wxDocManager::GetDocumentsVector() const +{ + return m_docs.AsVector(); +} + +inline wxDocTemplateVector wxDocManager::GetTemplatesVector() const +{ + return m_templates.AsVector(); +} +#endif // !__VISUALC6__ + #endif // wxUSE_DOC_VIEW_ARCHITECTURE #endif // _WX_DOCH__ diff --git a/Externals/wxWidgets3/include/wx/dragimag.h b/Externals/wxWidgets3/include/wx/dragimag.h index 3f04a404ab..4143ca8898 100644 --- a/Externals/wxWidgets3/include/wx/dragimag.h +++ b/Externals/wxWidgets3/include/wx/dragimag.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: dragimag.h 47254 2007-07-09 10:09:52Z VS $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/dvrenderers.h b/Externals/wxWidgets3/include/wx/dvrenderers.h index 7c372739b8..3f623cf6a6 100644 --- a/Externals/wxWidgets3/include/wx/dvrenderers.h +++ b/Externals/wxWidgets3/include/wx/dvrenderers.h @@ -3,7 +3,6 @@ // Purpose: Declare all wxDataViewCtrl classes // Author: Robert Roebling, Vadim Zeitlin // Created: 2009-11-08 (extracted from wx/dataview.h) -// RCS-ID: $Id: dvrenderers.h 70050 2011-12-19 12:54:38Z VZ $ // Copyright: (c) 2006 Robert Roebling // (c) 2009 Vadim Zeitlin // Licence: wxWindows licence @@ -168,6 +167,15 @@ protected: // Called from {Cancel,Finish}Editing() to cleanup m_editorCtrl void DestroyEditControl(); + // Return the alignment of this renderer if it's specified (i.e. has value + // different from the default wxDVR_DEFAULT_ALIGNMENT) or the alignment of + // the column it is used for otherwise. + // + // Unlike GetAlignment(), this always returns a valid combination of + // wxALIGN_XXX flags (although possibly wxALIGN_NOT) and never returns + // wxDVR_DEFAULT_ALIGNMENT. + int GetEffectiveAlignment() const; + wxString m_variantType; wxDataViewColumn *m_owner; wxWeakRef m_editorCtrl; diff --git a/Externals/wxWidgets3/include/wx/dynarray.h b/Externals/wxWidgets3/include/wx/dynarray.h index 09237e0a77..6495030f0c 100644 --- a/Externals/wxWidgets3/include/wx/dynarray.h +++ b/Externals/wxWidgets3/include/wx/dynarray.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 12.09.97 -// RCS-ID: $Id: dynarray.h 69688 2011-11-05 15:20:32Z VS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -128,6 +127,8 @@ public: \ name() : std::vector() { } \ name(size_type n) : std::vector(n) { } \ name(size_type n, const_reference v) : std::vector(n, v) { } \ + template \ + name(InputIterator first, InputIterator last) : std::vector(first, last) { } \ \ void Empty() { clear(); } \ void Clear() { clear(); } \ @@ -249,7 +250,7 @@ protected: \ typedef const value_type* const_iterator; \ typedef value_type& reference; \ typedef const value_type& const_reference; \ - typedef int difference_type; \ + typedef ptrdiff_t difference_type; \ typedef size_t size_type; \ \ void assign(const_iterator first, const_iterator last); \ @@ -274,8 +275,13 @@ protected: \ void pop_back() { RemoveAt(size() - 1); } \ void push_back(const value_type& v) { Add(v); } \ void reserve(size_type n) { Alloc(n); } \ - void resize(size_type n, value_type v = value_type()) \ - { SetCount(n, v); } \ + void resize(size_type count, value_type defval = value_type()) \ + { \ + if ( count < m_nCount ) \ + m_nCount = count; \ + else \ + SetCount(count, defval); \ + } \ \ iterator begin() { return m_pItems; } \ iterator end() { return m_pItems + m_nCount; } \ diff --git a/Externals/wxWidgets3/include/wx/dynlib.h b/Externals/wxWidgets3/include/wx/dynlib.h index 4e4e411dbc..5487ccc949 100644 --- a/Externals/wxWidgets3/include/wx/dynlib.h +++ b/Externals/wxWidgets3/include/wx/dynlib.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux, Vadim Zeitlin, Vaclav Slavik // Modified by: // Created: 20/07/98 -// RCS-ID: $Id: dynlib.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1998 Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -232,7 +231,7 @@ public: static wxDllType GetProgramHandle(); // return the platform standard DLL extension (with leading dot) - static const wxString& GetDllExt() { return ms_dllext; } + static wxString GetDllExt(wxDynamicLibraryCategory cat = wxDL_LIBRARY); wxDynamicLibrary() : m_handle(0) { } wxDynamicLibrary(const wxString& libname, int flags = wxDL_DEFAULT) @@ -359,7 +358,7 @@ public: // the returned handle reference count is not incremented so it doesn't // need to be freed using FreeLibrary() but it also means that it can // become invalid if the DLL is unloaded - static WXHMODULE MSWGetModuleHandle(const char *name, void *addr); + static WXHMODULE MSWGetModuleHandle(const wxString& name, void *addr); #endif // __WINDOWS__ protected: @@ -372,9 +371,6 @@ protected: #endif // wxHAVE_DYNLIB_ERROR - // platform specific shared lib suffix. - static const wxString ms_dllext; - // the handle to DLL or NULL wxDllType m_handle; diff --git a/Externals/wxWidgets3/include/wx/dynload.h b/Externals/wxWidgets3/include/wx/dynload.h index 29575b5b08..7cb4d25bac 100644 --- a/Externals/wxWidgets3/include/wx/dynload.h +++ b/Externals/wxWidgets3/include/wx/dynload.h @@ -5,7 +5,6 @@ // (derived in part from dynlib.cpp (c) 1998 Guilhem Lavaux) // Modified by: // Created: 03/12/01 -// RCS-ID: $Id: dynload.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2001 Ron Lee // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -82,8 +81,11 @@ public: private: - const wxClassInfo *m_before; // sm_first before loading this lib - const wxClassInfo *m_after; // ..and after. + // These pointers may be NULL but if they are not, then m_ourLast follows + // m_ourFirst in the linked list, i.e. can be found by calling GetNext() a + // sufficient number of times. + const wxClassInfo *m_ourFirst; // first class info in this plugin + const wxClassInfo *m_ourLast; // ..and the last one size_t m_linkcount; // Ref count of library link calls size_t m_objcount; // ..and (pluggable) object instantiations. diff --git a/Externals/wxWidgets3/include/wx/editlbox.h b/Externals/wxWidgets3/include/wx/editlbox.h index 890d74e333..7aad2ac205 100644 --- a/Externals/wxWidgets3/include/wx/editlbox.h +++ b/Externals/wxWidgets3/include/wx/editlbox.h @@ -2,7 +2,6 @@ // Name: wx/editlbox.h // Purpose: ListBox with editable items // Author: Vaclav Slavik -// RCS-ID: $Id: editlbox.h 56651 2008-11-02 22:16:14Z FM $ // Copyright: (c) Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -89,6 +88,10 @@ protected: DECLARE_CLASS(wxEditableListBox) DECLARE_EVENT_TABLE() + +private: + void SwapItems(long i1, long i2); + }; #endif // wxUSE_EDITABLELISTBOX diff --git a/Externals/wxWidgets3/include/wx/effects.h b/Externals/wxWidgets3/include/wx/effects.h index e12835d025..adaf951c10 100644 --- a/Externals/wxWidgets3/include/wx/effects.h +++ b/Externals/wxWidgets3/include/wx/effects.h @@ -5,7 +5,6 @@ // Author: Julian Smart et al // Modified by: // Created: 25/4/2000 -// RCS-ID: $Id: effects.h 54372 2008-06-26 11:16:40Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/encconv.h b/Externals/wxWidgets3/include/wx/encconv.h index 5447fb5980..bc464785c8 100644 --- a/Externals/wxWidgets3/include/wx/encconv.h +++ b/Externals/wxWidgets3/include/wx/encconv.h @@ -76,7 +76,7 @@ class WXDLLIMPEXP_BASE wxEncodingConverter : public wxObject // try some (lossy) substitutions - e.g. replace // unconvertable latin capitals with acute by ordinary // capitals, replace en-dash or em-dash by '-' etc. - // both modes gurantee that output string will have same length + // both modes guarantee that output string will have same length // as input string // // Returns false if given conversion is impossible, true otherwise @@ -109,9 +109,9 @@ class WXDLLIMPEXP_BASE wxEncodingConverter : public wxObject // // 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 + // 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). // // Convert() method is not limited to converting between diff --git a/Externals/wxWidgets3/include/wx/encinfo.h b/Externals/wxWidgets3/include/wx/encinfo.h index bbe7229723..27b1453847 100644 --- a/Externals/wxWidgets3/include/wx/encinfo.h +++ b/Externals/wxWidgets3/include/wx/encinfo.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.09.2003 (extracted from wx/fontenc.h) -// RCS-ID: $Id: encinfo.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/event.h b/Externals/wxWidgets3/include/wx/event.h index 19610b0f18..1dcdf333dc 100644 --- a/Externals/wxWidgets3/include/wx/event.h +++ b/Externals/wxWidgets3/include/wx/event.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: event.h 70703 2012-02-26 20:24:25Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -33,6 +32,14 @@ #include "wx/meta/convertible.h" #endif +// Currently VC6 and VC7 are known to not be able to compile CallAfter() code, +// so disable it for them. +#if !defined(__VISUALC__) || wxCHECK_VISUALC_VERSION(8) + #include "wx/meta/removeref.h" + + #define wxHAS_CALL_AFTER +#endif + // ---------------------------------------------------------------------------- // forward declarations // ---------------------------------------------------------------------------- @@ -621,6 +628,7 @@ extern WXDLLIMPEXP_BASE const wxEventType wxEVT_USER_FIRST; // Need events declared to do this class WXDLLIMPEXP_FWD_BASE wxIdleEvent; class WXDLLIMPEXP_FWD_BASE wxThreadEvent; +class WXDLLIMPEXP_FWD_BASE wxAsyncMethodCallEvent; class WXDLLIMPEXP_FWD_CORE wxCommandEvent; class WXDLLIMPEXP_FWD_CORE wxMouseEvent; class WXDLLIMPEXP_FWD_CORE wxFocusEvent; @@ -660,29 +668,30 @@ class WXDLLIMPEXP_FWD_CORE wxHelpEvent; // Command events -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SLIDER_UPDATED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_BUTTON, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHECKBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHOICE, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LISTBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LISTBOX_DCLICK, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHECKLISTBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SLIDER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RADIOBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RADIOBUTTON, wxCommandEvent); -// wxEVT_COMMAND_SCROLLBAR_UPDATED is deprecated, use wxEVT_SCROLL... events -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SCROLLBAR_UPDATED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_VLBOX_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_RCLICKED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_ENTER, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_DROPDOWN, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_CLOSEUP, wxCommandEvent); +// wxEVT_SCROLLBAR is deprecated, use wxEVT_SCROLL... events +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLBAR, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_VLBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_RCLICKED, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_DROPDOWN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TOOL_ENTER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX_DROPDOWN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMBOBOX_CLOSEUP, wxCommandEvent); - // Thread events + // Thread and asynchronous method call events wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_THREAD, wxThreadEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_ASYNC_METHOD_CALL, wxAsyncMethodCallEvent); // Mouse event types wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_DOWN, wxMouseEvent); @@ -801,9 +810,9 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE_END, wxMoveEvent); wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HIBERNATE, wxActivateEvent); // Clipboard events -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_COPY, wxClipboardTextEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_CUT, wxClipboardTextEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_PASTE, wxClipboardTextEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_COPY, wxClipboardTextEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_CUT, wxClipboardTextEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_PASTE, wxClipboardTextEvent); // Generic command events // Note: a click is a higher-level event than button down/up @@ -820,7 +829,7 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HELP, wxHelpEvent); wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DETAILED_HELP, wxHelpEvent); // these 2 events are the same -#define wxEVT_COMMAND_TOOL_CLICKED wxEVT_COMMAND_MENU_SELECTED +#define wxEVT_TOOL wxEVT_MENU // ---------------------------------------------------------------------------- // Compatibility @@ -830,7 +839,7 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DETAILED_HELP, wxHelpEvent); // wx/textctrl.h in all ports [yet], so declare it here as well // // still, any new code using it should include wx/textctrl.h explicitly -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT, wxCommandEvent); // ---------------------------------------------------------------------------- @@ -930,6 +939,10 @@ public: int GetId() const { return m_id; } void SetId(int Id) { m_id = Id; } + // Returns the user data optionally associated with the event handler when + // using Connect() or Bind(). + wxObject *GetEventUserData() const { return m_callbackUserData; } + // Can instruct event processor that we wish to ignore this event // (treat as if the event table entry had not been found): this must be done // to allow the event processing by the base classes (calling event.Skip() @@ -972,6 +985,9 @@ public: m_propagationLevel = propagationLevel; } + // This method is for internal use only and allows to get the object that + // is propagating this event upwards the window hierarchy, if any. + wxEvtHandler* GetPropagatedFrom() const { return m_propagatedFrom; } // This is for internal use only and is only called by // wxEvtHandler::ProcessEvent() to check whether it's the first time this @@ -986,6 +1002,24 @@ public: return false; } + // This is for internal use only and is used for setting, testing and + // resetting of m_willBeProcessedAgain flag. + void SetWillBeProcessedAgain() + { + m_willBeProcessedAgain = true; + } + + bool WillBeProcessedAgain() + { + if ( m_willBeProcessedAgain ) + { + m_willBeProcessedAgain = false; + return true; + } + + return false; + } + // This is also used only internally by ProcessEvent() to check if it // should process the event normally or only restrict the search for the // event handler to this object itself. @@ -1024,6 +1058,10 @@ protected: // the parent window (if any) int m_propagationLevel; + // The object that the event is being propagated from, initially NULL and + // only set by wxPropagateOnce. + wxEvtHandler* m_propagatedFrom; + bool m_skipped; bool m_isCommandEvent; @@ -1033,12 +1071,17 @@ protected: // once for this event bool m_wasProcessed; + // This one is initially false too, but can be set to true to indicate that + // the event will be passed to another handler if it's not processed in + // this one. + bool m_willBeProcessedAgain; + protected: wxEvent(const wxEvent&); // for implementing Clone() wxEvent& operator=(const wxEvent&); // for derived classes operator=() private: - // it needs to access our m_propagationLevel + // It needs to access our m_propagationLevel and m_propagatedFrom fields. friend class WXDLLIMPEXP_FWD_BASE wxPropagateOnce; // and this one needs to access our m_handlerToProcessOnlyIn @@ -1072,26 +1115,35 @@ private: }; /* - * Another one to temporarily lower propagation level. + * Helper used to indicate that an event is propagated upwards the window + * hierarchy by the given window. */ class WXDLLIMPEXP_BASE wxPropagateOnce { public: - wxPropagateOnce(wxEvent& event) : m_event(event) + // The handler argument should normally be non-NULL to allow the parent + // event handler to know that it's being used to process an event coming + // from the child, it's only NULL by default for backwards compatibility. + wxPropagateOnce(wxEvent& event, wxEvtHandler* handler = NULL) + : m_event(event), + m_propagatedFromOld(event.m_propagatedFrom) { wxASSERT_MSG( m_event.m_propagationLevel > 0, wxT("shouldn't be used unless ShouldPropagate()!") ); m_event.m_propagationLevel--; + m_event.m_propagatedFrom = handler; } ~wxPropagateOnce() { + m_event.m_propagatedFrom = m_propagatedFromOld; m_event.m_propagationLevel++; } private: wxEvent& m_event; + wxEvtHandler* const m_propagatedFromOld; wxDECLARE_NO_COPY_CLASS(wxPropagateOnce); }; @@ -1244,7 +1296,7 @@ public: { // make sure our string member (which uses COW, aka refcounting) is not // shared by other wxString instances: - SetString(GetString().c_str()); + SetString(GetString().Clone()); } virtual wxEvent *Clone() const @@ -1262,26 +1314,217 @@ private: }; +// Asynchronous method call events: these event are processed by wxEvtHandler +// itself and result in a call to its Execute() method which simply calls the +// specified method. The difference with a simple method call is that this is +// done asynchronously, i.e. at some later time, instead of immediately when +// the event object is constructed. + +#ifdef wxHAS_CALL_AFTER + +// This is a base class used to process all method calls. +class wxAsyncMethodCallEvent : public wxEvent +{ +public: + wxAsyncMethodCallEvent(wxObject* object) + : wxEvent(wxID_ANY, wxEVT_ASYNC_METHOD_CALL) + { + SetEventObject(object); + } + + wxAsyncMethodCallEvent(const wxAsyncMethodCallEvent& other) + : wxEvent(other) + { + } + + virtual void Execute() = 0; +}; + +// This is a version for calling methods without parameters. +template +class wxAsyncMethodCallEvent0 : public wxAsyncMethodCallEvent +{ +public: + typedef T ObjectType; + typedef void (ObjectType::*MethodType)(); + + wxAsyncMethodCallEvent0(ObjectType* object, + MethodType method) + : wxAsyncMethodCallEvent(object), + m_object(object), + m_method(method) + { + } + + wxAsyncMethodCallEvent0(const wxAsyncMethodCallEvent0& other) + : wxAsyncMethodCallEvent(other), + m_object(other.m_object), + m_method(other.m_method) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEvent0(*this); + } + + virtual void Execute() + { + (m_object->*m_method)(); + } + +private: + ObjectType* const m_object; + const MethodType m_method; +}; + +// This is a version for calling methods with a single parameter. +template +class wxAsyncMethodCallEvent1 : public wxAsyncMethodCallEvent +{ +public: + typedef T ObjectType; + typedef void (ObjectType::*MethodType)(T1 x1); + typedef typename wxRemoveRef::type ParamType1; + + wxAsyncMethodCallEvent1(ObjectType* object, + MethodType method, + const ParamType1& x1) + : wxAsyncMethodCallEvent(object), + m_object(object), + m_method(method), + m_param1(x1) + { + } + + wxAsyncMethodCallEvent1(const wxAsyncMethodCallEvent1& other) + : wxAsyncMethodCallEvent(other), + m_object(other.m_object), + m_method(other.m_method), + m_param1(other.m_param1) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEvent1(*this); + } + + virtual void Execute() + { + (m_object->*m_method)(m_param1); + } + +private: + ObjectType* const m_object; + const MethodType m_method; + const ParamType1 m_param1; +}; + +// This is a version for calling methods with two parameters. +template +class wxAsyncMethodCallEvent2 : public wxAsyncMethodCallEvent +{ +public: + typedef T ObjectType; + typedef void (ObjectType::*MethodType)(T1 x1, T2 x2); + typedef typename wxRemoveRef::type ParamType1; + typedef typename wxRemoveRef::type ParamType2; + + wxAsyncMethodCallEvent2(ObjectType* object, + MethodType method, + const ParamType1& x1, + const ParamType2& x2) + : wxAsyncMethodCallEvent(object), + m_object(object), + m_method(method), + m_param1(x1), + m_param2(x2) + { + } + + wxAsyncMethodCallEvent2(const wxAsyncMethodCallEvent2& other) + : wxAsyncMethodCallEvent(other), + m_object(other.m_object), + m_method(other.m_method), + m_param1(other.m_param1), + m_param2(other.m_param2) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEvent2(*this); + } + + virtual void Execute() + { + (m_object->*m_method)(m_param1, m_param2); + } + +private: + ObjectType* const m_object; + const MethodType m_method; + const ParamType1 m_param1; + const ParamType2 m_param2; +}; + +// This is a version for calling any functors +template +class wxAsyncMethodCallEventFunctor : public wxAsyncMethodCallEvent +{ +public: + typedef T FunctorType; + + wxAsyncMethodCallEventFunctor(wxObject *object, const FunctorType& fn) + : wxAsyncMethodCallEvent(object), + m_fn(fn) + { + } + + wxAsyncMethodCallEventFunctor(const wxAsyncMethodCallEventFunctor& other) + : wxAsyncMethodCallEvent(other), + m_fn(other.m_fn) + { + } + + virtual wxEvent *Clone() const + { + return new wxAsyncMethodCallEventFunctor(*this); + } + + virtual void Execute() + { + m_fn(); + } + +private: + FunctorType m_fn; +}; + +#endif // wxHAS_CALL_AFTER + + #if wxUSE_GUI // Item or menu event class /* - wxEVT_COMMAND_BUTTON_CLICKED - wxEVT_COMMAND_CHECKBOX_CLICKED - wxEVT_COMMAND_CHOICE_SELECTED - wxEVT_COMMAND_LISTBOX_SELECTED - wxEVT_COMMAND_LISTBOX_DOUBLECLICKED - wxEVT_COMMAND_TEXT_UPDATED - wxEVT_COMMAND_TEXT_ENTER - wxEVT_COMMAND_MENU_SELECTED - wxEVT_COMMAND_SLIDER_UPDATED - wxEVT_COMMAND_RADIOBOX_SELECTED - wxEVT_COMMAND_RADIOBUTTON_SELECTED - wxEVT_COMMAND_SCROLLBAR_UPDATED - wxEVT_COMMAND_VLBOX_SELECTED - wxEVT_COMMAND_COMBOBOX_SELECTED - wxEVT_COMMAND_TOGGLEBUTTON_CLICKED + wxEVT_BUTTON + wxEVT_CHECKBOX + wxEVT_CHOICE + wxEVT_LISTBOX + wxEVT_LISTBOX_DCLICK + wxEVT_TEXT + wxEVT_TEXT_ENTER + wxEVT_MENU + wxEVT_SLIDER + wxEVT_RADIOBOX + wxEVT_RADIOBUTTON + wxEVT_SCROLLBAR + wxEVT_VLBOX + wxEVT_COMBOBOX + wxEVT_TOGGLEBUTTON */ class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent, @@ -1295,7 +1538,12 @@ public: wxEventBasicPayloadMixin(event), m_clientData(event.m_clientData), m_clientObject(event.m_clientObject) - { } + { + // Because GetString() can retrieve the string text only on demand, we + // need to copy it explicitly. + if ( m_cmdString.empty() ) + m_cmdString = event.GetString(); + } // Set/Get client data from controls void SetClientData(void* clientData) { m_clientData = clientData; } @@ -1448,6 +1696,12 @@ private: wxEVT_RIGHT_DCLICK */ +enum wxMouseWheelAxis +{ + wxMOUSE_WHEEL_VERTICAL, + wxMOUSE_WHEEL_HORIZONTAL +}; + class WXDLLIMPEXP_CORE wxMouseEvent : public wxEvent, public wxMouseState { @@ -1535,15 +1789,19 @@ public: // should occur for each delta. int GetWheelDelta() const { return m_wheelDelta; } - // Gets the axis the wheel operation concerns, 0 being the y axis as on - // most mouse wheels, 1 is the x axis for things like MightyMouse scrolls - // or horizontal trackpad scrolling - int GetWheelAxis() const { return m_wheelAxis; } + // Gets the axis the wheel operation concerns; wxMOUSE_WHEEL_VERTICAL + // (most common case) or wxMOUSE_WHEEL_HORIZONTAL (for horizontal scrolling + // using e.g. a trackpad). + wxMouseWheelAxis GetWheelAxis() const { return m_wheelAxis; } // Returns the configured number of lines (or whatever) to be scrolled per - // wheel action. Defaults to one. + // wheel action. Defaults to three. int GetLinesPerAction() const { return m_linesPerAction; } + // Returns the configured number of columns (or whatever) to be scrolled per + // wheel action. Defaults to three. + int GetColumnsPerAction() const { return m_columnsPerAction; } + // Is the system set to do page scrolling? bool IsPageScroll() const { return ((unsigned int)m_linesPerAction == UINT_MAX); } @@ -1560,10 +1818,11 @@ public: public: int m_clickCount; - int m_wheelAxis; + wxMouseWheelAxis m_wheelAxis; int m_wheelRotation; int m_wheelDelta; int m_linesPerAction; + int m_columnsPerAction; protected: void Assign(const wxMouseEvent& evt); @@ -1679,24 +1938,29 @@ public: // Find the position of the event void GetPosition(wxCoord *xpos, wxCoord *ypos) const { - if (xpos) *xpos = m_x; - if (ypos) *ypos = m_y; + if (xpos) + *xpos = GetX(); + if (ypos) + *ypos = GetY(); } + // This version if provided only for backwards compatiblity, don't use. void GetPosition(long *xpos, long *ypos) const { - if (xpos) *xpos = (long)m_x; - if (ypos) *ypos = (long)m_y; + if (xpos) + *xpos = GetX(); + if (ypos) + *ypos = GetY(); } wxPoint GetPosition() const - { return wxPoint(m_x, m_y); } + { return wxPoint(GetX(), GetY()); } // Get X position - wxCoord GetX() const { return m_x; } + wxCoord GetX() const; // Get Y position - wxCoord GetY() const { return m_y; } + wxCoord GetY() const; // Can be called from wxEVT_CHAR_HOOK handler to allow generation of normal // key events even though the event had been handled (by default they would @@ -1728,6 +1992,8 @@ public: } public: + // Do not use these fields directly, they are initialized on demand, so + // call GetX() and GetY() or GetPosition() instead. wxCoord m_x, m_y; long m_keyCode; @@ -1760,6 +2026,7 @@ private: { m_x = evt.m_x; m_y = evt.m_y; + m_hasPosition = evt.m_hasPosition; m_keyCode = evt.m_keyCode; @@ -1770,11 +2037,19 @@ private: #endif } + // Initialize m_x and m_y using the current mouse cursor position if + // necessary. + void InitPositionIfNecessary() const; + // If this flag is true, the normal key events should still be generated // even if wxEVT_CHAR_HOOK had been handled. By default it is false as // handling wxEVT_CHAR_HOOK suppresses all the subsequent events. bool m_allowNext; + // If true, m_x and m_y were already initialized. If false, try to get them + // when they're requested. + bool m_hasPosition; + DECLARE_DYNAMIC_CLASS(wxKeyEvent) }; @@ -2774,9 +3049,9 @@ private: // NOTE : under windows these events are *NOT* generated automatically // for a Rich Edit text control. /* -wxEVT_COMMAND_TEXT_COPY -wxEVT_COMMAND_TEXT_CUT -wxEVT_COMMAND_TEXT_PASTE +wxEVT_TEXT_COPY +wxEVT_TEXT_CUT +wxEVT_TEXT_PASTE */ class WXDLLIMPEXP_CORE wxClipboardTextEvent : public wxCommandEvent @@ -2991,7 +3266,7 @@ public: protected: // Init the hash table with the entries of the static event table. void InitHashTable(); - // Helper funtion of InitHashTable() to insert 1 entry into the hash table. + // Helper function of InitHashTable() to insert 1 entry into the hash table. void AddEntry(const wxEventTableEntry &entry); // Allocate and init with null pointers the base hash table. void AllocEventTypeTable(size_t size); @@ -3113,6 +3388,52 @@ public: // NOTE: uses AddPendingEvent(); call only from secondary threads #endif +#ifdef wxHAS_CALL_AFTER + // Asynchronous method calls: these methods schedule the given method + // pointer for a later call (during the next idle event loop iteration). + // + // Notice that the method is called on this object itself, so the object + // CallAfter() is called on must have the correct dynamic type. + // + // These method can be used from another thread. + + template + void CallAfter(void (T::*method)()) + { + QueueEvent( + new wxAsyncMethodCallEvent0(static_cast(this), method) + ); + } + + // Notice that we use P1 and not T1 for the parameter to allow passing + // parameters that are convertible to the type taken by the method + // instead of being exactly the same, to be closer to the usual method call + // semantics. + template + void CallAfter(void (T::*method)(T1 x1), P1 x1) + { + QueueEvent( + new wxAsyncMethodCallEvent1( + static_cast(this), method, x1) + ); + } + + template + void CallAfter(void (T::*method)(T1 x1, T2 x2), P1 x1, P2 x2) + { + QueueEvent( + new wxAsyncMethodCallEvent2( + static_cast(this), method, x1, x2) + ); + } + + template + void CallAfter(const T& fn) + { + QueueEvent(new wxAsyncMethodCallEventFunctor(this, fn)); + } +#endif // wxHAS_CALL_AFTER + // Connecting and disconnecting // ---------------------------- @@ -3975,33 +4296,33 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent& #endif // WXWIN_COMPATIBILITY_2_6 // Convenience macros for commonly-used commands -#define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKBOX_CLICKED, winid, wxCommandEventHandler(func)) -#define EVT_CHOICE(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHOICE_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_LISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOX_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_LISTBOX_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, winid, wxCommandEventHandler(func)) -#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_MENU_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_MENU_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_MENU_SELECTED, id1, id2, wxCommandEventHandler(func)) +#define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_CHECKBOX, winid, wxCommandEventHandler(func)) +#define EVT_CHOICE(winid, func) wx__DECLARE_EVT1(wxEVT_CHOICE, winid, wxCommandEventHandler(func)) +#define EVT_LISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_LISTBOX, winid, wxCommandEventHandler(func)) +#define EVT_LISTBOX_DCLICK(winid, func) wx__DECLARE_EVT1(wxEVT_LISTBOX_DCLICK, winid, wxCommandEventHandler(func)) +#define EVT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_MENU, winid, wxCommandEventHandler(func)) +#define EVT_MENU_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_MENU, id1, id2, wxCommandEventHandler(func)) #if defined(__SMARTPHONE__) # define EVT_BUTTON(winid, func) EVT_MENU(winid, func) #else -# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_BUTTON_CLICKED, winid, wxCommandEventHandler(func)) +# define EVT_BUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_BUTTON, winid, wxCommandEventHandler(func)) #endif -#define EVT_SLIDER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SLIDER_UPDATED, winid, wxCommandEventHandler(func)) -#define EVT_RADIOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RADIOBOX_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_RADIOBUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_RADIOBUTTON_SELECTED, winid, wxCommandEventHandler(func)) +#define EVT_SLIDER(winid, func) wx__DECLARE_EVT1(wxEVT_SLIDER, winid, wxCommandEventHandler(func)) +#define EVT_RADIOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_RADIOBOX, winid, wxCommandEventHandler(func)) +#define EVT_RADIOBUTTON(winid, func) wx__DECLARE_EVT1(wxEVT_RADIOBUTTON, winid, wxCommandEventHandler(func)) // EVT_SCROLLBAR is now obsolete since we use EVT_COMMAND_SCROLL... events -#define EVT_SCROLLBAR(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_SCROLLBAR_UPDATED, winid, wxCommandEventHandler(func)) -#define EVT_VLBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_VLBOX_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_COMBOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_COMBOBOX_SELECTED, winid, wxCommandEventHandler(func)) -#define EVT_TOOL(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_CLICKED, winid, wxCommandEventHandler(func)) -#define EVT_TOOL_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, winid, wxCommandEventHandler(func)) -#define EVT_TOOL_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_CLICKED, id1, id2, wxCommandEventHandler(func)) -#define EVT_TOOL_RCLICKED(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_RCLICKED, winid, wxCommandEventHandler(func)) -#define EVT_TOOL_RCLICKED_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_COMMAND_TOOL_RCLICKED, id1, id2, wxCommandEventHandler(func)) -#define EVT_TOOL_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TOOL_ENTER, winid, wxCommandEventHandler(func)) -#define EVT_CHECKLISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, winid, wxCommandEventHandler(func)) -#define EVT_COMBOBOX_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_COMBOBOX_DROPDOWN, winid, wxCommandEventHandler(func)) -#define EVT_COMBOBOX_CLOSEUP(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_COMBOBOX_CLOSEUP, winid, wxCommandEventHandler(func)) +#define EVT_SCROLLBAR(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLLBAR, winid, wxCommandEventHandler(func)) +#define EVT_VLBOX(winid, func) wx__DECLARE_EVT1(wxEVT_VLBOX, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX, winid, wxCommandEventHandler(func)) +#define EVT_TOOL(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_DROPDOWN, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_TOOL, id1, id2, wxCommandEventHandler(func)) +#define EVT_TOOL_RCLICKED(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_RCLICKED, winid, wxCommandEventHandler(func)) +#define EVT_TOOL_RCLICKED_RANGE(id1, id2, func) wx__DECLARE_EVT2(wxEVT_TOOL_RCLICKED, id1, id2, wxCommandEventHandler(func)) +#define EVT_TOOL_ENTER(winid, func) wx__DECLARE_EVT1(wxEVT_TOOL_ENTER, winid, wxCommandEventHandler(func)) +#define EVT_CHECKLISTBOX(winid, func) wx__DECLARE_EVT1(wxEVT_CHECKLISTBOX, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX_DROPDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX_DROPDOWN, winid, wxCommandEventHandler(func)) +#define EVT_COMBOBOX_CLOSEUP(winid, func) wx__DECLARE_EVT1(wxEVT_COMBOBOX_CLOSEUP, winid, wxCommandEventHandler(func)) // Generic command events #define EVT_COMMAND_LEFT_CLICK(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_LEFT_CLICK, winid, wxCommandEventHandler(func)) @@ -4044,14 +4365,12 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent& #define EVT_COMMAND_CONTEXT_MENU(winid, func) wx__DECLARE_EVT1(wxEVT_CONTEXT_MENU, winid, wxContextMenuEventHandler(func)) // Clipboard text Events -#define EVT_TEXT_CUT(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_CUT, winid, wxClipboardTextEventHandler(func)) -#define EVT_TEXT_COPY(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_COPY, winid, wxClipboardTextEventHandler(func)) -#define EVT_TEXT_PASTE(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_PASTE, winid, wxClipboardTextEventHandler(func)) +#define EVT_TEXT_CUT(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_CUT, winid, wxClipboardTextEventHandler(func)) +#define EVT_TEXT_COPY(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_COPY, winid, wxClipboardTextEventHandler(func)) +#define EVT_TEXT_PASTE(winid, func) wx__DECLARE_EVT1(wxEVT_TEXT_PASTE, winid, wxClipboardTextEventHandler(func)) // Thread events #define EVT_THREAD(id, func) wx__DECLARE_EVT1(wxEVT_THREAD, id, wxThreadEventHandler(func)) -// alias for backward compatibility with 2.9.0: -#define wxEVT_COMMAND_THREAD wxEVT_THREAD // ---------------------------------------------------------------------------- // Helper functions @@ -4115,11 +4434,11 @@ WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor); #define DECLARE_EVENT_TABLE() wxDECLARE_EVENT_TABLE(); #define BEGIN_EVENT_TABLE(a,b) wxBEGIN_EVENT_TABLE(a,b) #define BEGIN_EVENT_TABLE_TEMPLATE1(a,b,c) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c) -#define BEGIN_EVENT_TABLE_TEMPLATE2(a,b,c,d) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c,d) -#define BEGIN_EVENT_TABLE_TEMPLATE3(a,b,c,d,e) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c,d,e) -#define BEGIN_EVENT_TABLE_TEMPLATE4(a,b,c,d,e,f) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c,d,e,f) -#define BEGIN_EVENT_TABLE_TEMPLATE5(a,b,c,d,e,f,g) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c,d,e,f,g) -#define BEGIN_EVENT_TABLE_TEMPLATE6(a,b,c,d,e,f,g,h) wxBEGIN_EVENT_TABLE_TEMPLATE1(a,b,c,d,e,f,g,h) +#define BEGIN_EVENT_TABLE_TEMPLATE2(a,b,c,d) wxBEGIN_EVENT_TABLE_TEMPLATE2(a,b,c,d) +#define BEGIN_EVENT_TABLE_TEMPLATE3(a,b,c,d,e) wxBEGIN_EVENT_TABLE_TEMPLATE3(a,b,c,d,e) +#define BEGIN_EVENT_TABLE_TEMPLATE4(a,b,c,d,e,f) wxBEGIN_EVENT_TABLE_TEMPLATE4(a,b,c,d,e,f) +#define BEGIN_EVENT_TABLE_TEMPLATE5(a,b,c,d,e,f,g) wxBEGIN_EVENT_TABLE_TEMPLATE5(a,b,c,d,e,f,g) +#define BEGIN_EVENT_TABLE_TEMPLATE6(a,b,c,d,e,f,g,h) wxBEGIN_EVENT_TABLE_TEMPLATE6(a,b,c,d,e,f,g,h) #define END_EVENT_TABLE() wxEND_EVENT_TABLE() // other obsolete event declaration/definition macros; we don't need them any longer @@ -4135,4 +4454,31 @@ WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor); #define DEFINE_EVENT_TYPE(name) const wxEventType name = wxNewEventType(); #define DEFINE_LOCAL_EVENT_TYPE(name) DEFINE_EVENT_TYPE(name) +// alias for backward compatibility with 2.9.0: +#define wxEVT_COMMAND_THREAD wxEVT_THREAD +// other old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_BUTTON_CLICKED wxEVT_BUTTON +#define wxEVT_COMMAND_CHECKBOX_CLICKED wxEVT_CHECKBOX +#define wxEVT_COMMAND_CHOICE_SELECTED wxEVT_CHOICE +#define wxEVT_COMMAND_LISTBOX_SELECTED wxEVT_LISTBOX +#define wxEVT_COMMAND_LISTBOX_DOUBLECLICKED wxEVT_LISTBOX_DCLICK +#define wxEVT_COMMAND_CHECKLISTBOX_TOGGLED wxEVT_CHECKLISTBOX +#define wxEVT_COMMAND_MENU_SELECTED wxEVT_MENU +#define wxEVT_COMMAND_TOOL_CLICKED wxEVT_TOOL +#define wxEVT_COMMAND_SLIDER_UPDATED wxEVT_SLIDER +#define wxEVT_COMMAND_RADIOBOX_SELECTED wxEVT_RADIOBOX +#define wxEVT_COMMAND_RADIOBUTTON_SELECTED wxEVT_RADIOBUTTON +#define wxEVT_COMMAND_SCROLLBAR_UPDATED wxEVT_SCROLLBAR +#define wxEVT_COMMAND_VLBOX_SELECTED wxEVT_VLBOX +#define wxEVT_COMMAND_COMBOBOX_SELECTED wxEVT_COMBOBOX +#define wxEVT_COMMAND_TOOL_RCLICKED wxEVT_TOOL_RCLICKED +#define wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED wxEVT_TOOL_DROPDOWN +#define wxEVT_COMMAND_TOOL_ENTER wxEVT_TOOL_ENTER +#define wxEVT_COMMAND_COMBOBOX_DROPDOWN wxEVT_COMBOBOX_DROPDOWN +#define wxEVT_COMMAND_COMBOBOX_CLOSEUP wxEVT_COMBOBOX_CLOSEUP +#define wxEVT_COMMAND_TEXT_COPY wxEVT_TEXT_COPY +#define wxEVT_COMMAND_TEXT_CUT wxEVT_TEXT_CUT +#define wxEVT_COMMAND_TEXT_PASTE wxEVT_TEXT_PASTE +#define wxEVT_COMMAND_TEXT_UPDATED wxEVT_TEXT + #endif // _WX_EVENT_H_ diff --git a/Externals/wxWidgets3/include/wx/eventfilter.h b/Externals/wxWidgets3/include/wx/eventfilter.h index 5a110cb7c5..30eac4d363 100644 --- a/Externals/wxWidgets3/include/wx/eventfilter.h +++ b/Externals/wxWidgets3/include/wx/eventfilter.h @@ -3,7 +3,6 @@ // Purpose: wxEventFilter class declaration. // Author: Vadim Zeitlin // Created: 2011-11-21 -// RCS-ID: $Id: eventfilter.h 70302 2012-01-09 14:04:25Z DS $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/evtloop.h b/Externals/wxWidgets3/include/wx/evtloop.h index 97a3548d8e..8dd5d6eb7b 100644 --- a/Externals/wxWidgets3/include/wx/evtloop.h +++ b/Externals/wxWidgets3/include/wx/evtloop.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 01.06.01 -// RCS-ID: $Id: evtloop.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) 2001 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -17,7 +16,7 @@ // TODO: implement wxEventLoopSource for MSW (it should wrap a HANDLE and be // monitored using MsgWaitForMultipleObjects()) -#if defined(__WXOSX__) || (defined(__UNIX__) && !defined(__CYGWIN__)) +#if defined(__WXOSX__) || (defined(__UNIX__) && !defined(__WXMSW__)) #define wxUSE_EVENTLOOP_SOURCE 1 #else #define wxUSE_EVENTLOOP_SOURCE 0 @@ -79,16 +78,19 @@ public: #if wxUSE_EVENTLOOP_SOURCE // create a new event loop source wrapping the given file descriptor and - // start monitoring it - virtual wxEventLoopSource * - AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags) = 0; + // monitor it for events occurring on this descriptor in all event loops + static wxEventLoopSource * + AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags); #endif // wxUSE_EVENTLOOP_SOURCE // dispatch&processing // ------------------- // start the event loop, return the exit code when it is finished - virtual int Run() = 0; + // + // notice that wx ports should override DoRun(), this method is virtual + // only to allow overriding it in the user code for custom event loops + virtual int Run(); // is this event loop running now? // @@ -97,7 +99,15 @@ public: bool IsRunning() const; // exit from the loop with the given exit code - virtual void Exit(int rc = 0) = 0; + // + // this can be only used to exit the currently running loop, use + // ScheduleExit() if this might not be the case + virtual void Exit(int rc = 0); + + // ask the event loop to exit with the given exit code, can be used even if + // this loop is not running right now but the loop must have been started, + // i.e. Run() should have been already called + virtual void ScheduleExit(int rc = 0) = 0; // return true if any events are available virtual bool Pending() const = 0; @@ -169,22 +179,38 @@ public: protected: + // real implementation of Run() + virtual int DoRun() = 0; + // this function should be called before the event loop terminates, whether // this happens normally (because of Exit() call) or abnormally (because of // an exception thrown from inside the loop) virtual void OnExit(); + // Return true if we're currently inside our Run(), even if another nested + // event loop is currently running, unlike IsRunning() (which should have + // been really called IsActive() but it's too late to change this now). + bool IsInsideRun() const { return m_isInsideRun; } + + // the pointer to currently active loop static wxEventLoopBase *ms_activeLoop; + // should we exit the loop? + bool m_shouldExit; + // YieldFor() helpers: bool m_isInsideYield; long m_eventsToProcessInsideYield; +private: + // this flag is set on entry into Run() and reset before leaving it + bool m_isInsideRun; + wxDECLARE_NO_COPY_CLASS(wxEventLoopBase); }; -#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXDFB__) || (defined(__UNIX__) && !defined(__WXOSX__)) +#if defined(__WINDOWS__) || defined(__WXMAC__) || defined(__WXDFB__) || (defined(__UNIX__) && !defined(__WXOSX__)) // this class can be used to implement a standard event loop logic using // Pending() and Dispatch() @@ -195,15 +221,15 @@ class WXDLLIMPEXP_BASE wxEventLoopManual : public wxEventLoopBase public: wxEventLoopManual(); - // enters a loop calling OnNextIteration(), Pending() and Dispatch() and - // terminating when Exit() is called - virtual int Run(); - // sets the "should exit" flag and wakes up the loop so that it terminates // soon - virtual void Exit(int rc = 0); + virtual void ScheduleExit(int rc = 0); protected: + // enters a loop calling OnNextIteration(), Pending() and Dispatch() and + // terminating when Exit() is called + virtual int DoRun(); + // may be overridden to perform some action at the start of each new event // loop iteration virtual void OnNextIteration() { } @@ -212,9 +238,6 @@ protected: // the loop exit code int m_exitcode; - // should we exit the loop? - bool m_shouldExit; - private: // process all already pending events and dispatch a new one (blocking // until it appears in the event queue if necessary) @@ -233,19 +256,29 @@ private: // integration with MFC) but currently this is not done for all ports yet (e.g. // wxX11) so fall back to the old wxGUIEventLoop definition below for them -#if defined(__WXMSW__) - // this header defines both console and GUI loops for MSW - #include "wx/msw/evtloop.h" -#elif defined(__WXOSX__) +#if defined(__DARWIN__) // CoreFoundation-based event loop is currently in wxBase so include it in // any case too (although maybe it actually shouldn't be there at all) - #include "wx/osx/evtloop.h" -#elif wxUSE_GUI + #include "wx/osx/core/evtloop.h" +#endif + +// include the header defining wxConsoleEventLoop +#if defined(__UNIX__) && !defined(__WXMSW__) + #include "wx/unix/evtloop.h" +#elif defined(__WINDOWS__) + #include "wx/msw/evtloopconsole.h" +#endif + +#if wxUSE_GUI // include the appropriate header defining wxGUIEventLoop -#if defined(__WXCOCOA__) +#if defined(__WXMSW__) + #include "wx/msw/evtloop.h" +#elif defined(__WXCOCOA__) #include "wx/cocoa/evtloop.h" +#elif defined(__WXOSX__) + #include "wx/osx/evtloop.h" #elif defined(__WXDFB__) #include "wx/dfb/evtloop.h" #elif defined(__WXGTK20__) @@ -262,21 +295,7 @@ public: wxGUIEventLoop() { m_impl = NULL; } virtual ~wxGUIEventLoop(); -#if wxUSE_EVENTLOOP_SOURCE - // We need to define a base class pure virtual method but we can't provide - // a generic implementation for it so simply fail. - virtual wxEventLoopSource * - AddSourceForFD(int WXUNUSED(fd), - wxEventLoopSourceHandler * WXUNUSED(handler), - int WXUNUSED(flags)) - { - wxFAIL_MSG( "support for event loop sources not implemented" ); - return NULL; - } -#endif // wxUSE_EVENTLOOP_SOURCE - - virtual int Run(); - virtual void Exit(int rc = 0); + virtual void ScheduleExit(int rc = 0); virtual bool Pending() const; virtual bool Dispatch(); virtual int DispatchTimeout(unsigned long timeout) @@ -297,6 +316,8 @@ public: virtual bool YieldFor(long eventsToProcess); protected: + virtual int DoRun(); + // the pointer to the port specific implementation class wxEventLoopImpl *m_impl; @@ -307,11 +328,6 @@ protected: #endif // wxUSE_GUI -// include the header defining wxConsoleEventLoop for Unix systems -#if defined(__UNIX__) && !defined(__CYGWIN__) -#include "wx/unix/evtloop.h" -#endif - #if wxUSE_GUI // we use a class rather than a typedef because wxEventLoop is // forward-declared in many places @@ -319,7 +335,7 @@ protected: #else // !wxUSE_GUI // we can't define wxEventLoop differently in GUI and base libraries so use // a #define to still allow writing wxEventLoop in the user code - #if wxUSE_CONSOLE_EVENTLOOP && (defined(__WXMSW__) || defined(__UNIX__)) + #if wxUSE_CONSOLE_EVENTLOOP && (defined(__WINDOWS__) || defined(__UNIX__)) #define wxEventLoop wxConsoleEventLoop #else // we still must define it somehow for the code below... #define wxEventLoop wxEventLoopBase diff --git a/Externals/wxWidgets3/include/wx/evtloopsrc.h b/Externals/wxWidgets3/include/wx/evtloopsrc.h index 20d8770b76..cb3e5c6a90 100644 --- a/Externals/wxWidgets3/include/wx/evtloopsrc.h +++ b/Externals/wxWidgets3/include/wx/evtloopsrc.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxEventLoopSource class // Author: Vadim Zeitlin // Created: 2009-10-21 -// RCS-ID: $Id: evtloopsrc.h 69559 2011-10-27 21:10:30Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -11,6 +10,9 @@ #ifndef _WX_EVTLOOPSRC_H_ #define _WX_EVTLOOPSRC_H_ +// Include the header to get wxUSE_EVENTLOOP_SOURCE definition from it. +#include "wx/evtloop.h" + // ---------------------------------------------------------------------------- // wxEventLoopSource: a source of events which may be added to wxEventLoop // ---------------------------------------------------------------------------- @@ -89,9 +91,11 @@ inline wxEventLoopSource::~wxEventLoopSource() { } #if defined(__WXGTK20__) #include "wx/gtk/evtloopsrc.h" -#elif defined(__WXOSX__) +#endif + +#if defined(__DARWIN__) #include "wx/osx/evtloopsrc.h" -#endif // platform +#endif #endif // wxUSE_EVENTLOOP_SOURCE diff --git a/Externals/wxWidgets3/include/wx/except.h b/Externals/wxWidgets3/include/wx/except.h index aecf1594c6..75589163e3 100644 --- a/Externals/wxWidgets3/include/wx/except.h +++ b/Externals/wxWidgets3/include/wx/except.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 17.09.2003 -// RCS-ID: $Id: except.h 64993 2010-07-17 11:55:10Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/fdrepdlg.h b/Externals/wxWidgets3/include/wx/fdrepdlg.h index ad433cb2c2..709dcb156b 100644 --- a/Externals/wxWidgets3/include/wx/fdrepdlg.h +++ b/Externals/wxWidgets3/include/wx/fdrepdlg.h @@ -4,7 +4,6 @@ // Author: Markus Greither and Vadim Zeitlin // Modified by: // Created: 23/03/2001 -// RCS-ID: $Id: fdrepdlg.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Markus Greither // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -67,8 +66,8 @@ public: wxFindReplaceData(wxUint32 flags) { Init(); SetFlags(flags); } // accessors - const wxString& GetFindString() { return m_FindWhat; } - const wxString& GetReplaceString() { return m_ReplaceWith; } + const wxString& GetFindString() const { return m_FindWhat; } + const wxString& GetReplaceString() const { return m_ReplaceWith; } int GetFlags() const { return m_Flags; } @@ -165,11 +164,11 @@ private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFindDialogEvent) }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FIND, wxFindDialogEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FIND_NEXT, wxFindDialogEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FIND_REPLACE, wxFindDialogEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FIND_REPLACE_ALL, wxFindDialogEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FIND_CLOSE, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_NEXT, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_REPLACE, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_REPLACE_ALL, wxFindDialogEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FIND_CLOSE, wxFindDialogEvent ); typedef void (wxEvtHandler::*wxFindDialogEventFunction)(wxFindDialogEvent&); @@ -177,19 +176,26 @@ typedef void (wxEvtHandler::*wxFindDialogEventFunction)(wxFindDialogEvent&); wxEVENT_HANDLER_CAST(wxFindDialogEventFunction, func) #define EVT_FIND(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FIND, id, wxFindDialogEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FIND, id, wxFindDialogEventHandler(fn)) #define EVT_FIND_NEXT(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_NEXT, id, wxFindDialogEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FIND_NEXT, id, wxFindDialogEventHandler(fn)) #define EVT_FIND_REPLACE(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_REPLACE, id, wxFindDialogEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FIND_REPLACE, id, wxFindDialogEventHandler(fn)) #define EVT_FIND_REPLACE_ALL(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_REPLACE_ALL, id, wxFindDialogEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FIND_REPLACE_ALL, id, wxFindDialogEventHandler(fn)) #define EVT_FIND_CLOSE(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FIND_CLOSE, id, wxFindDialogEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FIND_CLOSE, id, wxFindDialogEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_FIND wxEVT_FIND +#define wxEVT_COMMAND_FIND_NEXT wxEVT_FIND_NEXT +#define wxEVT_COMMAND_FIND_REPLACE wxEVT_FIND_REPLACE +#define wxEVT_COMMAND_FIND_REPLACE_ALL wxEVT_FIND_REPLACE_ALL +#define wxEVT_COMMAND_FIND_CLOSE wxEVT_FIND_CLOSE #endif // wxUSE_FINDREPLDLG diff --git a/Externals/wxWidgets3/include/wx/features.h b/Externals/wxWidgets3/include/wx/features.h index 0d8469917b..84a6c35c9d 100644 --- a/Externals/wxWidgets3/include/wx/features.h +++ b/Externals/wxWidgets3/include/wx/features.h @@ -5,7 +5,6 @@ * Author: Vadim Zeitlin * Modified by: Ryan Norton (Converted to C) * Created: 18.03.02 -* RCS-ID: $Id: features.h 69961 2011-12-08 15:58:45Z VZ $ * Copyright: (c) 2002 Vadim Zeitlin * Licence: wxWindows licence */ diff --git a/Externals/wxWidgets3/include/wx/ffile.h b/Externals/wxWidgets3/include/wx/ffile.h index a3c457fb9e..91a7c28ed4 100644 --- a/Externals/wxWidgets3/include/wx/ffile.h +++ b/Externals/wxWidgets3/include/wx/ffile.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 14.07.99 -// RCS-ID: $Id: ffile.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -50,7 +49,7 @@ public: // assign an existing file descriptor and get it back from wxFFile object void Attach(FILE *lfp, const wxString& name = wxEmptyString) { Close(); m_fp = lfp; m_name = name; } - void Detach() { m_fp = NULL; } + FILE* Detach() { FILE* fpOld = m_fp; m_fp = NULL; return fpOld; } FILE *fp() const { return m_fp; } // read/write (unbuffered) diff --git a/Externals/wxWidgets3/include/wx/file.h b/Externals/wxWidgets3/include/wx/file.h index 7fa7377c6d..00ac471abf 100644 --- a/Externals/wxWidgets3/include/wx/file.h +++ b/Externals/wxWidgets3/include/wx/file.h @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: file.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,7 +18,7 @@ #include "wx/string.h" #include "wx/filefn.h" -#include "wx/strconv.h" +#include "wx/convauto.h" // ---------------------------------------------------------------------------- // class wxFile: raw file IO @@ -66,16 +65,18 @@ public: // assign an existing file descriptor and get it back from wxFile object void Attach(int lfd) { Close(); m_fd = lfd; m_lasterror = 0; } - void Detach() { m_fd = fd_invalid; } + int Detach() { int fdOld = m_fd; m_fd = fd_invalid; return fdOld; } int fd() const { return m_fd; } // read/write (unbuffered) + // read all data from the file into a string (useful for text files) + bool ReadAll(wxString *str, const wxMBConv& conv = wxConvAuto()); // returns number of bytes read or wxInvalidOffset on error ssize_t Read(void *pBuf, size_t nCount); // returns the number of bytes written size_t Write(const void *pBuf, size_t nCount); // returns true on success - bool Write(const wxString& s, const wxMBConv& conv = wxMBConvUTF8()); + bool Write(const wxString& s, const wxMBConv& conv = wxConvAuto()); // flush data not yet written bool Flush(); diff --git a/Externals/wxWidgets3/include/wx/fileconf.h b/Externals/wxWidgets3/include/wx/fileconf.h index ab8e78dc96..c16129a5b1 100644 --- a/Externals/wxWidgets3/include/wx/fileconf.h +++ b/Externals/wxWidgets3/include/wx/fileconf.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 07.04.98 (adapted from appconf.cpp) -// RCS-ID: $Id: fileconf.h 60643 2009-05-15 18:02:41Z VZ $ // Copyright: (c) 1997 Karsten Ballueder & Vadim Zeitlin // Ballueder@usa.net // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/filectrl.h b/Externals/wxWidgets3/include/wx/filectrl.h index 157009ec13..e4c302f7d5 100644 --- a/Externals/wxWidgets3/include/wx/filectrl.h +++ b/Externals/wxWidgets3/include/wx/filectrl.h @@ -5,7 +5,6 @@ // Author: Diaa M. Sami // Modified by: // Created: Jul-07-2007 -// RCS-ID: $Id: filectrl.h 64429 2010-05-29 10:35:47Z VZ $ // Copyright: (c) Diaa M. Sami // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/filedlg.h b/Externals/wxWidgets3/include/wx/filedlg.h index 45178d2d43..d105493cc2 100644 --- a/Externals/wxWidgets3/include/wx/filedlg.h +++ b/Externals/wxWidgets3/include/wx/filedlg.h @@ -5,7 +5,6 @@ // Modified by: // Created: 8/17/99 // Copyright: (c) Robert Roebling -// RCS-ID: $Id: filedlg.h 70345 2012-01-15 01:05:28Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -122,6 +121,9 @@ public: virtual wxString GetWildcard() const { return m_wildCard; } virtual int GetFilterIndex() const { return m_filterIndex; } + virtual wxString GetCurrentlySelectedFilename() const + { return m_currentlySelectedFilename; } + // this function is called with wxFileDialog as parameter and should // create the window containing the extra controls we want to show in it typedef wxWindow *(*ExtraControlCreatorFunction)(wxWindow*); @@ -155,6 +157,13 @@ protected: wxString m_fileName; wxString m_wildCard; int m_filterIndex; + + // Currently selected, but not yet necessarily accepted by the user, file. + // This should be updated whenever the selection in the control changes by + // the platform-specific code to provide a useful implementation of + // GetCurrentlySelectedFilename(). + wxString m_currentlySelectedFilename; + wxWindow* m_extraControl; // returns true if control is created (if it already exists returns false) diff --git a/Externals/wxWidgets3/include/wx/filefn.h b/Externals/wxWidgets3/include/wx/filefn.h index ebd0c373c4..a5bcd7e3fc 100644 --- a/Externals/wxWidgets3/include/wx/filefn.h +++ b/Externals/wxWidgets3/include/wx/filefn.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: filefn.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1998 Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -22,22 +21,9 @@ #include #endif -#ifdef __WXWINCE__ -// Nothing -#elif !defined(__MWERKS__) +#ifndef __WXWINCE__ #include #include -#else - #ifdef __MACH__ - #include - #include - #include - #include - #else - #include - #include - #include - #endif #endif #ifdef __OS2__ @@ -58,7 +44,7 @@ #endif #if defined(__WINDOWS__) && !defined(__WXMICROWIN__) -#if !defined( __GNUWIN32__ ) && !defined( __MWERKS__ ) && !defined(__WXWINCE__) && !defined(__CYGWIN__) +#if !defined( __GNUWIN32__ ) && !defined(__WXWINCE__) && !defined(__CYGWIN__) #include #include #include @@ -91,7 +77,7 @@ // constants // ---------------------------------------------------------------------------- -#if defined(__VISUALC__) || defined(__DIGITALMARS__) +#if defined(__VISUALC__) || defined(__INTELC__) || defined(__DIGITALMARS__) typedef int mode_t; #endif @@ -106,12 +92,10 @@ #endif #endif -#if (defined(__VISUALC__) && !defined(__WXWINCE__)) || ( defined(__MWERKS__) && defined( __INTEL__) ) +#if defined(__VISUALC__) && !defined(__WXWINCE__) typedef _off_t off_t; #elif defined(__SYMANTEC__) typedef long off_t; -#elif defined(__MWERKS__) && !defined(__INTEL__) && !defined(__MACH__) - typedef long off_t; #endif enum wxSeekMode @@ -186,6 +170,7 @@ enum wxPosixPermissions #define wxFileOffsetFmtSpec wxT("I64") WXDLLIMPEXP_BASE int wxCRT_Open(const wxChar *filename, int oflag, int WXUNUSED(pmode)); WXDLLIMPEXP_BASE int wxCRT_Access(const wxChar *name, int WXUNUSED(how)); + WXDLLIMPEXP_BASE int wxCRT_Chmod(const wxChar *name, int WXUNUSED(how)); WXDLLIMPEXP_BASE int wxClose(int fd); WXDLLIMPEXP_BASE int wxFsync(int WXUNUSED(fd)); WXDLLIMPEXP_BASE int wxRead(int fd, void *buf, unsigned int count); @@ -206,7 +191,6 @@ enum wxPosixPermissions defined(__MINGW64__) || \ (defined(__MINGW32__) && !defined(__WINE__) && \ wxCHECK_W32API_VERSION(0, 5)) || \ - defined(__MWERKS__) || \ defined(__DMC__) || \ defined(__WATCOMC__) || \ defined(__BORLANDC__) \ @@ -236,9 +220,8 @@ enum wxPosixPermissions #define wxFtell ftello64 #endif - // other Windows compilers (DMC, Watcom, Metrowerks and Borland) don't have - // huge file support (or at least not all functions needed for it by wx) - // currently + // other Windows compilers (DMC, Watcom, and Borland) don't have huge file + // support (or at least not all functions needed for it by wx) currently // types @@ -309,20 +292,8 @@ enum wxPosixPermissions // complications #define wxClose wxPOSIX_IDENT(close) - #if defined(__MWERKS__) - #if __MSL__ >= 0x6000 - #define wxRead(fd, buf, nCount) _read(fd, (void *)buf, nCount) - #define wxWrite(fd, buf, nCount) _write(fd, (void *)buf, nCount) - #else - #define wxRead(fd, buf, nCount)\ - _read(fd, (const char *)buf, nCount) - #define wxWrite(fd, buf, nCount)\ - _write(fd, (const char *)buf, nCount) - #endif - #else // __MWERKS__ - #define wxRead wxPOSIX_IDENT(read) - #define wxWrite wxPOSIX_IDENT(write) - #endif + #define wxRead wxPOSIX_IDENT(read) + #define wxWrite wxPOSIX_IDENT(write) #ifdef wxHAS_HUGE_FILES #ifndef __MINGW64__ @@ -360,6 +331,7 @@ enum wxPosixPermissions // first the ANSI versions #define wxCRT_OpenA wxPOSIX_IDENT(open) #define wxCRT_AccessA wxPOSIX_IDENT(access) + #define wxCRT_ChmodA wxPOSIX_IDENT(chmod) #define wxCRT_MkDirA wxPOSIX_IDENT(mkdir) #define wxCRT_RmDirA wxPOSIX_IDENT(rmdir) #ifdef wxHAS_HUGE_FILES @@ -391,6 +363,7 @@ enum wxPosixPermissions #endif #define wxCRT_AccessW _waccess + #define wxCRT_ChmodW _wchmod #define wxCRT_MkDirW _wmkdir #define wxCRT_RmDirW _wrmdir #ifdef wxHAS_HUGE_FILES @@ -409,6 +382,8 @@ enum wxPosixPermissions int flags, int mode); WXDLLIMPEXP_BASE int wxMSLU__waccess(const wxChar *name, int mode); + WXDLLIMPEXP_BASE int wxMSLU__wchmod(const wxChar *name, + int mode); WXDLLIMPEXP_BASE int wxMSLU__wmkdir(const wxChar *name); WXDLLIMPEXP_BASE int wxMSLU__wrmdir(const wxChar *name); @@ -418,12 +393,14 @@ enum wxPosixPermissions #define wxCRT_Open wxMSLU__wopen #define wxCRT_Access wxMSLU__waccess + #define wxCRT_Chmod wxMSLU__wchmod #define wxCRT_MkDir wxMSLU__wmkdir #define wxCRT_RmDir wxMSLU__wrmdir #define wxCRT_Stat wxMSLU__wstat #else // !wxUSE_UNICODE_MSLU #define wxCRT_Open wxCRT_OpenW #define wxCRT_Access wxCRT_AccessW + #define wxCRT_Chmod wxCRT_ChmodW #define wxCRT_MkDir wxCRT_MkDirW #define wxCRT_RmDir wxCRT_RmDirW #define wxCRT_Stat wxCRT_StatW @@ -431,6 +408,7 @@ enum wxPosixPermissions #else // !wxUSE_UNICODE #define wxCRT_Open wxCRT_OpenA #define wxCRT_Access wxCRT_AccessA + #define wxCRT_Chmod wxCRT_ChmodA #define wxCRT_MkDir wxCRT_MkDirA #define wxCRT_RmDir wxCRT_RmDirA #define wxCRT_Stat wxCRT_StatA @@ -510,6 +488,7 @@ enum wxPosixPermissions #define wxCRT_Stat stat #define wxCRT_Lstat lstat #define wxCRT_Access access + #define wxCRT_Chmod chmod #define wxHAS_NATIVE_LSTAT #endif // platforms @@ -531,6 +510,8 @@ enum wxPosixPermissions inline int wxAccess(const wxString& path, mode_t mode) { return wxCRT_Access(path.fn_str(), mode); } +inline int wxChmod(const wxString& path, mode_t mode) + { return wxCRT_Chmod(path.fn_str(), mode); } inline int wxOpen(const wxString& path, int flags, mode_t mode) { return wxCRT_Open(path.fn_str(), flags, mode); } diff --git a/Externals/wxWidgets3/include/wx/filehistory.h b/Externals/wxWidgets3/include/wx/filehistory.h index 83afeaa3ec..b6cb1cb501 100644 --- a/Externals/wxWidgets3/include/wx/filehistory.h +++ b/Externals/wxWidgets3/include/wx/filehistory.h @@ -3,7 +3,6 @@ // Purpose: wxFileHistory class // Author: Julian Smart, Vaclav Slavik // Created: 2010-05-03 -// RCS-ID: $Id: filehistory.h 70503 2012-02-03 17:27:13Z VZ $ // Copyright: (c) Julian Smart, Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/filename.h b/Externals/wxWidgets3/include/wx/filename.h index e1454406b7..1a16e14050 100644 --- a/Externals/wxWidgets3/include/wx/filename.h +++ b/Externals/wxWidgets3/include/wx/filename.h @@ -4,7 +4,6 @@ // Author: Robert Roebling, Vadim Zeitlin // Modified by: // Created: 28.12.00 -// RCS-ID: $Id: filename.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2000 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,17 +11,6 @@ #ifndef _WX_FILENAME_H_ #define _WX_FILENAME_H_ -/* - TODO: - - 1. support for drives under Windows - 2. more file operations: - a) chmod() - b) [acm]time() - get and set - c) rename()? - 3. SameFileAs() function to compare inodes under Unix - */ - #include "wx/arrstr.h" #include "wx/filefn.h" #include "wx/datetime.h" @@ -108,6 +96,22 @@ enum wxPATH_RMDIR_RECURSIVE = 0x0002 // delete all recursively (dangerous!) }; +// FileExists flags +enum +{ + wxFILE_EXISTS_REGULAR = 0x0001, // check for existence of a regular file + wxFILE_EXISTS_DIR = 0x0002, // check for existence of a directory + wxFILE_EXISTS_SYMLINK = 0x1004, // check for existence of a symbolic link; + // also sets wxFILE_EXISTS_NO_FOLLOW as + // it would never be satisfied otherwise + wxFILE_EXISTS_DEVICE = 0x0008, // check for existence of a device + wxFILE_EXISTS_FIFO = 0x0016, // check for existence of a FIFO + wxFILE_EXISTS_SOCKET = 0x0032, // check for existence of a socket + // gap for future types + wxFILE_EXISTS_NO_FOLLOW = 0x1000, // don't dereference a contained symlink + wxFILE_EXISTS_ANY = 0x1FFF // check for existence of anything +}; + #if wxUSE_LONGLONG // error code of wxFileName::GetSize() extern WXDLLIMPEXP_DATA_BASE(const wxULongLong) wxInvalidSize; @@ -132,13 +136,13 @@ public: // is contructed (the name will be empty), otherwise a file name and // extension are extracted from it wxFileName( const wxString& fullpath, wxPathFormat format = wxPATH_NATIVE ) - { Assign( fullpath, format ); } + { Assign( fullpath, format ); m_dontFollowLinks = false; } // from a directory name and a file name wxFileName(const wxString& path, const wxString& name, wxPathFormat format = wxPATH_NATIVE) - { Assign(path, name, format); } + { Assign(path, name, format); m_dontFollowLinks = false; } // from a volume, directory name, file base name and extension wxFileName(const wxString& volume, @@ -146,14 +150,14 @@ public: const wxString& name, const wxString& ext, wxPathFormat format = wxPATH_NATIVE) - { Assign(volume, path, name, ext, format); } + { Assign(volume, path, name, ext, format); m_dontFollowLinks = false; } // from a directory name, file base name and extension wxFileName(const wxString& path, const wxString& name, const wxString& ext, wxPathFormat format = wxPATH_NATIVE) - { Assign(path, name, ext, format); } + { Assign(path, name, ext, format); m_dontFollowLinks = false; } // the same for delayed initialization @@ -224,8 +228,8 @@ public: // does anything at all with this name (i.e. file, directory or some // other file system object such as a device, socket, ...) exist? - bool Exists() const { return Exists(GetFullPath()); } - static bool Exists(const wxString& path); + bool Exists(int flags = wxFILE_EXISTS_ANY) const; + static bool Exists(const wxString& path, int flags = wxFILE_EXISTS_ANY); // checks on most common flags for files/directories; @@ -250,6 +254,10 @@ public: bool IsFileExecutable() const { return wxIsExecutable(GetFullPath()); } static bool IsFileExecutable(const wxString &path) { return wxFileExists(path) && wxIsExecutable(path); } + // set the file permissions to a combination of wxPosixPermissions enum + // values + bool SetPermissions(int permissions); + // time functions #if wxUSE_DATETIME @@ -367,6 +375,26 @@ public: { return Normalize(wxPATH_NORM_DOTS | wxPATH_NORM_ABSOLUTE | wxPATH_NORM_TILDE, cwd, format); } + + // If the path is a symbolic link (Unix-only), indicate that all + // filesystem operations on this path should be performed on the link + // itself and not on the file it points to, as is the case by default. + // + // No effect if this is not a symbolic link. + void DontFollowLink() + { + m_dontFollowLinks = true; + } + + // If the path is a symbolic link (Unix-only), returns whether various + // file operations should act on the link itself, or on its target. + // + // This does not test if the path is really a symlink or not. + bool ShouldFollowLink() const + { + return !m_dontFollowLinks; + } + #if defined(__WIN32__) && !defined(__WXWINCE__) && wxUSE_OLE // if the path is a shortcut, return the target and optionally, // the arguments @@ -454,16 +482,16 @@ public: // Dir accessors size_t GetDirCount() const { return m_dirs.size(); } - void AppendDir(const wxString& dir); + bool AppendDir(const wxString& dir); void PrependDir(const wxString& dir); - void InsertDir(size_t before, const wxString& dir); + bool InsertDir(size_t before, const wxString& dir); void RemoveDir(size_t pos); void RemoveLastDir() { RemoveDir(GetDirCount() - 1); } // Other accessors void SetExt( const wxString &ext ) { m_ext = ext; m_hasExt = !m_ext.empty(); } - void ClearExt() { m_ext = wxEmptyString; m_hasExt = false; } - void SetEmptyExt() { m_ext = wxT(""); m_hasExt = true; } + void ClearExt() { m_ext.clear(); m_hasExt = false; } + void SetEmptyExt() { m_ext.clear(); m_hasExt = true; } wxString GetExt() const { return m_ext; } bool HasExt() const { return m_hasExt; } @@ -555,12 +583,12 @@ public: // returns the size in a human readable form wxString - GetHumanReadableSize(const wxString& nullsize = _("Not available"), + GetHumanReadableSize(const wxString& nullsize = wxGetTranslation("Not available"), int precision = 1, wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL) const; static wxString GetHumanReadableSize(const wxULongLong& sz, - const wxString& nullsize = _("Not available"), + const wxString& nullsize = wxGetTranslation("Not available"), int precision = 1, wxSizeConvention conv = wxSIZE_CONV_TRADITIONAL); #endif // wxUSE_LONGLONG @@ -606,6 +634,11 @@ private: // the difference is important as file with name "foo" and without // extension has full name "foo" while with empty extension it is "foo." bool m_hasExt; + + // by default, symlinks are dereferenced but this flag can be set with + // DontFollowLink() to change this and make different operations work on + // this file path itself instead of the target of the symlink + bool m_dontFollowLinks; }; #endif // _WX_FILENAME_H_ diff --git a/Externals/wxWidgets3/include/wx/filepicker.h b/Externals/wxWidgets3/include/wx/filepicker.h index 7796ac33b3..5264ddb3ea 100644 --- a/Externals/wxWidgets3/include/wx/filepicker.h +++ b/Externals/wxWidgets3/include/wx/filepicker.h @@ -5,7 +5,6 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Francesco Montorsi -// RCS-ID: $Id: filepicker.h 70043 2011-12-18 12:34:47Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -59,8 +58,8 @@ private: DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFileDirPickerEvent) }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEvent ); // ---------------------------------------------------------------------------- // event types and macros @@ -72,9 +71,9 @@ typedef void (wxEvtHandler::*wxFileDirPickerEventFunction)(wxFileDirPickerEvent& wxEVENT_HANDLER_CAST(wxFileDirPickerEventFunction, func) #define EVT_FILEPICKER_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FILEPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FILEPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) #define EVT_DIRPICKER_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_DIRPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_DIRPICKER_CHANGED, id, wxFileDirPickerEventHandler(fn)) // ---------------------------------------------------------------------------- // wxFileDirPickerWidgetBase: a generic abstract interface which must be @@ -129,7 +128,7 @@ protected: // requires that all classes being mapped as wx{File|Dir}PickerWidget have the // same prototype for the contructor... // since GTK >= 2.6, there is GtkFileButton -#if defined(__WXGTK26__) && !defined(__WXUNIVERSAL__) +#if defined(__WXGTK20__) && !defined(__WXUNIVERSAL__) #include "wx/gtk/filepicker.h" #define wxFilePickerWidget wxFileButton #define wxDirPickerWidget wxDirButton @@ -148,7 +147,7 @@ protected: class WXDLLIMPEXP_CORE wxFileDirPickerCtrlBase : public wxPickerBase { public: - wxFileDirPickerCtrlBase() : m_bIgnoreNextTextCtrlUpdate(false) {} + wxFileDirPickerCtrlBase() {} protected: // NB: no default values since this function will never be used @@ -183,11 +182,6 @@ public: // internal functions // event handler for our picker void OnFileDirChange(wxFileDirPickerEvent &); - // Returns TRUE if the current path is a valid one - // (i.e. a valid file for a wxFilePickerWidget or a valid - // folder for a wxDirPickerWidget). - virtual bool CheckPath(const wxString &str) const = 0; - // TRUE if any textctrl change should update the current working directory virtual bool IsCwdToUpdate() const = 0; @@ -209,9 +203,6 @@ protected: protected: - // true if the next UpdateTextCtrl() call is to ignore - bool m_bIgnoreNextTextCtrlUpdate; - // m_picker object as wxFileDirPickerWidgetBase interface wxFileDirPickerWidgetBase *m_pickerIface; }; @@ -275,9 +266,6 @@ public: public: // overrides - // return true if the given path is valid for this control - bool CheckPath(const wxString& path) const; - // return the text control value in canonical form wxString GetTextCtrlValue() const; @@ -285,11 +273,11 @@ public: // overrides { return HasFlag(wxFLP_CHANGE_DIR); } wxEventType GetEventType() const - { return wxEVT_COMMAND_FILEPICKER_CHANGED; } + { return wxEVT_FILEPICKER_CHANGED; } virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) { - sender->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, + sender->Connect( wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( wxFileDirPickerCtrlBase::OnFileDirChange ), NULL, eventSink ); } @@ -379,19 +367,17 @@ public: public: // overrides - bool CheckPath(const wxString &path) const; - wxString GetTextCtrlValue() const; bool IsCwdToUpdate() const { return HasFlag(wxDIRP_CHANGE_DIR); } wxEventType GetEventType() const - { return wxEVT_COMMAND_DIRPICKER_CHANGED; } + { return wxEVT_DIRPICKER_CHANGED; } virtual void DoConnect( wxControl *sender, wxFileDirPickerCtrlBase *eventSink ) { - sender->Connect( wxEVT_COMMAND_DIRPICKER_CHANGED, + sender->Connect( wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEventHandler( wxFileDirPickerCtrlBase::OnFileDirChange ), NULL, eventSink ); } @@ -426,5 +412,9 @@ private: #endif // wxUSE_DIRPICKERCTRL +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_FILEPICKER_CHANGED wxEVT_FILEPICKER_CHANGED +#define wxEVT_COMMAND_DIRPICKER_CHANGED wxEVT_DIRPICKER_CHANGED + #endif // _WX_FILEDIRPICKER_H_BASE_ diff --git a/Externals/wxWidgets3/include/wx/filesys.h b/Externals/wxWidgets3/include/wx/filesys.h index d9d40edeaf..3bd6e426c7 100644 --- a/Externals/wxWidgets3/include/wx/filesys.h +++ b/Externals/wxWidgets3/include/wx/filesys.h @@ -3,7 +3,6 @@ // Purpose: class for opening files - virtual file system // Author: Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik -// RCS-ID: $Id: filesys.h 58757 2009-02-08 11:45:59Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -293,7 +292,20 @@ protected: static wxString ms_root; }; +// Stream reading data from wxFSFile: this allows to use virtual files with any +// wx functions accepting streams. +class WXDLLIMPEXP_BASE wxFSInputStream : public wxWrapperInputStream +{ +public: + // Notice that wxFS_READ is implied in flags. + wxFSInputStream(const wxString& filename, int flags = 0); + virtual ~wxFSInputStream(); +private: + wxFSFile* m_file; + + wxDECLARE_NO_COPY_CLASS(wxFSInputStream); +}; #endif // wxUSE_FILESYSTEM diff --git a/Externals/wxWidgets3/include/wx/flags.h b/Externals/wxWidgets3/include/wx/flags.h index 1b15bbe4f4..c45bafabdc 100644 --- a/Externals/wxWidgets3/include/wx/flags.h +++ b/Externals/wxWidgets3/include/wx/flags.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 27/07/03 -// RCS-ID: $Id: flags.h 66555 2011-01-04 08:31:53Z SC $ // Copyright: (c) 2003 Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/fmappriv.h b/Externals/wxWidgets3/include/wx/fmappriv.h index 658ad6350d..6637088626 100644 --- a/Externals/wxWidgets3/include/wx/fmappriv.h +++ b/Externals/wxWidgets3/include/wx/fmappriv.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 21.06.2003 (extracted from common/fontmap.cpp) -// RCS-ID: $Id: fmappriv.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 1999-2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/font.h b/Externals/wxWidgets3/include/wx/font.h index 6e3c5237ab..10a6f0e5d7 100644 --- a/Externals/wxWidgets3/include/wx/font.h +++ b/Externals/wxWidgets3/include/wx/font.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 20.09.99 -// RCS-ID: $Id: font.h 70446 2012-01-23 11:28:28Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -111,6 +110,145 @@ enum wxFontFlag wxFONTFLAG_STRIKETHROUGH }; +// ---------------------------------------------------------------------------- +// wxFontInfo describes a wxFont +// ---------------------------------------------------------------------------- + +class wxFontInfo +{ +public: + // Default ctor uses the default font size appropriate for the current + // platform. + wxFontInfo() + { InitPointSize(-1); } + + // These ctors specify the font size, either in points or in pixels. + wxEXPLICIT wxFontInfo(int pointSize) + { InitPointSize(pointSize); } + wxEXPLICIT wxFontInfo(const wxSize& pixelSize) : m_pixelSize(pixelSize) + { Init(); } + + // Setters for the various attributes. All of them return the object itself + // so that the calls to them could be chained. + wxFontInfo& Family(wxFontFamily family) + { m_family = family; return *this; } + wxFontInfo& FaceName(const wxString& faceName) + { m_faceName = faceName; return *this; } + + wxFontInfo& Bold(bool bold = true) + { SetFlag(wxFONTFLAG_BOLD, bold); return *this; } + wxFontInfo& Light(bool light = true) + { SetFlag(wxFONTFLAG_LIGHT, light); return *this; } + + wxFontInfo& Italic(bool italic = true) + { SetFlag(wxFONTFLAG_ITALIC, italic); return *this; } + wxFontInfo& Slant(bool slant = true) + { SetFlag(wxFONTFLAG_SLANT, slant); return *this; } + + wxFontInfo& AntiAliased(bool antiAliased = true) + { SetFlag(wxFONTFLAG_ANTIALIASED, antiAliased); return *this; } + wxFontInfo& Underlined(bool underlined = true) + { SetFlag(wxFONTFLAG_UNDERLINED, underlined); return *this; } + wxFontInfo& Strikethrough(bool strikethrough = true) + { SetFlag(wxFONTFLAG_STRIKETHROUGH, strikethrough); return *this; } + + wxFontInfo& Encoding(wxFontEncoding encoding) + { m_encoding = encoding; return *this; } + + + // Set all flags at once. + wxFontInfo& AllFlags(int flags) + { m_flags = flags; return *this; } + + + // Accessors are mostly meant to be used by wxFont itself to extract the + // various pieces of the font description. + + bool IsUsingSizeInPixels() const { return m_pixelSize != wxDefaultSize; } + int GetPointSize() const { return m_pointSize; } + wxSize GetPixelSize() const { return m_pixelSize; } + wxFontFamily GetFamily() const { return m_family; } + const wxString& GetFaceName() const { return m_faceName; } + + wxFontStyle GetStyle() const + { + return m_flags & wxFONTFLAG_ITALIC + ? wxFONTSTYLE_ITALIC + : m_flags & wxFONTFLAG_SLANT + ? wxFONTSTYLE_SLANT + : wxFONTSTYLE_NORMAL; + } + + wxFontWeight GetWeight() const + { + return m_flags & wxFONTFLAG_LIGHT + ? wxFONTWEIGHT_LIGHT + : m_flags & wxFONTFLAG_BOLD + ? wxFONTWEIGHT_BOLD + : wxFONTWEIGHT_NORMAL; + } + + bool IsAntiAliased() const + { + return (m_flags & wxFONTFLAG_ANTIALIASED) != 0; + } + + bool IsUnderlined() const + { + return (m_flags & wxFONTFLAG_UNDERLINED) != 0; + } + + bool IsStrikethrough() const + { + return (m_flags & wxFONTFLAG_STRIKETHROUGH) != 0; + } + + wxFontEncoding GetEncoding() const { return m_encoding; } + + + // Default copy ctor, assignment operator and dtor are OK. + +private: + // Common part of all ctor, initializing everything except the size (which + // is initialized by the ctors themselves). + void Init() + { + m_family = wxFONTFAMILY_DEFAULT; + m_flags = wxFONTFLAG_DEFAULT; + m_encoding = wxFONTENCODING_DEFAULT; + } + + void InitPointSize(int pointSize) + { + Init(); + + m_pointSize = pointSize; + m_pixelSize = wxDefaultSize; + } + + // Turn on or off the given bit in m_flags depending on the value of the + // boolean argument. + void SetFlag(int flag, bool on) + { + if ( on ) + m_flags |= flag; + else + m_flags &= ~flag; + } + + // The size information: if m_pixelSize is valid (!= wxDefaultSize), then + // it is used. Otherwise m_pointSize is used, taking into account that if + // it is == -1, it means that the platform dependent font size should be + // used. + int m_pointSize; + wxSize m_pixelSize; + + wxFontFamily m_family; + wxString m_faceName; + int m_flags; + wxFontEncoding m_encoding; +}; + // ---------------------------------------------------------------------------- // wxFontBase represents a font object // ---------------------------------------------------------------------------- @@ -124,6 +262,7 @@ public: derived classes should provide the following ctors: wxFont(); + wxFont(const wxFontInfo& info); wxFont(const wxString& nativeFontInfoString); wxFont(const wxNativeFontInfo& info); wxFont(int size, @@ -293,7 +432,7 @@ protected: virtual wxFontFamily DoGetFamily() const = 0; - // Helper functions to recover wxFONTSTYLE/wxFONTWEIGHT and underlined flg + // Helper functions to recover wxFONTSTYLE/wxFONTWEIGHT and underlined flag // values from flags containing a combination of wxFONTFLAG_XXX. static wxFontStyle GetStyleFromFlags(int flags) { @@ -318,6 +457,10 @@ protected: return (flags & wxFONTFLAG_UNDERLINED) != 0; } + static bool GetStrikethroughFromFlags(int flags) + { + return (flags & wxFONTFLAG_STRIKETHROUGH) != 0; + } private: // the currently default encoding: by default, it's the default system diff --git a/Externals/wxWidgets3/include/wx/fontdata.h b/Externals/wxWidgets3/include/wx/fontdata.h index c850dbc8db..87571ce940 100644 --- a/Externals/wxWidgets3/include/wx/fontdata.h +++ b/Externals/wxWidgets3/include/wx/fontdata.h @@ -1,7 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/fontdata.h // Author: Julian Smart -// RCS-ID: $Id: fontdata.h 66615 2011-01-07 05:26:57Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/fontdlg.h b/Externals/wxWidgets3/include/wx/fontdlg.h index b040d15e58..74a6e6fccf 100644 --- a/Externals/wxWidgets3/include/wx/fontdlg.h +++ b/Externals/wxWidgets3/include/wx/fontdlg.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 12.05.02 -// RCS-ID: $Id: fontdlg.h 66615 2011-01-07 05:26:57Z PC $ // Copyright: (c) 1997-2002 wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -37,8 +36,6 @@ public: bool Create(wxWindow *parent, const wxFontData& data) { InitFontData(&data); return Create(parent); } - virtual ~wxFontDialogBase(); - // retrieve the font data const wxFontData& GetFontData() const { return m_fontData; } wxFontData& GetFontData() { return m_fontData; } diff --git a/Externals/wxWidgets3/include/wx/fontenc.h b/Externals/wxWidgets3/include/wx/fontenc.h index 08ac5b6031..5263997ae9 100644 --- a/Externals/wxWidgets3/include/wx/fontenc.h +++ b/Externals/wxWidgets3/include/wx/fontenc.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29.03.00 -// RCS-ID: $Id: fontenc.h 65056 2010-07-23 23:32:40Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -65,6 +64,8 @@ enum wxFontEncoding wxFONTENCODING_CP1255, // WinHebrew wxFONTENCODING_CP1256, // WinArabic wxFONTENCODING_CP1257, // WinBaltic (same as Latin 7) + wxFONTENCODING_CP1258, // WinVietnamese + wxFONTENCODING_CP1361, // Johab Korean character set. wxFONTENCODING_CP12_MAX, wxFONTENCODING_UTF7, // UTF-7 Unicode encoding @@ -151,7 +152,11 @@ enum wxFontEncoding wxFONTENCODING_SHIFT_JIS = wxFONTENCODING_CP932, // Shift JIS // Korean (CP 949 not actually the same but close enough) - wxFONTENCODING_EUC_KR = wxFONTENCODING_CP949 + wxFONTENCODING_EUC_KR = wxFONTENCODING_CP949, + wxFONTENCODING_JOHAB = wxFONTENCODING_CP1361, + + // Vietnamese + wxFONTENCODING_VIETNAMESE = wxFONTENCODING_CP1258 }; #endif // _WX_FONTENC_H_ diff --git a/Externals/wxWidgets3/include/wx/fontenum.h b/Externals/wxWidgets3/include/wx/fontenum.h index e3b6867128..782dc7fd9e 100644 --- a/Externals/wxWidgets3/include/wx/fontenum.h +++ b/Externals/wxWidgets3/include/wx/fontenum.h @@ -5,7 +5,6 @@ // Modified by: extended to enumerate more than just font facenames and works // not only on Windows now (VZ) // Created: 04/01/98 -// RCS-ID: $Id: fontenum.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Julian Smart, Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/fontmap.h b/Externals/wxWidgets3/include/wx/fontmap.h index 368d9beb97..c640daa83f 100644 --- a/Externals/wxWidgets3/include/wx/fontmap.h +++ b/Externals/wxWidgets3/include/wx/fontmap.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 04.11.99 -// RCS-ID: $Id: fontmap.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/fontpicker.h b/Externals/wxWidgets3/include/wx/fontpicker.h index 75c1d961ec..1bacc3a4a0 100644 --- a/Externals/wxWidgets3/include/wx/fontpicker.h +++ b/Externals/wxWidgets3/include/wx/fontpicker.h @@ -5,7 +5,6 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Francesco Montorsi -// RCS-ID: $Id: fontpicker.h 58718 2009-02-07 18:59:25Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -100,8 +99,7 @@ class WXDLLIMPEXP_CORE wxFontPickerCtrl : public wxPickerBase { public: wxFontPickerCtrl() - : m_bIgnoreNextTextCtrlUpdate(false), - m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE) + : m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE) { } @@ -116,8 +114,7 @@ public: long style = wxFNTP_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxFontPickerCtrlNameStr) - : m_bIgnoreNextTextCtrlUpdate(false), - m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE) + : m_nMaxPointSize(wxFNTP_MAXPOINT_SIZE) { Create(parent, id, initial, pos, size, style, validator, name); } @@ -165,9 +162,6 @@ protected: long GetPickerStyle(long style) const { return (style & (wxFNTP_FONTDESC_AS_LABEL|wxFNTP_USEFONT_FOR_LABEL)); } - // true if the next UpdateTextCtrl() call is to ignore - bool m_bIgnoreNextTextCtrlUpdate; - // the maximum pointsize allowed to the user unsigned int m_nMaxPointSize; @@ -180,14 +174,14 @@ private: // wxFontPickerEvent: used by wxFontPickerCtrl only // ---------------------------------------------------------------------------- -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FONTPICKER_CHANGED, wxFontPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FONTPICKER_CHANGED, wxFontPickerEvent ); class WXDLLIMPEXP_CORE wxFontPickerEvent : public wxCommandEvent { public: wxFontPickerEvent() {} wxFontPickerEvent(wxObject *generator, int id, const wxFont &f) - : wxCommandEvent(wxEVT_COMMAND_FONTPICKER_CHANGED, id), + : wxCommandEvent(wxEVT_FONTPICKER_CHANGED, id), m_font(f) { SetEventObject(generator); @@ -215,7 +209,10 @@ typedef void (wxEvtHandler::*wxFontPickerEventFunction)(wxFontPickerEvent&); wxEVENT_HANDLER_CAST(wxFontPickerEventFunction, func) #define EVT_FONTPICKER_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_FONTPICKER_CHANGED, id, wxFontPickerEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_FONTPICKER_CHANGED, id, wxFontPickerEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_FONTPICKER_CHANGED wxEVT_FONTPICKER_CHANGED #endif // wxUSE_FONTPICKERCTRL diff --git a/Externals/wxWidgets3/include/wx/fontutil.h b/Externals/wxWidgets3/include/wx/fontutil.h index 232ef8a8e3..caad365473 100644 --- a/Externals/wxWidgets3/include/wx/fontutil.h +++ b/Externals/wxWidgets3/include/wx/fontutil.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 05.11.99 -// RCS-ID: $Id: fontutil.h 70446 2012-01-23 11:28:28Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -71,6 +70,11 @@ class WXDLLIMPEXP_CORE wxNativeFontInfo public: #if wxUSE_PANGO PangoFontDescription *description; + + // Pango font description doesn't have these attributes, so we store them + // separately and handle them ourselves in {To,From}String() methods. + bool m_underlined; + bool m_strikethrough; #elif defined(_WX_X_FONTLIKE) // the members can't be accessed directly as we only parse the // xFontName on demand diff --git a/Externals/wxWidgets3/include/wx/frame.h b/Externals/wxWidgets3/include/wx/frame.h index 396dd98f5a..41927f775a 100644 --- a/Externals/wxWidgets3/include/wx/frame.h +++ b/Externals/wxWidgets3/include/wx/frame.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 15.11.99 -// RCS-ID: $Id: frame.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -205,6 +204,10 @@ protected: // frame virtual void AttachMenuBar(wxMenuBar *menubar); + // Return true if we should update the menu item state from idle event + // handler or false if we should delay it until the menu is opened. + static bool ShouldUpdateMenuFromIdle(); + wxMenuBar *m_frameMenuBar; #endif // wxUSE_MENUS diff --git a/Externals/wxWidgets3/include/wx/fs_arc.h b/Externals/wxWidgets3/include/wx/fs_arc.h index d4957504c3..e65b8fc7b6 100644 --- a/Externals/wxWidgets3/include/wx/fs_arc.h +++ b/Externals/wxWidgets3/include/wx/fs_arc.h @@ -3,7 +3,6 @@ // Purpose: Archive file system // Author: Vaclav Slavik, Mike Wetherell // Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell -// CVS-ID: $Id: fs_arc.h 58757 2009-02-08 11:45:59Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/fs_filter.h b/Externals/wxWidgets3/include/wx/fs_filter.h index 807eccbd6f..8e8afda4e2 100644 --- a/Externals/wxWidgets3/include/wx/fs_filter.h +++ b/Externals/wxWidgets3/include/wx/fs_filter.h @@ -3,7 +3,6 @@ // Purpose: Filter file system handler // Author: Mike Wetherell // Copyright: (c) 2006 Mike Wetherell -// CVS-ID: $Id: fs_filter.h 58757 2009-02-08 11:45:59Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/fs_zip.h b/Externals/wxWidgets3/include/wx/fs_zip.h index 8d39e9fc4d..197a46a5ef 100644 --- a/Externals/wxWidgets3/include/wx/fs_zip.h +++ b/Externals/wxWidgets3/include/wx/fs_zip.h @@ -3,7 +3,6 @@ // Purpose: wxZipFSHandler typedef for compatibility // Author: Mike Wetherell // Copyright: (c) 2006 Mike Wetherell -// CVS-ID: $Id: fs_zip.h 42713 2006-10-30 11:56:12Z ABX $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/fswatcher.h b/Externals/wxWidgets3/include/wx/fswatcher.h index 239a5b4dad..2955407864 100644 --- a/Externals/wxWidgets3/include/wx/fswatcher.h +++ b/Externals/wxWidgets3/include/wx/fswatcher.h @@ -3,7 +3,6 @@ // Purpose: wxFileSystemWatcherBase // Author: Bartosz Bekier // Created: 2009-05-23 -// RCS-ID: $Id: fswatcher.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -44,15 +43,18 @@ enum wxFSW_EVENT_RENAME = 0x04, wxFSW_EVENT_MODIFY = 0x08, wxFSW_EVENT_ACCESS = 0x10, + wxFSW_EVENT_ATTRIB = 0x20, // Currently this is wxGTK-only // error events - wxFSW_EVENT_WARNING = 0x20, - wxFSW_EVENT_ERROR = 0x40, - + wxFSW_EVENT_WARNING = 0x40, + wxFSW_EVENT_ERROR = 0x80, wxFSW_EVENT_ALL = wxFSW_EVENT_CREATE | wxFSW_EVENT_DELETE | wxFSW_EVENT_RENAME | wxFSW_EVENT_MODIFY | - wxFSW_EVENT_ACCESS | + wxFSW_EVENT_ACCESS | wxFSW_EVENT_ATTRIB | wxFSW_EVENT_WARNING | wxFSW_EVENT_ERROR +#ifdef wxHAS_INOTIFY + ,wxFSW_EVENT_UNMOUNT = 0x2000 +#endif }; // Type of the path watched, used only internally for now. @@ -75,7 +77,7 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_FSWATCHER, class WXDLLIMPEXP_BASE wxFileSystemWatcherEvent: public wxEvent { public: - wxFileSystemWatcherEvent(int changeType, int watchid = wxID_ANY) : + wxFileSystemWatcherEvent(int changeType = 0, int watchid = wxID_ANY) : wxEvent(watchid, wxEVT_FSWATCHER), m_changeType(changeType) { @@ -149,7 +151,7 @@ public: virtual wxEventCategory GetEventCategory() const { - // TODO this has to be merged with "similiar" categories and changed + // TODO this has to be merged with "similar" categories and changed return wxEVT_CATEGORY_UNKNOWN; } @@ -176,6 +178,8 @@ protected: wxFileName m_path; wxFileName m_newPath; wxString m_errorMsg; +private: + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxFileSystemWatcherEvent) }; typedef void (wxEvtHandler::*wxFileSystemWatcherEventFunction) @@ -196,12 +200,16 @@ class wxFSWatchInfo { public: wxFSWatchInfo() : - m_events(-1), m_type(wxFSWPath_None) + m_events(-1), m_type(wxFSWPath_None), m_refcount(-1) { } - wxFSWatchInfo(const wxString& path, int events, wxFSWPathType type) : - m_path(path), m_events(events), m_type(type) + wxFSWatchInfo(const wxString& path, + int events, + wxFSWPathType type, + const wxString& filespec = wxString()) : + m_path(path), m_filespec(filespec), m_events(events), m_type(type), + m_refcount(1) { } @@ -210,6 +218,8 @@ public: return m_path; } + const wxString& GetFilespec() const { return m_filespec; } + int GetFlags() const { return m_events; @@ -220,10 +230,27 @@ public: return m_type; } + // Reference counting of watch entries is used to avoid watching the same + // file system path multiple times (this can happen even accidentally, e.g. + // when you have a recursive watch and then decide to watch some file or + // directory under it separately). + int IncRef() + { + return ++m_refcount; + } + + int DecRef() + { + wxASSERT_MSG( m_refcount > 0, wxS("Trying to decrement a zero count") ); + return --m_refcount; + } + protected: wxString m_path; + wxString m_filespec; // For tree watches, holds any filespec to apply int m_events; wxFSWPathType m_type; + int m_refcount; }; WX_DECLARE_STRING_HASH_MAP(wxFSWatchInfo, wxFSWatchInfoMap); @@ -260,7 +287,7 @@ public: * of particular type. */ virtual bool AddTree(const wxFileName& path, int events = wxFSW_EVENT_ALL, - const wxString& filter = wxEmptyString); + const wxString& filespec = wxEmptyString); /** * Removes path from the list of watched paths. @@ -305,6 +332,14 @@ public: m_owner = handler; } + + // This is a semi-private function used by wxWidgets itself only. + // + // Delegates the real work of adding the path to wxFSWatcherImpl::Add() and + // updates m_watches if the new path was successfully added. + bool AddAny(const wxFileName& path, int events, wxFSWPathType type, + const wxString& filespec = wxString()); + protected: static wxString GetCanonicalPath(const wxFileName& path) @@ -320,10 +355,6 @@ protected: return path_copy.GetFullPath(); } - // Delegates the real work of adding the path to wxFSWatcherImpl::Add() and - // updates m_watches if the new path was successfully added. - bool DoAdd(const wxFileName& path, int events, wxFSWPathType type); - wxFSWatchInfoMap m_watches; // path=>wxFSWatchInfo map wxFSWatcherImpl* m_service; // file system events service diff --git a/Externals/wxWidgets3/include/wx/gauge.h b/Externals/wxWidgets3/include/wx/gauge.h index cec0dc48b0..93ae86fcc4 100644 --- a/Externals/wxWidgets3/include/wx/gauge.h +++ b/Externals/wxWidgets3/include/wx/gauge.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 20.02.01 -// RCS-ID: $Id: gauge.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 1996-2001 wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gbsizer.h b/Externals/wxWidgets3/include/wx/gbsizer.h index 51dc057d3d..dea46c15ab 100644 --- a/Externals/wxWidgets3/include/wx/gbsizer.h +++ b/Externals/wxWidgets3/include/wx/gbsizer.h @@ -6,7 +6,6 @@ // // Author: Robin Dunn // Created: 03-Nov-2003 -// RCS-ID: $Id: gbsizer.h 69970 2011-12-10 04:34:06Z RD $ // Copyright: (c) Robin Dunn // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -67,6 +66,14 @@ public: // default copy ctor and assignment operator are okay. + // Factor constructor creating an invalid wxGBSpan: this is mostly supposed + // to be used as return value for functions returning wxGBSpan in case of + // errors. + static wxGBSpan Invalid() + { + return wxGBSpan(NULL); + } + int GetRowspan() const { return m_rowspan; } int GetColspan() const { return m_colspan; } void SetRowspan(int rowspan) @@ -87,6 +94,13 @@ public: bool operator!=(const wxGBSpan& o) const { return !(*this == o); } private: + // This private ctor is used by Invalid() only. + wxGBSpan(struct InvalidCtorTag*) + { + m_rowspan = + m_colspan = -1; + } + void Init() { m_rowspan = diff --git a/Externals/wxWidgets3/include/wx/gdicmn.h b/Externals/wxWidgets3/include/wx/gdicmn.h index d69b5f89be..6ce652d49f 100644 --- a/Externals/wxWidgets3/include/wx/gdicmn.h +++ b/Externals/wxWidgets3/include/wx/gdicmn.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: gdicmn.h 70789 2012-03-04 00:28:58Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -174,7 +173,7 @@ enum wxStockCursor wxIcon *icon = new wxIcon(sample_xpm); // On wxGTK/Linux */ -#ifdef __WXMSW__ +#ifdef __WINDOWS__ // Load from a resource #define wxICON(X) wxIcon(wxT(#X)) #elif defined(__WXPM__) @@ -204,7 +203,7 @@ enum wxStockCursor under Unix bitmaps live in XPMs and under Windows they're in ressources. */ -#if defined(__WXMSW__) || defined(__WXPM__) +#if defined(__WINDOWS__) || defined(__WXPM__) #define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_BMP_RESOURCE) #elif defined(__WXGTK__) || \ defined(__WXMOTIF__) || \ @@ -218,6 +217,28 @@ enum wxStockCursor #define wxBITMAP(name) wxBitmap(name##_xpm, wxBITMAP_TYPE_XPM) #endif // platform +// Macro for creating wxBitmap from in-memory PNG data. +// +// It reads PNG data from name_png static byte arrays that can be created using +// e.g. misc/scripts/png2c.py. +// +// This macro exists mostly as a helper for wxBITMAP_PNG() below but also +// because it's slightly more convenient to use than NewFromPNGData() directly. +#define wxBITMAP_PNG_FROM_DATA(name) \ + wxBitmap::NewFromPNGData(name##_png, WXSIZEOF(name##_png)) + +// Similar to wxBITMAP but used for the bitmaps in PNG format. +// +// Under Windows they should be embedded into the resource file using RT_RCDATA +// resource type and under OS X the PNG file with the specified name must be +// available in the resource subdirectory of the bundle. Elsewhere, this is +// exactly the same thing as wxBITMAP_PNG_FROM_DATA() described above. +#if defined(__WINDOWS__) || defined(__WXOSX__) + #define wxBITMAP_PNG(name) wxBitmap(wxS(#name), wxBITMAP_TYPE_PNG_RESOURCE) +#else + #define wxBITMAP_PNG(name) wxBITMAP_PNG_FROM_DATA(name) +#endif + // =========================================================================== // classes // =========================================================================== @@ -255,6 +276,13 @@ public: { if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; } void DecTo(const wxSize& sz) { if ( sz.x < x ) x = sz.x; if ( sz.y < y ) y = sz.y; } + void DecToIfSpecified(const wxSize& sz) + { + if ( sz.x != wxDefaultCoord && sz.x < x ) + x = sz.x; + if ( sz.y != wxDefaultCoord && sz.y < y ) + y = sz.y; + } void IncBy(int dx, int dy) { x += dx; y += dy; } void IncBy(const wxPoint& pt); @@ -352,27 +380,27 @@ inline wxSize operator/(const wxSize& s, long i) inline wxSize operator*(const wxSize& s, long i) { - return wxSize(s.x * i, s.y * i); + return wxSize(int(s.x * i), int(s.y * i)); } inline wxSize operator*(long i, const wxSize& s) { - return wxSize(s.x * i, s.y * i); + return wxSize(int(s.x * i), int(s.y * i)); } inline wxSize operator/(const wxSize& s, unsigned long i) { - return wxSize(s.x / i, s.y / i); + return wxSize(int(s.x / i), int(s.y / i)); } inline wxSize operator*(const wxSize& s, unsigned long i) { - return wxSize(s.x * i, s.y * i); + return wxSize(int(s.x * i), int(s.y * i)); } inline wxSize operator*(unsigned long i, const wxSize& s) { - return wxSize(s.x * i, s.y * i); + return wxSize(int(s.x * i), int(s.y * i)); } inline wxSize operator*(const wxSize& s, double i) @@ -626,12 +654,12 @@ inline wxPoint operator/(const wxPoint& s, long i) inline wxPoint operator*(const wxPoint& s, long i) { - return wxPoint(s.x * i, s.y * i); + return wxPoint(int(s.x * i), int(s.y * i)); } inline wxPoint operator*(long i, const wxPoint& s) { - return wxPoint(s.x * i, s.y * i); + return wxPoint(int(s.x * i), int(s.y * i)); } inline wxPoint operator/(const wxPoint& s, unsigned long i) @@ -641,12 +669,12 @@ inline wxPoint operator/(const wxPoint& s, unsigned long i) inline wxPoint operator*(const wxPoint& s, unsigned long i) { - return wxPoint(s.x * i, s.y * i); + return wxPoint(int(s.x * i), int(s.y * i)); } inline wxPoint operator*(unsigned long i, const wxPoint& s) { - return wxPoint(s.x * i, s.y * i); + return wxPoint(int(s.x * i), int(s.y * i)); } inline wxPoint operator*(const wxPoint& s, double i) diff --git a/Externals/wxWidgets3/include/wx/gdiobj.h b/Externals/wxWidgets3/include/wx/gdiobj.h index 5e07df0d81..903dfe083d 100644 --- a/Externals/wxWidgets3/include/wx/gdiobj.h +++ b/Externals/wxWidgets3/include/wx/gdiobj.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: gdiobj.h 70345 2012-01-15 01:05:28Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/aboutdlgg.h b/Externals/wxWidgets3/include/wx/generic/aboutdlgg.h index f5b1365953..36e0cad438 100644 --- a/Externals/wxWidgets3/include/wx/generic/aboutdlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/aboutdlgg.h @@ -3,7 +3,6 @@ // Purpose: generic wxAboutBox() implementation // Author: Vadim Zeitlin // Created: 2006-10-07 -// RCS-ID: $Id: aboutdlgg.h 70413 2012-01-20 22:11:32Z VZ $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/accel.h b/Externals/wxWidgets3/include/wx/generic/accel.h index d0d76f7bf0..44f8e07e83 100644 --- a/Externals/wxWidgets3/include/wx/generic/accel.h +++ b/Externals/wxWidgets3/include/wx/generic/accel.h @@ -2,7 +2,6 @@ // Name: wx/generic/accel.h // Purpose: wxAcceleratorTable class // Author: Robert Roebling -// RCS-ID: $Id: accel.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/animate.h b/Externals/wxWidgets3/include/wx/generic/animate.h index 16562ce351..818daf890c 100644 --- a/Externals/wxWidgets3/include/wx/generic/animate.h +++ b/Externals/wxWidgets3/include/wx/generic/animate.h @@ -4,7 +4,6 @@ // Author: Julian Smart and Guillermo Rodriguez Garcia // Modified by: Francesco Montorsi // Created: 13/8/99 -// RCS-ID: $Id: animate.h 53629 2008-05-17 22:51:52Z VZ $ // Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/bmpcbox.h b/Externals/wxWidgets3/include/wx/generic/bmpcbox.h index 851fb971d4..d5e5cbb169 100644 --- a/Externals/wxWidgets3/include/wx/generic/bmpcbox.h +++ b/Externals/wxWidgets3/include/wx/generic/bmpcbox.h @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: Aug-30-2006 -// RCS-ID: $Id: bmpcbox.h 54382 2008-06-27 13:47:45Z RR $ // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/busyinfo.h b/Externals/wxWidgets3/include/wx/generic/busyinfo.h index b656f99760..7f56edb26d 100644 --- a/Externals/wxWidgets3/include/wx/generic/busyinfo.h +++ b/Externals/wxWidgets3/include/wx/generic/busyinfo.h @@ -3,7 +3,6 @@ // Purpose: Information window (when app is busy) // Author: Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik -// RCS-ID: $Id: busyinfo.h 62789 2009-12-05 19:57:58Z PC $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/buttonbar.h b/Externals/wxWidgets3/include/wx/generic/buttonbar.h index 91443dbf14..e933a3ca2c 100644 --- a/Externals/wxWidgets3/include/wx/generic/buttonbar.h +++ b/Externals/wxWidgets3/include/wx/generic/buttonbar.h @@ -4,7 +4,6 @@ // Author: Julian Smart, after Robert Roebling, Vadim Zeitlin, SciTech // Modified by: // Created: 2006-04-13 -// Id: $Id: buttonbar.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart, Robert Roebling, Vadim Zeitlin, // SciTech Software, Inc. // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/generic/calctrlg.h b/Externals/wxWidgets3/include/wx/generic/calctrlg.h index f7af5fa97c..8e430b6231 100644 --- a/Externals/wxWidgets3/include/wx/generic/calctrlg.h +++ b/Externals/wxWidgets3/include/wx/generic/calctrlg.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29.12.99 -// RCS-ID: $Id: calctrlg.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/caret.h b/Externals/wxWidgets3/include/wx/generic/caret.h index 99f78ddd59..67041cf20d 100644 --- a/Externals/wxWidgets3/include/wx/generic/caret.h +++ b/Externals/wxWidgets3/include/wx/generic/caret.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin (original code by Robert Roebling) // Modified by: // Created: 25.05.99 -// RCS-ID: $Id: caret.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/choicdgg.h b/Externals/wxWidgets3/include/wx/generic/choicdgg.h index 431c686b59..2d92b44276 100644 --- a/Externals/wxWidgets3/include/wx/generic/choicdgg.h +++ b/Externals/wxWidgets3/include/wx/generic/choicdgg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: 03.11.00: VZ to add wxArrayString and multiple sel functions // Created: 01/02/97 -// RCS-ID: $Id: choicdgg.h 70642 2012-02-20 21:56:18Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/clrpickerg.h b/Externals/wxWidgets3/include/wx/generic/clrpickerg.h index 4012a9cc75..de32125e00 100644 --- a/Externals/wxWidgets3/include/wx/generic/clrpickerg.h +++ b/Externals/wxWidgets3/include/wx/generic/clrpickerg.h @@ -5,7 +5,6 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Vadim Zeitlin, Francesco Montorsi -// RCS-ID: $Id: clrpickerg.h 66615 2011-01-07 05:26:57Z PC $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/collpaneg.h b/Externals/wxWidgets3/include/wx/generic/collpaneg.h index e06b361b18..ec0777115d 100644 --- a/Externals/wxWidgets3/include/wx/generic/collpaneg.h +++ b/Externals/wxWidgets3/include/wx/generic/collpaneg.h @@ -4,7 +4,6 @@ // Author: Francesco Montorsi // Modified by: // Created: 8/10/2006 -// RCS-ID: $Id: collpaneg.h 68366 2011-07-24 22:19:33Z VZ $ // Copyright: (c) Francesco Montorsi // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/colour.h b/Externals/wxWidgets3/include/wx/generic/colour.h index c07d8c77f0..5db020cacd 100644 --- a/Externals/wxWidgets3/include/wx/generic/colour.h +++ b/Externals/wxWidgets3/include/wx/generic/colour.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: colour.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/colrdlgg.h b/Externals/wxWidgets3/include/wx/generic/colrdlgg.h index 82248cbc1c..a83abd8ce3 100644 --- a/Externals/wxWidgets3/include/wx/generic/colrdlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/colrdlgg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: colrdlgg.h 66615 2011-01-07 05:26:57Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/combo.h b/Externals/wxWidgets3/include/wx/generic/combo.h index 2632d66618..f271563ae2 100644 --- a/Externals/wxWidgets3/include/wx/generic/combo.h +++ b/Externals/wxWidgets3/include/wx/generic/combo.h @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: Apr-30-2006 -// RCS-ID: $Id: combo.h 67255 2011-03-20 10:59:22Z JMS $ // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/ctrlsub.h b/Externals/wxWidgets3/include/wx/generic/ctrlsub.h index eda02c745b..0dd113dcf9 100644 --- a/Externals/wxWidgets3/include/wx/generic/ctrlsub.h +++ b/Externals/wxWidgets3/include/wx/generic/ctrlsub.h @@ -3,7 +3,6 @@ // Purpose: common functionality of wxItemContainer-derived controls // Author: Vadim Zeitlin // Created: 2007-07-25 -// RCS-ID: $Id: ctrlsub.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/custombgwin.h b/Externals/wxWidgets3/include/wx/generic/custombgwin.h index a7ed85d995..8004195498 100644 --- a/Externals/wxWidgets3/include/wx/generic/custombgwin.h +++ b/Externals/wxWidgets3/include/wx/generic/custombgwin.h @@ -3,7 +3,6 @@ // Purpose: Generic implementation of wxCustomBackgroundWindow. // Author: Vadim Zeitlin // Created: 2011-10-10 -// RCS-ID: $Id: custombgwin.h 69378 2011-10-11 17:07:43Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/dataview.h b/Externals/wxWidgets3/include/wx/generic/dataview.h index af16d65218..396c81ba6c 100644 --- a/Externals/wxWidgets3/include/wx/generic/dataview.h +++ b/Externals/wxWidgets3/include/wx/generic/dataview.h @@ -3,7 +3,6 @@ // Purpose: wxDataViewCtrl generic implementation header // Author: Robert Roebling // Modified By: Bo Yang -// Id: $Id: dataview.h 70717 2012-02-27 18:54:02Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -70,7 +69,7 @@ public: virtual bool IsSortKey() const { return m_sort; } - virtual void UnsetAsSortKey() { m_sort = false; UpdateDisplay(); } + virtual void UnsetAsSortKey(); virtual void SetSortOrder(bool ascending); @@ -182,6 +181,8 @@ public: virtual void SetFocus(); + virtual bool SetFont(const wxFont & font); + #if wxUSE_DRAG_AND_DROP virtual bool EnableDragSource( const wxDataFormat &format ); virtual bool EnableDropTarget( const wxDataFormat &format ); @@ -242,10 +243,18 @@ private: void UpdateColWidths(); wxDataViewColumnList m_cols; - // cached column best widths or 0 if not computed, values are for + // cached column best widths information, values are for // respective columns from m_cols and the arrays have same size - wxVector m_colsBestWidths; - // m_colsBestWidths partially invalid, needs recomputing + struct CachedColWidthInfo + { + CachedColWidthInfo() : width(0), dirty(true) {} + int width; // cached width or 0 if not computed + bool dirty; // column was invalidated, header needs updating + }; + wxVector m_colsBestWidths; + // This indicates that at least one entry in m_colsBestWidths has 'dirty' + // flag set. It's cheaper to check one flag in OnInternalIdle() than to + // iterate over m_colsBestWidths to check if anything needs to be done. bool m_colsDirty; wxDataViewModelNotifier *m_notifier; diff --git a/Externals/wxWidgets3/include/wx/generic/datectrl.h b/Externals/wxWidgets3/include/wx/generic/datectrl.h index fe7dd57299..47e656634b 100644 --- a/Externals/wxWidgets3/include/wx/generic/datectrl.h +++ b/Externals/wxWidgets3/include/wx/generic/datectrl.h @@ -4,7 +4,6 @@ // Author: Andreas Pflug // Modified by: // Created: 2005-01-19 -// RCS-ID: $Id: datectrl.h 70736 2012-02-28 14:41:30Z VZ $ // Copyright: (c) 2005 Andreas Pflug // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/dcpsg.h b/Externals/wxWidgets3/include/wx/generic/dcpsg.h index 19f374bf7a..ea423475d5 100644 --- a/Externals/wxWidgets3/include/wx/generic/dcpsg.h +++ b/Externals/wxWidgets3/include/wx/generic/dcpsg.h @@ -3,7 +3,6 @@ // Purpose: wxPostScriptDC class // Author: Julian Smart and others // Modified by: -// RCS-ID: $Id: dcpsg.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart and Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -94,6 +93,8 @@ public: virtual int GetResolution() const; virtual wxRect GetPaperRect() const; + virtual void* GetHandle() const { return NULL; } + protected: bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, wxFloodFillStyle style = wxFLOOD_SURFACE); @@ -103,11 +104,11 @@ protected: void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc); void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea); void DoDrawPoint(wxCoord x, wxCoord y); - void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); - void DoDrawPolygon(int n, wxPoint points[], + void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); + void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); - void DoDrawPolyPolygon(int n, int count[], wxPoint points[], + void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); diff --git a/Externals/wxWidgets3/include/wx/generic/dirctrlg.h b/Externals/wxWidgets3/include/wx/generic/dirctrlg.h index 5fcbcfb175..bdaa3df33b 100644 --- a/Externals/wxWidgets3/include/wx/generic/dirctrlg.h +++ b/Externals/wxWidgets3/include/wx/generic/dirctrlg.h @@ -7,7 +7,6 @@ // Author: Robert Roebling, Harm van der Heijden, Julian Smart et al // Modified by: // Created: 21/3/2000 -// RCS-ID: $Id: dirctrlg.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -39,10 +38,8 @@ enum wxDIRCTRL_DIR_ONLY = 0x0010, // When setting the default path, select the first file in the directory wxDIRCTRL_SELECT_FIRST = 0x0020, -#if WXWIN_COMPATIBILITY_2_8 - // Unused, for compatibility only + // Show the filter list wxDIRCTRL_SHOW_FILTERS = 0x0040, -#endif // WXWIN_COMPATIBILITY_2_8 // Use 3D borders on internal controls wxDIRCTRL_3D_INTERNAL = 0x0080, // Editable labels @@ -111,6 +108,8 @@ public: void OnCollapseItem(wxTreeEvent &event ); void OnBeginEditItem(wxTreeEvent &event ); void OnEndEditItem(wxTreeEvent &event ); + void OnTreeSelChange(wxTreeEvent &event); + void OnItemActivated(wxTreeEvent &event); void OnSize(wxSizeEvent &event ); // Try to expand as much of the given path as possible. @@ -161,6 +160,8 @@ public: // If the path string has been used (we're at the leaf), done is set to true virtual wxTreeItemId FindChild(wxTreeItemId parentId, const wxString& path, bool& done); + wxString GetPath(wxTreeItemId itemId) const; + // Resize the components of the control virtual void DoResize(); @@ -190,6 +191,7 @@ protected: private: void PopulateNode(wxTreeItemId node); + wxDirItemData* GetItemData(wxTreeItemId itemId); bool m_showHidden; wxTreeItemId m_rootId; @@ -207,6 +209,15 @@ private: wxDECLARE_NO_COPY_CLASS(wxGenericDirCtrl); }; +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRCTRL_SELECTIONCHANGED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRCTRL_FILEACTIVATED, wxTreeEvent ); + +#define wx__DECLARE_DIRCTRL_EVT(evt, id, fn) \ + wx__DECLARE_EVT1(wxEVT_DIRCTRL_ ## evt, id, wxTreeEventHandler(fn)) + +#define EVT_DIRCTRL_SELECTIONCHANGED(id, fn) wx__DECLARE_DIRCTRL_EVT(SELECTIONCHANGED, id, fn) +#define EVT_DIRCTRL_FILEACTIVATED(id, fn) wx__DECLARE_DIRCTRL_EVT(FILEACTIVATED, id, fn) + //----------------------------------------------------------------------------- // wxDirFilterListCtrl //----------------------------------------------------------------------------- @@ -299,5 +310,9 @@ extern WXDLLIMPEXP_DATA_CORE(wxFileIconsTable *) wxTheFileIconsTable; #endif // wxUSE_DIRDLG || wxUSE_FILEDLG || wxUSE_FILECTRL +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_DIRCTRL_SELECTIONCHANGED wxEVT_DIRCTRL_SELECTIONCHANGED +#define wxEVT_COMMAND_DIRCTRL_FILEACTIVATED wxEVT_DIRCTRL_FILEACTIVATED + #endif // _WX_DIRCTRLG_H_ diff --git a/Externals/wxWidgets3/include/wx/generic/dirdlgg.h b/Externals/wxWidgets3/include/wx/generic/dirdlgg.h index c5ce093f44..cc8b5a874b 100644 --- a/Externals/wxWidgets3/include/wx/generic/dirdlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/dirdlgg.h @@ -7,7 +7,6 @@ // Author: Robert Roebling, Harm van der Heijden, Julian Smart et al // Modified by: // Created: 21/3/2000 -// RCS-ID: $Id: dirdlgg.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Robert Roebling, Harm van der Heijden, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/dragimgg.h b/Externals/wxWidgets3/include/wx/generic/dragimgg.h index ff3b72e12b..9c90e163f2 100644 --- a/Externals/wxWidgets3/include/wx/generic/dragimgg.h +++ b/Externals/wxWidgets3/include/wx/generic/dragimgg.h @@ -5,7 +5,6 @@ // Author: Julian Smart // Modified by: // Created: 29/2/2000 -// RCS-ID: $Id: dragimgg.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/dvrenderer.h b/Externals/wxWidgets3/include/wx/generic/dvrenderer.h index 8e4eb7761c..75889a8108 100644 --- a/Externals/wxWidgets3/include/wx/generic/dvrenderer.h +++ b/Externals/wxWidgets3/include/wx/generic/dvrenderer.h @@ -3,7 +3,6 @@ // Purpose: wxDataViewRenderer for generic wxDataViewCtrl implementation // Author: Robert Roebling, Vadim Zeitlin // Created: 2009-11-07 (extracted from wx/generic/dataview.h) -// RCS-ID: $Id: dvrenderer.h 69473 2011-10-19 16:20:17Z VS $ // Copyright: (c) 2006 Robert Roebling // (c) 2009 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/generic/dvrenderers.h b/Externals/wxWidgets3/include/wx/generic/dvrenderers.h index e5ca2c71ec..6f80c773a5 100644 --- a/Externals/wxWidgets3/include/wx/generic/dvrenderers.h +++ b/Externals/wxWidgets3/include/wx/generic/dvrenderers.h @@ -3,7 +3,6 @@ // Purpose: All generic wxDataViewCtrl renderer classes // Author: Robert Roebling, Vadim Zeitlin // Created: 2009-11-07 (extracted from wx/generic/dataview.h) -// RCS-ID: $Id: dvrenderers.h 69473 2011-10-19 16:20:17Z VS $ // Copyright: (c) 2006 Robert Roebling // (c) 2009 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/generic/fdrepdlg.h b/Externals/wxWidgets3/include/wx/generic/fdrepdlg.h index f4a961d6a8..d1ad8d1b88 100644 --- a/Externals/wxWidgets3/include/wx/generic/fdrepdlg.h +++ b/Externals/wxWidgets3/include/wx/generic/fdrepdlg.h @@ -4,7 +4,6 @@ // Author: Markus Greither // Modified by: // Created: 25/05/2001 -// RCS-ID: $Id: fdrepdlg.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/filectrlg.h b/Externals/wxWidgets3/include/wx/generic/filectrlg.h index 24034654ac..ba26118d7f 100644 --- a/Externals/wxWidgets3/include/wx/generic/filectrlg.h +++ b/Externals/wxWidgets3/include/wx/generic/filectrlg.h @@ -4,7 +4,6 @@ // Author: Diaa M. Sami // Modified by: // Created: Jul-07-2007 -// RCS-ID: $Id: filectrlg.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Diaa M. Sami // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -14,7 +13,7 @@ #if wxUSE_FILECTRL -#include "wx/panel.h" +#include "wx/containr.h" #include "wx/listctrl.h" #include "wx/filectrl.h" #include "wx/filename.h" @@ -182,7 +181,7 @@ private: DECLARE_EVENT_TABLE() }; -class WXDLLIMPEXP_CORE wxGenericFileCtrl : public wxPanel, +class WXDLLIMPEXP_CORE wxGenericFileCtrl : public wxNavigationEnabled, public wxFileCtrlBase { public: diff --git a/Externals/wxWidgets3/include/wx/generic/filedlgg.h b/Externals/wxWidgets3/include/wx/generic/filedlgg.h index a1e348f7f3..7d14e523fb 100644 --- a/Externals/wxWidgets3/include/wx/generic/filedlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/filedlgg.h @@ -5,7 +5,6 @@ // Modified by: // Created: 8/17/99 // Copyright: (c) Robert Roebling -// RCS-ID: $Id: filedlgg.h 62722 2009-11-26 16:17:00Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/filepickerg.h b/Externals/wxWidgets3/include/wx/generic/filepickerg.h index f1283915c1..d88daa556a 100644 --- a/Externals/wxWidgets3/include/wx/generic/filepickerg.h +++ b/Externals/wxWidgets3/include/wx/generic/filepickerg.h @@ -5,7 +5,6 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Francesco Montorsi -// RCS-ID: $Id: filepickerg.h 70043 2011-12-18 12:34:47Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -17,8 +16,8 @@ #include "wx/dirdlg.h" -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_DIRPICKER_CHANGED, wxFileDirPickerEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_DIRPICKER_CHANGED, wxFileDirPickerEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_FILEPICKER_CHANGED, wxFileDirPickerEvent ); //----------------------------------------------------------------------------- @@ -148,7 +147,7 @@ public: // overridable virtual wxDialog *CreateDialog(); wxEventType GetEventType() const - { return wxEVT_COMMAND_FILEPICKER_CHANGED; } + { return wxEVT_FILEPICKER_CHANGED; } protected: void UpdateDialogPath(wxDialog *p) @@ -156,10 +155,6 @@ protected: void UpdatePathFromDialog(wxDialog *p) { m_path = wxStaticCast(p, wxFileDialog)->GetPath(); } - // Set the initial directory for the dialog but without overriding the - // directory of the currently selected file, if any. - void DoSetInitialDirectory(wxFileDialog* dialog, const wxString& dir); - private: DECLARE_DYNAMIC_CLASS(wxGenericFileButton) }; @@ -207,7 +202,7 @@ public: // overridable virtual wxDialog *CreateDialog(); wxEventType GetEventType() const - { return wxEVT_COMMAND_DIRPICKER_CHANGED; } + { return wxEVT_DIRPICKER_CHANGED; } protected: void UpdateDialogPath(wxDialog *p) @@ -219,5 +214,8 @@ private: DECLARE_DYNAMIC_CLASS(wxGenericDirButton) }; +// old wxEVT_COMMAND_* constants +//#define wxEVT_COMMAND_DIRPICKER_CHANGED wxEVT_DIRPICKER_CHANGED +//#define wxEVT_COMMAND_FILEPICKER_CHANGED wxEVT_FILEPICKER_CHANGED #endif // _WX_FILEDIRPICKER_H_ diff --git a/Externals/wxWidgets3/include/wx/generic/fontdlgg.h b/Externals/wxWidgets3/include/wx/generic/fontdlgg.h index 9001d63e28..a16fa6e2e8 100644 --- a/Externals/wxWidgets3/include/wx/generic/fontdlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/fontdlgg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: fontdlgg.h 66615 2011-01-07 05:26:57Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/fontpickerg.h b/Externals/wxWidgets3/include/wx/generic/fontpickerg.h index 5145cc4c4a..8090450038 100644 --- a/Externals/wxWidgets3/include/wx/generic/fontpickerg.h +++ b/Externals/wxWidgets3/include/wx/generic/fontpickerg.h @@ -5,7 +5,6 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Francesco Montorsi -// RCS-ID: $Id: fontpickerg.h 66615 2011-01-07 05:26:57Z PC $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/fswatcher.h b/Externals/wxWidgets3/include/wx/generic/fswatcher.h index a450810065..efd7631b47 100644 --- a/Externals/wxWidgets3/include/wx/generic/fswatcher.h +++ b/Externals/wxWidgets3/include/wx/generic/fswatcher.h @@ -3,7 +3,6 @@ // Purpose: wxPollingFileSystemWatcher // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id: fswatcher.h 62474 2009-10-22 11:35:43Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/grid.h b/Externals/wxWidgets3/include/wx/generic/grid.h index 21b380023e..c58cec3742 100644 --- a/Externals/wxWidgets3/include/wx/generic/grid.h +++ b/Externals/wxWidgets3/include/wx/generic/grid.h @@ -4,7 +4,6 @@ // Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) // Modified by: Santiago Palacios // Created: 1/08/1999 -// RCS-ID: $Id: grid.h 70825 2012-03-06 10:23:44Z SC $ // Copyright: (c) Michael Bedward // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -65,6 +64,20 @@ enum wxGridDirection wxGRID_ROW }; +// Flags used with wxGrid::Render() to select parts of the grid to draw. +enum wxGridRenderStyle +{ + wxGRID_DRAW_ROWS_HEADER = 0x001, + wxGRID_DRAW_COLS_HEADER = 0x002, + wxGRID_DRAW_CELL_LINES = 0x004, + wxGRID_DRAW_BOX_RECT = 0x008, + wxGRID_DRAW_SELECTION = 0x010, + wxGRID_DRAW_DEFAULT = wxGRID_DRAW_ROWS_HEADER | + wxGRID_DRAW_COLS_HEADER | + wxGRID_DRAW_CELL_LINES | + wxGRID_DRAW_BOX_RECT +}; + // ---------------------------------------------------------------------------- // forward declarations // ---------------------------------------------------------------------------- @@ -115,7 +128,7 @@ class WXDLLIMPEXP_ADV wxGridCellWorker : public wxClientDataContainer, public wx public: wxGridCellWorker() { } - // interpret renderer parameters: arbitrary string whose interpretatin is + // interpret renderer parameters: arbitrary string whose interpretation is // left to the derived classes virtual void SetParameters(const wxString& params); @@ -178,11 +191,11 @@ class WXDLLIMPEXP_ADV wxGridCellEditor : public wxGridCellWorker public: wxGridCellEditor(); - bool IsCreated() { return m_control != NULL; } - wxControl* GetControl() { return m_control; } + bool IsCreated() const { return m_control != NULL; } + wxControl* GetControl() const { return m_control; } void SetControl(wxControl* control) { m_control = control; } - wxGridCellAttr* GetCellAttr() { return m_attr; } + wxGridCellAttr* GetCellAttr() const { return m_attr; } void SetCellAttr(wxGridCellAttr* attr) { m_attr = attr; } // Creates the actual edit control @@ -199,7 +212,9 @@ public: // Draws the part of the cell not occupied by the control: the base class // version just fills it with background colour from the attribute - virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + virtual void PaintBackground(wxDC& dc, + const wxRect& rectCell, + const wxGridCellAttr& attr); // The methods called by wxGrid when a cell is edited: first BeginEdit() is @@ -811,7 +826,7 @@ public: // these are pure virtual in wxGridTableBase // - virtual int GetNumberRows() { return m_data.size(); } + virtual int GetNumberRows() { return static_cast(m_data.size()); } virtual int GetNumberCols() { return m_numCols; } virtual wxString GetValue( int row, int col ); virtual void SetValue( int row, int col, const wxString& s ); @@ -904,6 +919,15 @@ public: wxGridSelectRowsOrColumns = wxGridSelectRows | wxGridSelectColumns }; + // Different behaviour of the TAB key when the end (or the beginning, for + // Shift-TAB) of the current row is reached: + enum TabBehaviour + { + Tab_Stop, // Do nothing, this is default. + Tab_Wrap, // Move to the next (or previous) row. + Tab_Leave // Move to the next (or previous) control. + }; + // creation and destruction // ------------------------ @@ -1030,6 +1054,14 @@ public: int verticalAlignment = wxALIGN_TOP, int textOrientation = wxHORIZONTAL ) const; + // ------ grid render function for printing + // + void Render( wxDC& dc, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxGridCellCoords& topLeft = wxGridCellCoords(-1, -1), + const wxGridCellCoords& bottomRight = wxGridCellCoords(-1, -1), + int style = wxGRID_DRAW_DEFAULT ); // Split a string containing newline characters into an array of // strings and return the number of lines @@ -1150,6 +1182,8 @@ public: bool MoveCursorLeftBlock( bool expandSelection ); bool MoveCursorRightBlock( bool expandSelection ); + void SetTabBehaviour(TabBehaviour behaviour) { m_tabBehaviour = behaviour; } + // ------ label and gridline formatting // @@ -1335,13 +1369,13 @@ public: // ------ row and col sizes void SetDefaultRowSize( int height, bool resizeExistingRows = false ); void SetRowSize( int row, int height ); - void HideRow(int row) { SetRowSize(row, 0); } - void ShowRow(int row) { SetRowSize(row, -1); } + void HideRow(int row) { DoSetRowSize(row, 0); } + void ShowRow(int row) { DoSetRowSize(row, -1); } void SetDefaultColSize( int width, bool resizeExistingCols = false ); void SetColSize( int col, int width ); - void HideCol(int col) { SetColSize(col, 0); } - void ShowCol(int col) { SetColSize(col, -1); } + void HideCol(int col) { DoSetColSize(col, 0); } + void ShowCol(int col) { DoSetColSize(col, -1); } // the row and column sizes can be also set all at once using // wxGridSizesInfo which holds all of them at once @@ -2052,6 +2086,8 @@ protected: bool m_editable; // applies to whole grid bool m_cellEditCtrlEnabled; // is in-place edit currently shown? + TabBehaviour m_tabBehaviour; // determines how the TAB key behaves + void Init(); // common part of all ctors void Create(); void CreateColumnWindow(); @@ -2079,8 +2115,9 @@ protected: int SendEvent(const wxEventType evtType, const wxString& s = wxString()) { return SendEvent(evtType, m_currentCellCoords, s); } - // send wxEVT_GRID_{ROW,COL}_SIZE - void SendGridSizeEvent(wxEventType type, + // send wxEVT_GRID_{ROW,COL}_SIZE or wxEVT_GRID_COL_AUTO_SIZE, return true + // if the event was processed, false otherwise + bool SendGridSizeEvent(wxEventType type, int row, int col, const wxMouseEvent& mouseEv); @@ -2090,6 +2127,7 @@ protected: void OnKeyUp( wxKeyEvent& ); void OnChar( wxKeyEvent& ); void OnEraseBackground( wxEraseEvent& ); + void OnHideEditor( wxCommandEvent& ); bool SetCurrentCell( const wxGridCellCoords& coords ); @@ -2133,6 +2171,22 @@ private: // redraw the grid lines, should be called after changing their attributes void RedrawGridLines(); + // draw all grid lines in the given cell region (unlike the public + // DrawAllGridLines() which just draws all of them) + void DrawRangeGridLines(wxDC& dc, const wxRegion& reg, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight); + + // draw all lines from top to bottom row and left to right column in the + // rectangle determined by (top, left)-(bottom, right) -- but notice that + // the caller must have set up the clipping correctly, this rectangle is + // only used here for optimization + void DoDrawGridLines(wxDC& dc, + int top, int left, + int bottom, int right, + int topRow, int leftCol, + int bottomRight, int rightCol); + // common part of Clip{Horz,Vert}GridLines void DoClipGridLines(bool& var, bool clip); @@ -2203,6 +2257,8 @@ private: void DoEndDragResizeCol(const wxMouseEvent& event); void DoEndMoveCol(int pos); + // process a TAB keypress + void DoGridProcessTab(wxKeyboardState& kbdState); // common implementations of methods defined for both rows and columns void DeselectLine(int line, const wxGridOperations& oper); @@ -2236,6 +2292,35 @@ private: void DoDisableLineResize(int line, wxGridFixedIndicesSet *& setFixed); bool DoCanResizeLine(int line, const wxGridFixedIndicesSet *setFixed) const; + // Helper of Render(): get grid size, origin offset and fill cell arrays + void GetRenderSizes( const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight, + wxPoint& pointOffSet, wxSize& sizeGrid, + wxGridCellCoordsArray& renderCells, + wxArrayInt& arrayCols, wxArrayInt& arrayRows ); + + // Helper of Render(): set the scale to draw the cells at the right size. + void SetRenderScale( wxDC& dc, const wxPoint& pos, const wxSize& size, + const wxSize& sizeGrid ); + + // Helper of Render(): get render start position from passed parameter + wxPoint GetRenderPosition( wxDC& dc, const wxPoint& position ); + + // Helper of Render(): draws a box around the rendered area + void DoRenderBox( wxDC& dc, const int& style, + const wxPoint& pointOffSet, + const wxSize& sizeCellArea, + const wxGridCellCoords& topLeft, + const wxGridCellCoords& bottomRight ); + + // Implementation of public Set{Row,Col}Size() and {Hide,Show}{Row,Col}(). + // They interpret their height or width parameter slightly different from + // the public methods where -1 in it means "auto fit to the label" for the + // compatibility reasons. Here it means "show a previously hidden row or + // column" while 0 means "hide it" just as in the public methods. And any + // positive values are handled naturally, i.e. they just specify the size. + void DoSetRowSize( int row, int height ); + void DoSetColSize( int col, int width ); // these sets contain the indices of fixed, i.e. non-resizable @@ -2521,6 +2606,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_LABEL_LEFT_DCLICK, wxGridE wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_LABEL_RIGHT_DCLICK, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_ROW_SIZE, wxGridSizeEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_COL_SIZE, wxGridSizeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_COL_AUTO_SIZE, wxGridSizeEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_RANGE_SELECT, wxGridRangeSelectEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_CHANGING, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_CHANGED, wxGridEvent ); @@ -2531,6 +2617,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_EDITOR_CREATED, wxGridEdit wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_CELL_BEGIN_DRAG, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_COL_MOVE, wxGridEvent ); wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_COL_SORT, wxGridEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_GRID_TABBING, wxGridEvent ); typedef void (wxEvtHandler::*wxGridEventFunction)(wxGridEvent&); typedef void (wxEvtHandler::*wxGridSizeEventFunction)(wxGridSizeEvent&); @@ -2571,6 +2658,7 @@ typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreat #define EVT_GRID_CMD_LABEL_RIGHT_DCLICK(id, fn) wx__DECLARE_GRIDEVT(LABEL_RIGHT_DCLICK, id, fn) #define EVT_GRID_CMD_ROW_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(ROW_SIZE, id, fn) #define EVT_GRID_CMD_COL_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_SIZE, id, fn) +#define EVT_GRID_CMD_COL_AUTO_SIZE(id, fn) wx__DECLARE_GRIDSIZEEVT(COL_AUTO_SIZE, id, fn) #define EVT_GRID_CMD_COL_MOVE(id, fn) wx__DECLARE_GRIDEVT(COL_MOVE, id, fn) #define EVT_GRID_CMD_COL_SORT(id, fn) wx__DECLARE_GRIDEVT(COL_SORT, id, fn) #define EVT_GRID_CMD_RANGE_SELECT(id, fn) wx__DECLARE_GRIDRANGESELEVT(RANGE_SELECT, id, fn) @@ -2581,6 +2669,7 @@ typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreat #define EVT_GRID_CMD_EDITOR_HIDDEN(id, fn) wx__DECLARE_GRIDEVT(EDITOR_HIDDEN, id, fn) #define EVT_GRID_CMD_EDITOR_CREATED(id, fn) wx__DECLARE_GRIDEDITOREVT(EDITOR_CREATED, id, fn) #define EVT_GRID_CMD_CELL_BEGIN_DRAG(id, fn) wx__DECLARE_GRIDEVT(CELL_BEGIN_DRAG, id, fn) +#define EVT_GRID_CMD_TABBING(id, fn) wx__DECLARE_GRIDEVT(TABBING, id, fn) // same as above but for any id (exists mainly for backwards compatibility but // then it's also true that you rarely have multiple grid in the same window) @@ -2594,6 +2683,7 @@ typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreat #define EVT_GRID_LABEL_RIGHT_DCLICK(fn) EVT_GRID_CMD_LABEL_RIGHT_DCLICK(wxID_ANY, fn) #define EVT_GRID_ROW_SIZE(fn) EVT_GRID_CMD_ROW_SIZE(wxID_ANY, fn) #define EVT_GRID_COL_SIZE(fn) EVT_GRID_CMD_COL_SIZE(wxID_ANY, fn) +#define EVT_GRID_COL_AUTO_SIZE(fn) EVT_GRID_CMD_COL_AUTO_SIZE(wxID_ANY, fn) #define EVT_GRID_COL_MOVE(fn) EVT_GRID_CMD_COL_MOVE(wxID_ANY, fn) #define EVT_GRID_COL_SORT(fn) EVT_GRID_CMD_COL_SORT(wxID_ANY, fn) #define EVT_GRID_RANGE_SELECT(fn) EVT_GRID_CMD_RANGE_SELECT(wxID_ANY, fn) @@ -2604,6 +2694,7 @@ typedef void (wxEvtHandler::*wxGridEditorCreatedEventFunction)(wxGridEditorCreat #define EVT_GRID_EDITOR_HIDDEN(fn) EVT_GRID_CMD_EDITOR_HIDDEN(wxID_ANY, fn) #define EVT_GRID_EDITOR_CREATED(fn) EVT_GRID_CMD_EDITOR_CREATED(wxID_ANY, fn) #define EVT_GRID_CELL_BEGIN_DRAG(fn) EVT_GRID_CMD_CELL_BEGIN_DRAG(wxID_ANY, fn) +#define EVT_GRID_TABBING(fn) EVT_GRID_CMD_TABBING(wxID_ANY, fn) // we used to have a single wxEVT_GRID_CELL_CHANGE event but it was split into // wxEVT_GRID_CELL_CHANGING and CHANGED ones in wx 2.9.0, however the CHANGED diff --git a/Externals/wxWidgets3/include/wx/generic/gridctrl.h b/Externals/wxWidgets3/include/wx/generic/gridctrl.h index 2cc9859025..efcb233c8d 100644 --- a/Externals/wxWidgets3/include/wx/generic/gridctrl.h +++ b/Externals/wxWidgets3/include/wx/generic/gridctrl.h @@ -4,7 +4,6 @@ // Author: Paul Gammans, Roger Gammans // Modified by: // Created: 11/04/2001 -// RCS-ID: $Id: gridctrl.h 69856 2011-11-28 13:23:33Z VZ $ // Copyright: (c) The Computer Surgery (paul@compsurg.co.uk) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -249,6 +248,28 @@ private: const wxRect& rect, int row, int col); + // Helper methods of GetTextLines() + + // Break a single logical line of text into several physical lines, all of + // which are added to the lines array. The lines are broken at maxWidth and + // the dc is used for measuring text extent only. + void BreakLine(wxDC& dc, + const wxString& logicalLine, + wxCoord maxWidth, + wxArrayString& lines); + + // Break a word, which is supposed to be wider than maxWidth, into several + // lines, which are added to lines array and the last, incomplete, of which + // is returned in line output parameter. + // + // Returns the width of the last line. + wxCoord BreakWord(wxDC& dc, + const wxString& word, + wxCoord maxWidth, + wxArrayString& lines, + wxString& line); + + }; #endif // wxUSE_GRID diff --git a/Externals/wxWidgets3/include/wx/generic/grideditors.h b/Externals/wxWidgets3/include/wx/generic/grideditors.h index c3309e0470..a81ab84c47 100644 --- a/Externals/wxWidgets3/include/wx/generic/grideditors.h +++ b/Externals/wxWidgets3/include/wx/generic/grideditors.h @@ -4,7 +4,6 @@ // Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) // Modified by: Santiago Palacios // Created: 1/08/1999 -// RCS-ID: $Id: grideditors.h 70693 2012-02-25 23:49:55Z VZ $ // Copyright: (c) Michael Bedward // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -52,14 +51,16 @@ private: class WXDLLIMPEXP_ADV wxGridCellTextEditor : public wxGridCellEditor { public: - wxGridCellTextEditor(); + wxEXPLICIT wxGridCellTextEditor(size_t maxChars = 0); virtual void Create(wxWindow* parent, wxWindowID id, wxEvtHandler* evtHandler); virtual void SetSize(const wxRect& rect); - virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + virtual void PaintBackground(wxDC& dc, + const wxRect& rectCell, + const wxGridCellAttr& attr); virtual bool IsAcceptedKey(wxKeyEvent& event); virtual void BeginEdit(int row, int col, wxGrid* grid); @@ -73,9 +74,9 @@ public: // parameters string format is "max_width" virtual void SetParameters(const wxString& params); + virtual void SetValidator(const wxValidator& validator); - virtual wxGridCellEditor *Clone() const - { return new wxGridCellTextEditor; } + virtual wxGridCellEditor *Clone() const; // added GetValue so we can get the value which is in the control virtual wxString GetValue() const; @@ -90,8 +91,9 @@ protected: void DoReset(const wxString& startValue); private: - size_t m_maxChars; // max number of chars allowed - wxString m_value; + size_t m_maxChars; // max number of chars allowed + wxScopedPtr m_validator; + wxString m_value; wxDECLARE_NO_COPY_CLASS(wxGridCellTextEditor); }; @@ -297,7 +299,9 @@ public: virtual void SetSize(const wxRect& rect); - virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr); + virtual void PaintBackground(wxDC& dc, + const wxRect& rectCell, + const wxGridCellAttr& attr); virtual void BeginEdit(int row, int col, wxGrid* grid); virtual bool EndEdit(int row, int col, const wxGrid* grid, diff --git a/Externals/wxWidgets3/include/wx/generic/gridsel.h b/Externals/wxWidgets3/include/wx/generic/gridsel.h index 640e810af5..76135532c1 100644 --- a/Externals/wxWidgets3/include/wx/generic/gridsel.h +++ b/Externals/wxWidgets3/include/wx/generic/gridsel.h @@ -4,7 +4,6 @@ // Author: Stefan Neis // Modified by: // Created: 20/02/2000 -// RCS-ID: $Id: gridsel.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Stefan Neis // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/headerctrlg.h b/Externals/wxWidgets3/include/wx/generic/headerctrlg.h index a9246d2c8d..d2eceb2bfc 100644 --- a/Externals/wxWidgets3/include/wx/generic/headerctrlg.h +++ b/Externals/wxWidgets3/include/wx/generic/headerctrlg.h @@ -3,7 +3,6 @@ // Purpose: Generic wxHeaderCtrl implementation // Author: Vadim Zeitlin // Created: 2008-12-01 -// RCS-ID: $Id: headerctrlg.h 61024 2009-06-12 16:15:35Z RR $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -48,6 +47,10 @@ public: virtual ~wxHeaderCtrl(); +protected: + virtual wxSize DoGetBestSize() const; + + private: // implement base class pure virtuals virtual void DoSetCount(unsigned int count); @@ -59,9 +62,6 @@ private: virtual void DoSetColumnsOrder(const wxArrayInt& order); virtual wxArrayInt DoGetColumnsOrder() const; - // override wxWindow methods which must be implemented by a new control - virtual wxSize DoGetBestSize() const; - // common part of all ctors void Init(); @@ -116,7 +116,7 @@ private: // start (if m_colBeingResized is -1) or continue resizing the column // - // this generates wxEVT_COMMAND_HEADER_BEGIN_RESIZE/RESIZING events and can + // this generates wxEVT_HEADER_BEGIN_RESIZE/RESIZING events and can // cancel the operation if the user handler decides so void StartOrContinueResizing(unsigned int col, int xPhysical); diff --git a/Externals/wxWidgets3/include/wx/generic/helpext.h b/Externals/wxWidgets3/include/wx/generic/helpext.h index 19d7641062..fe0c3e7eb2 100644 --- a/Externals/wxWidgets3/include/wx/generic/helpext.h +++ b/Externals/wxWidgets3/include/wx/generic/helpext.h @@ -4,7 +4,6 @@ // Author: Karsten Ballueder (Ballueder@usa.net) // Modified by: // Copyright: (c) Karsten Ballueder 1998 -// RCS-ID: $Id: helpext.h 58227 2009-01-19 13:55:27Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/hyperlink.h b/Externals/wxWidgets3/include/wx/generic/hyperlink.h index c834a7fd3b..eb73388869 100644 --- a/Externals/wxWidgets3/include/wx/generic/hyperlink.h +++ b/Externals/wxWidgets3/include/wx/generic/hyperlink.h @@ -4,7 +4,6 @@ // Author: David Norris , Otto Wyss // Modified by: Ryan Norton, Francesco Montorsi // Created: 04/02/2005 -// RCS-ID: $Id: hyperlink.h 67948 2011-06-15 21:56:23Z VZ $ // Copyright: (c) 2005 David Norris // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/icon.h b/Externals/wxWidgets3/include/wx/generic/icon.h index 7d0f49e72c..7a336d37ce 100644 --- a/Externals/wxWidgets3/include/wx/generic/icon.h +++ b/Externals/wxWidgets3/include/wx/generic/icon.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 17/09/98 -// RCS-ID: $Id: icon.h 57692 2008-12-31 15:27:00Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/imaglist.h b/Externals/wxWidgets3/include/wx/generic/imaglist.h index a16ed15a76..8fc145e03f 100644 --- a/Externals/wxWidgets3/include/wx/generic/imaglist.h +++ b/Externals/wxWidgets3/include/wx/generic/imaglist.h @@ -3,7 +3,6 @@ // Purpose: // Author: Robert Roebling // Created: 01/02/97 -// Id: $Id: imaglist.h 62789 2009-12-05 19:57:58Z PC $ // Copyright: (c) 1998 Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/infobar.h b/Externals/wxWidgets3/include/wx/generic/infobar.h index a7dd267ffa..781698ccc9 100644 --- a/Externals/wxWidgets3/include/wx/generic/infobar.h +++ b/Externals/wxWidgets3/include/wx/generic/infobar.h @@ -3,7 +3,6 @@ // Purpose: generic wxInfoBar class declaration // Author: Vadim Zeitlin // Created: 2009-07-28 -// RCS-ID: $Id: infobar.h 64213 2010-05-05 12:20:08Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/laywin.h b/Externals/wxWidgets3/include/wx/generic/laywin.h index 3f8e38c5c5..a38fd97fc1 100644 --- a/Externals/wxWidgets3/include/wx/generic/laywin.h +++ b/Externals/wxWidgets3/include/wx/generic/laywin.h @@ -7,7 +7,6 @@ // Author: Julian Smart // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: laywin.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/listctrl.h b/Externals/wxWidgets3/include/wx/generic/listctrl.h index 19622cac39..7e18eeccbf 100644 --- a/Externals/wxWidgets3/include/wx/generic/listctrl.h +++ b/Externals/wxWidgets3/include/wx/generic/listctrl.h @@ -3,7 +3,6 @@ // Purpose: Generic list control // Author: Robert Roebling // Created: 01/02/97 -// RCS-ID: $Id: listctrl.h 70282 2012-01-07 15:09:43Z VZ $ // Copyright: (c) 1998 Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -11,6 +10,7 @@ #ifndef _WX_GENERIC_LISTCTRL_H_ #define _WX_GENERIC_LISTCTRL_H_ +#include "wx/containr.h" #include "wx/scrolwin.h" #include "wx/textctrl.h" @@ -29,7 +29,7 @@ class WXDLLIMPEXP_FWD_CORE wxListMainWindow; // wxListCtrl //----------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxGenericListCtrl: public wxListCtrlBase, +class WXDLLIMPEXP_CORE wxGenericListCtrl: public wxNavigationEnabled, public wxScrollHelper { public: @@ -143,6 +143,8 @@ public: void RefreshItem(long item); void RefreshItems(long itemFrom, long itemTo); + virtual void EnableBellOnNoMatch(bool on = true); + #if WXWIN_COMPATIBILITY_2_6 // obsolete, don't use wxDEPRECATED( int GetItemSpacing( bool isSmall ) const ); @@ -188,7 +190,6 @@ public: #endif virtual bool ShouldInheritColours() const { return false; } - virtual void SetFocus(); // implementation // -------------- @@ -209,11 +210,6 @@ protected: virtual bool DoPopupMenu( wxMenu *menu, int x, int y ); - // take into account the coordinates difference between the container - // window and the list control window itself here - virtual void DoClientToScreen( int *x, int *y ) const; - virtual void DoScreenToClient( int *x, int *y ) const; - virtual wxSize DoGetBestClientSize() const; // return the text for the given column of the given item @@ -227,9 +223,6 @@ protected: // return the icon for the given item and column. virtual int OnGetItemColumnImage(long item, long column) const; - // return the attribute for the item (may return NULL if none) - virtual wxListItemAttr *OnGetItemAttr(long item) const; - // it calls our OnGetXXX() functions friend class WXDLLIMPEXP_FWD_CORE wxListMainWindow; diff --git a/Externals/wxWidgets3/include/wx/generic/logg.h b/Externals/wxWidgets3/include/wx/generic/logg.h index 3ef9eacdc3..303b441e81 100644 --- a/Externals/wxWidgets3/include/wx/generic/logg.h +++ b/Externals/wxWidgets3/include/wx/generic/logg.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: logg.h 67656 2011-04-30 10:57:04Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -127,9 +126,6 @@ public: wxFrame *GetFrame() const; // overridables - // called immediately after the log frame creation allowing for - // any extra initializations - virtual void OnFrameCreate(wxFrame *frame); // 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 diff --git a/Externals/wxWidgets3/include/wx/generic/mask.h b/Externals/wxWidgets3/include/wx/generic/mask.h index 54969b8c23..f6aad1a86d 100644 --- a/Externals/wxWidgets3/include/wx/generic/mask.h +++ b/Externals/wxWidgets3/include/wx/generic/mask.h @@ -3,7 +3,6 @@ // Purpose: generic implementation of wxMask // Author: Vadim Zeitlin // Created: 2006-09-28 -// RCS-ID: $Id: mask.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/mdig.h b/Externals/wxWidgets3/include/wx/generic/mdig.h index ae8ba70cd6..7c433edc40 100644 --- a/Externals/wxWidgets3/include/wx/generic/mdig.h +++ b/Externals/wxWidgets3/include/wx/generic/mdig.h @@ -4,7 +4,6 @@ // Author: Hans Van Leemputten // Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes // Created: 29/07/2002 -// RCS-ID: $Id: mdig.h 59164 2009-02-26 16:16:31Z VZ $ // Copyright: (c) 2002 Hans Van Leemputten // (c) 2008 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/generic/msgdlgg.h b/Externals/wxWidgets3/include/wx/generic/msgdlgg.h index 73fe48b4a7..66bd5484ea 100644 --- a/Externals/wxWidgets3/include/wx/generic/msgdlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/msgdlgg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: msgdlgg.h 68537 2011-08-04 22:53:42Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/notebook.h b/Externals/wxWidgets3/include/wx/generic/notebook.h index e2c405e7ab..e328e0bfcf 100644 --- a/Externals/wxWidgets3/include/wx/generic/notebook.h +++ b/Externals/wxWidgets3/include/wx/generic/notebook.h @@ -3,7 +3,6 @@ // Purpose: wxNotebook class (a.k.a. property sheet, tabbed dialog) // Author: Julian Smart // Modified by: -// RCS-ID: $Id: notebook.h 68810 2011-08-21 14:08:49Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/notifmsg.h b/Externals/wxWidgets3/include/wx/generic/notifmsg.h index e9f08ae1c4..1cd74ba7f0 100644 --- a/Externals/wxWidgets3/include/wx/generic/notifmsg.h +++ b/Externals/wxWidgets3/include/wx/generic/notifmsg.h @@ -3,7 +3,6 @@ // Purpose: generic implementation of wxGenericNotificationMessage // Author: Vadim Zeitlin // Created: 2007-11-24 -// RCS-ID: $Id: notifmsg.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/numdlgg.h b/Externals/wxWidgets3/include/wx/generic/numdlgg.h index 24657fb77a..ac45ce915c 100644 --- a/Externals/wxWidgets3/include/wx/generic/numdlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/numdlgg.h @@ -4,7 +4,6 @@ // Author: John Labenski // Modified by: // Created: 07.02.04 (extracted from textdlgg.cpp) -// RCS-ID: $Id: numdlgg.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/paletteg.h b/Externals/wxWidgets3/include/wx/generic/paletteg.h index a0e396850a..0f6f5a4918 100644 --- a/Externals/wxWidgets3/include/wx/generic/paletteg.h +++ b/Externals/wxWidgets3/include/wx/generic/paletteg.h @@ -3,7 +3,6 @@ // Purpose: // Author: Robert Roebling // Created: 01/02/97 -// RCS-ID: $Id: paletteg.h 50727 2007-12-15 17:54:20Z VZ $ // Copyright: (c) 1998 Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/panelg.h b/Externals/wxWidgets3/include/wx/generic/panelg.h index 79dfe85c5c..5c02cb35d8 100644 --- a/Externals/wxWidgets3/include/wx/generic/panelg.h +++ b/Externals/wxWidgets3/include/wx/generic/panelg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: panelg.h 70098 2011-12-23 05:59:59Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/printps.h b/Externals/wxWidgets3/include/wx/generic/printps.h index f6bf9bc68a..388307297c 100644 --- a/Externals/wxWidgets3/include/wx/generic/printps.h +++ b/Externals/wxWidgets3/include/wx/generic/printps.h @@ -5,7 +5,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: printps.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/private/grid.h b/Externals/wxWidgets3/include/wx/generic/private/grid.h index ab763a9c22..7ef99700cf 100644 --- a/Externals/wxWidgets3/include/wx/generic/private/grid.h +++ b/Externals/wxWidgets3/include/wx/generic/private/grid.h @@ -4,7 +4,6 @@ // Author: Michael Bedward (based on code by Julian Smart, Robin Dunn) // Modified by: Santiago Palacios // Created: 1/08/1999 -// RCS-ID: $Id: grid.h 69861 2011-11-28 19:15:59Z VZ $ // Copyright: (c) Michael Bedward // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -16,6 +15,10 @@ #if wxUSE_GRID +// Internally used (and hence intentionally not exported) event telling wxGrid +// to hide the currently shown editor. +wxDECLARE_EVENT( wxEVT_GRID_HIDE_EDITOR, wxCommandEvent ); + // ---------------------------------------------------------------------------- // array classes // ---------------------------------------------------------------------------- @@ -553,7 +556,7 @@ public: // NB: As GetLineAt(), currently this is always identity for rows. virtual int GetLinePos(const wxGrid *grid, int line) const = 0; - // Return the index of the line just before the given one. + // Return the index of the line just before the given one or wxNOT_FOUND. virtual int GetLineBefore(const wxGrid* grid, int line) const = 0; // Get the row or column label window @@ -626,7 +629,7 @@ public: { return line; } // TODO: implement row reordering virtual int GetLineBefore(const wxGrid* WXUNUSED(grid), int line) const - { return line ? line - 1 : line; } + { return line - 1; } virtual wxWindow *GetHeaderWindow(wxGrid *grid) const { return grid->GetGridRowLabelWindow(); } @@ -692,7 +695,10 @@ public: { return grid->GetColPos(line); } virtual int GetLineBefore(const wxGrid* grid, int line) const - { return grid->GetColAt(wxMax(0, grid->GetColPos(line) - 1)); } + { + int posBefore = grid->GetColPos(line) - 1; + return posBefore >= 0 ? grid->GetColAt(posBefore) : wxNOT_FOUND; + } virtual wxWindow *GetHeaderWindow(wxGrid *grid) const { return grid->GetGridColLabelWindow(); } diff --git a/Externals/wxWidgets3/include/wx/generic/private/listctrl.h b/Externals/wxWidgets3/include/wx/generic/private/listctrl.h index 3d7838a883..32afaada6f 100644 --- a/Externals/wxWidgets3/include/wx/generic/private/listctrl.h +++ b/Externals/wxWidgets3/include/wx/generic/private/listctrl.h @@ -1,9 +1,8 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: wx/generic/listctrl.h +// Name: wx/generic/private/listctrl.h // Purpose: private definitions of wxListCtrl helpers // Author: Robert Roebling // Vadim Zeitlin (virtual list control support) -// Id: $Id: listctrl.h 70285 2012-01-07 15:09:54Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -336,22 +335,27 @@ protected: public: wxListHeaderWindow(); - wxListHeaderWindow( wxWindow *win, - wxWindowID id, - wxListMainWindow *owner, - const wxPoint &pos = wxDefaultPosition, - const wxSize &size = wxDefaultSize, - long style = 0, - const wxString &name = wxT("wxlistctrlcolumntitles") ); + // We provide only Create(), not the ctor, because we need to create the + // C++ object before creating the window, see the explanations in + // CreateOrDestroyHeaderWindowAsNeeded() + bool Create( wxWindow *win, + wxWindowID id, + wxListMainWindow *owner, + const wxPoint &pos = wxDefaultPosition, + const wxSize &size = wxDefaultSize, + long style = 0, + const wxString &name = wxT("wxlistctrlcolumntitles") ); virtual ~wxListHeaderWindow(); + // We never need focus as we don't have any keyboard interface. + virtual bool AcceptsFocus() const { return false; } + void DrawCurrent(); void AdjustDC( wxDC& dc ); void OnPaint( wxPaintEvent &event ); void OnMouse( wxMouseEvent &event ); - void OnSetFocus( wxFocusEvent &event ); // needs refresh bool m_dirty; @@ -388,6 +392,27 @@ public: void Notify(); }; +//----------------------------------------------------------------------------- +// wxListFindTimer (internal) +//----------------------------------------------------------------------------- + +class wxListFindTimer: public wxTimer +{ +public: + // reset the current prefix after half a second of inactivity + enum { DELAY = 500 }; + + wxListFindTimer( wxListMainWindow *owner ) + : m_owner(owner) + { + } + + virtual void Notify(); + +private: + wxListMainWindow *m_owner; +}; + //----------------------------------------------------------------------------- // wxListTextCtrlWrapper: wraps a wxTextCtrl to make it work for inline editing //----------------------------------------------------------------------------- @@ -448,10 +473,8 @@ public: wxListMainWindow(); wxListMainWindow( wxWindow *parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString &name = wxT("listctrlmainwindow") ); + const wxPoint& pos, + const wxSize& size ); virtual ~wxListMainWindow(); @@ -556,6 +579,11 @@ public: bool OnRenameAccept(size_t itemEdit, const wxString& value); void OnRenameCancelled(size_t itemEdit); + void OnFindTimer(); + // set whether or not to ring the find bell + // (does nothing on MSW - bell is always rung) + void EnableBellOnNoMatch( bool on ); + void OnMouse( wxMouseEvent &event ); // called to switch the selection from the current item to newCurrent, @@ -644,7 +672,7 @@ public: long FindItem( const wxPoint& pt ); long HitTest( int x, int y, int &flags ) const; void InsertItem( wxListItem &item ); - void InsertColumn( long col, const wxListItem &item ); + long InsertColumn( long col, const wxListItem &item ); int GetItemWidthWithImage(wxListItem * item); void SortItems( wxListCtrlCompare fn, wxIntPtr data ); @@ -729,6 +757,15 @@ protected: bool m_lastOnSame; wxTimer *m_renameTimer; + + // incremental search data + wxString m_findPrefix; + wxTimer *m_findTimer; + // This flag is set to 0 if the bell is disabled, 1 if it is enabled and -1 + // if it is globally enabled but has been temporarily disabled because we + // had already beeped for this particular search. + int m_findBell; + bool m_isCreated; int m_dragCount; wxPoint m_dragStart; @@ -779,6 +816,9 @@ protected: // force us to recalculate the range of visible lines void ResetVisibleLinesRange() { m_lineFrom = (size_t)-1; } + // find the first item starting with the given prefix after the given item + size_t PrefixFindItem(size_t item, const wxString& prefix) const; + // get the colour to be used for drawing the rules wxColour GetRuleColour() const { diff --git a/Externals/wxWidgets3/include/wx/generic/private/markuptext.h b/Externals/wxWidgets3/include/wx/generic/private/markuptext.h index e918dca7be..1d9569229e 100644 --- a/Externals/wxWidgets3/include/wx/generic/private/markuptext.h +++ b/Externals/wxWidgets3/include/wx/generic/private/markuptext.h @@ -3,7 +3,6 @@ // Purpose: Generic wxMarkupText class for managing text with markup. // Author: Vadim Zeitlin // Created: 2011-02-21 -// RCS-ID: $Id: markuptext.h 67064 2011-02-27 12:48:21Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/private/richtooltip.h b/Externals/wxWidgets3/include/wx/generic/private/richtooltip.h index 0ca479dadb..ad356f51f8 100644 --- a/Externals/wxWidgets3/include/wx/generic/private/richtooltip.h +++ b/Externals/wxWidgets3/include/wx/generic/private/richtooltip.h @@ -3,13 +3,12 @@ // Purpose: wxRichToolTipGenericImpl declaration. // Author: Vadim Zeitlin // Created: 2011-10-18 -// RCS-ID: $Id: richtooltip.h 69488 2011-10-20 16:20:19Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #ifndef _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_ -#define _GENERIC_PRIVATE_RICHTOOLTIP_H_ +#define _WX_GENERIC_PRIVATE_RICHTOOLTIP_H_ #include "wx/icon.h" #include "wx/colour.h" @@ -30,17 +29,19 @@ public: // This is pretty arbitrary, we could follow MSW and use some multiple // of double-click time here. m_timeout = 5000; + m_delay = 0; } virtual void SetBackgroundColour(const wxColour& col, const wxColour& colEnd); virtual void SetCustomIcon(const wxIcon& icon); virtual void SetStandardIcon(int icon); - virtual void SetTimeout(unsigned milliseconds); + virtual void SetTimeout(unsigned milliseconds, + unsigned millisecondsDelay = 0); virtual void SetTipKind(wxTipKind tipKind); virtual void SetTitleFont(const wxFont& font); - virtual void ShowFor(wxWindow* win); + virtual void ShowFor(wxWindow* win, const wxRect* rect = NULL); protected: wxString m_title, @@ -52,7 +53,8 @@ private: wxColour m_colStart, m_colEnd; - unsigned m_timeout; + unsigned m_timeout, + m_delay; wxTipKind m_tipKind; diff --git a/Externals/wxWidgets3/include/wx/generic/private/textmeasure.h b/Externals/wxWidgets3/include/wx/generic/private/textmeasure.h new file mode 100644 index 0000000000..2b31d02831 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/generic/private/textmeasure.h @@ -0,0 +1,39 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/generic/private/textmeasure.h +// Purpose: Generic wxTextMeasure declaration. +// Author: Vadim Zeitlin +// Created: 2012-10-17 +// Copyright: (c) 1997-2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GENERIC_PRIVATE_TEXTMEASURE_H_ +#define _WX_GENERIC_PRIVATE_TEXTMEASURE_H_ + +// ---------------------------------------------------------------------------- +// wxTextMeasure for the platforms without native support. +// ---------------------------------------------------------------------------- + +class wxTextMeasure : public wxTextMeasureBase +{ +public: + wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL) + : wxTextMeasureBase(dc, font) {} + wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL) + : wxTextMeasureBase(win, font) {} + +protected: + virtual void DoGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL); + + virtual bool DoGetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX); + + wxDECLARE_NO_COPY_CLASS(wxTextMeasure); +}; + +#endif // _WX_GENERIC_PRIVATE_TEXTMEASURE_H_ diff --git a/Externals/wxWidgets3/include/wx/generic/private/timer.h b/Externals/wxWidgets3/include/wx/generic/private/timer.h index 0be9a3bfe8..6d96389ce8 100644 --- a/Externals/wxWidgets3/include/wx/generic/private/timer.h +++ b/Externals/wxWidgets3/include/wx/generic/private/timer.h @@ -2,7 +2,6 @@ // Name: wx/generic/private/timer.h // Purpose: Generic implementation of wxTimer class // Author: Vaclav Slavik -// Id: $Id: timer.h 50646 2007-12-12 01:35:53Z VZ $ // Copyright: (c) Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/prntdlgg.h b/Externals/wxWidgets3/include/wx/generic/prntdlgg.h index e3317e1cc6..6c8f7bd5a7 100644 --- a/Externals/wxWidgets3/include/wx/generic/prntdlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/prntdlgg.h @@ -5,7 +5,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: prntdlgg.h 70636 2012-02-20 21:55:55Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/progdlgg.h b/Externals/wxWidgets3/include/wx/generic/progdlgg.h index 38b69241db..d29452f1f0 100644 --- a/Externals/wxWidgets3/include/wx/generic/progdlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/progdlgg.h @@ -4,7 +4,6 @@ // Author: Karsten Ballueder // Modified by: Francesco Montorsi // Created: 09.05.1999 -// RCS-ID: $Id: progdlgg.h 70512 2012-02-05 14:18:25Z VZ $ // Copyright: (c) Karsten Ballueder // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/propdlg.h b/Externals/wxWidgets3/include/wx/generic/propdlg.h index 307400265e..6cb63efad9 100644 --- a/Externals/wxWidgets3/include/wx/generic/propdlg.h +++ b/Externals/wxWidgets3/include/wx/generic/propdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 2005-03-12 -// RCS-ID: $Id: propdlg.h 58579 2009-02-01 04:48:19Z SN $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/region.h b/Externals/wxWidgets3/include/wx/generic/region.h index d796becf1c..1c5048dbf2 100644 --- a/Externals/wxWidgets3/include/wx/generic/region.h +++ b/Externals/wxWidgets3/include/wx/generic/region.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004/04/12 -// RCS-ID: $Id: region.h 58738 2009-02-07 23:20:45Z KO $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/richmsgdlgg.h b/Externals/wxWidgets3/include/wx/generic/richmsgdlgg.h index 9d075ef767..5446f87fef 100644 --- a/Externals/wxWidgets3/include/wx/generic/richmsgdlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/richmsgdlgg.h @@ -3,7 +3,6 @@ // Purpose: wxGenericRichMessageDialog // Author: Rickard Westerlund // Created: 2010-07-04 -// RCS-ID: $Id: richmsgdlgg.h 65356 2010-08-19 00:06:12Z VZ $ // Copyright: (c) 2010 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/sashwin.h b/Externals/wxWidgets3/include/wx/generic/sashwin.h index 068911aa8b..e4f34d8296 100644 --- a/Externals/wxWidgets3/include/wx/generic/sashwin.h +++ b/Externals/wxWidgets3/include/wx/generic/sashwin.h @@ -6,7 +6,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: sashwin.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/scrolwin.h b/Externals/wxWidgets3/include/wx/generic/scrolwin.h index 35883b8bc1..863cdf923e 100644 --- a/Externals/wxWidgets3/include/wx/generic/scrolwin.h +++ b/Externals/wxWidgets3/include/wx/generic/scrolwin.h @@ -3,7 +3,6 @@ // Purpose: generic wxScrollHelper // Author: Vadim Zeitlin // Created: 2008-12-24 (replacing old file with the same name) -// RCS-ID: $Id: scrolwin.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -22,6 +21,7 @@ public: // implement base class pure virtuals virtual void AdjustScrollbars(); + virtual bool IsScrollbarShown(int orient) const; protected: virtual void DoScroll(int x, int y); diff --git a/Externals/wxWidgets3/include/wx/generic/spinctlg.h b/Externals/wxWidgets3/include/wx/generic/spinctlg.h index 36c777940e..a35cc8a4a4 100644 --- a/Externals/wxWidgets3/include/wx/generic/spinctlg.h +++ b/Externals/wxWidgets3/include/wx/generic/spinctlg.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 28.10.99 -// RCS-ID: $Id: spinctlg.h 70432 2012-01-21 17:03:52Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -22,6 +21,8 @@ #if wxUSE_SPINBTN +#include "wx/compositewin.h" + class WXDLLIMPEXP_FWD_CORE wxSpinButton; class WXDLLIMPEXP_FWD_CORE wxTextCtrl; @@ -40,7 +41,8 @@ class wxSpinCtrlTextGeneric; // wxTextCtrl used for the wxSpinCtrlGenericBase // function ambiguity. // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase : public wxSpinCtrlBase +class WXDLLIMPEXP_CORE wxSpinCtrlGenericBase + : public wxNavigationEnabled > { public: wxSpinCtrlGenericBase() { Init(); } @@ -85,6 +87,8 @@ public: virtual void DoSetToolTip(wxToolTip *tip); #endif // wxUSE_TOOLTIPS + virtual bool SetBackgroundColour(const wxColour& colour); + // get the subcontrols wxTextCtrl *GetText() const { return m_textCtrl; } wxSpinButton *GetSpinButton() const { return m_spinButton; } @@ -105,6 +109,7 @@ public: protected: // override the base class virtuals involved into geometry calculations virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; virtual void DoMoveWindow(int x, int y, int width, int height); #ifdef __WXMSW__ @@ -112,9 +117,15 @@ protected: virtual void DoEnable(bool enable); #endif // __WXMSW__ + enum SendEvent + { + SendEvent_None, + SendEvent_Text + }; + // generic double valued functions double DoGetValue() const { return m_value; } - bool DoSetValue(double val); + bool DoSetValue(double val, SendEvent sendEvent); void DoSetRange(double min_val, double max_val); void DoSetIncrement(double inc); @@ -124,11 +135,15 @@ protected: // can also change the text control if its value is invalid // // return true if our value has changed - bool SyncSpinToText(); + bool SyncSpinToText(SendEvent sendEvent); // Send the correct event type virtual void DoSendEvent() = 0; + // Convert the text to/from the corresponding value. + virtual bool DoTextToValue(const wxString& text, double *val) = 0; + virtual wxString DoValueToText(double val) = 0; + // check if the value is in range bool InRange(double n) const { return (n >= m_min) && (n <= m_max); } @@ -141,7 +156,6 @@ protected: double m_max; double m_increment; bool m_snap_to_ticks; - wxString m_format; int m_spin_value; @@ -153,6 +167,9 @@ private: // common part of all ctors void Init(); + // Implement pure virtual function inherited from wxCompositeWindow. + virtual wxWindowList GetCompositeWindowParts() const; + DECLARE_EVENT_TABLE() }; @@ -190,7 +207,7 @@ public: bool ok = wxTextCtrl::Create(parent, id, value, pos, size, style, wxDefaultValidator, name); - DoSetValue(initial); + DoSetValue(initial, SendEvent_None); return ok; } @@ -226,9 +243,20 @@ protected: return n; } - bool DoSetValue(double val) + bool DoSetValue(double val, SendEvent sendEvent) { - wxTextCtrl::SetValue(wxString::Format(m_format.c_str(), val)); + wxString str(wxString::Format(m_format, val)); + switch ( sendEvent ) + { + case SendEvent_None: + wxTextCtrl::ChangeValue(str); + break; + + case SendEvent_Text: + wxTextCtrl::SetValue(str); + break; + } + return true; } void DoSetRange(double min_val, double max_val) @@ -257,7 +285,7 @@ protected: class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinCtrlGenericBase { public: - wxSpinCtrl() {} + wxSpinCtrl() { Init(); } wxSpinCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, @@ -267,6 +295,8 @@ public: int min = 0, int max = 100, int initial = 0, const wxString& name = wxT("wxSpinCtrl")) { + Init(); + Create(parent, id, value, pos, size, style, min, max, initial, name); } @@ -292,13 +322,28 @@ public: // operations void SetValue(const wxString& value) { wxSpinCtrlGenericBase::SetValue(value); } - void SetValue( int value ) { DoSetValue(value); } + void SetValue( int value ) { DoSetValue(value, SendEvent_None); } void SetRange( int minVal, int maxVal ) { DoSetRange(minVal, maxVal); } void SetIncrement(int inc) { DoSetIncrement(inc); } + virtual int GetBase() const { return m_base; } + virtual bool SetBase(int base); + protected: virtual void DoSendEvent(); + virtual bool DoTextToValue(const wxString& text, double *val); + virtual wxString DoValueToText(double val); + +private: + // Common part of all ctors. + void Init() + { + m_base = 10; + } + + int m_base; + DECLARE_DYNAMIC_CLASS(wxSpinCtrl) }; @@ -311,7 +356,7 @@ protected: class WXDLLIMPEXP_CORE wxSpinCtrlDouble : public wxSpinCtrlGenericBase { public: - wxSpinCtrlDouble() : m_digits(0) { } + wxSpinCtrlDouble() { Init(); } wxSpinCtrlDouble(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, @@ -322,7 +367,8 @@ public: double inc = 1, const wxString& name = wxT("wxSpinCtrlDouble")) { - m_digits = 0; + Init(); + Create(parent, id, value, pos, size, style, min, max, initial, inc, name); } @@ -352,16 +398,34 @@ public: // operations void SetValue(const wxString& value) { wxSpinCtrlGenericBase::SetValue(value); } - void SetValue(double value) { DoSetValue(value); } + void SetValue(double value) { DoSetValue(value, SendEvent_None); } void SetRange(double minVal, double maxVal) { DoSetRange(minVal, maxVal); } void SetIncrement(double inc) { DoSetIncrement(inc); } void SetDigits(unsigned digits); + // We don't implement bases support for floating point numbers, this is not + // very useful in practice. + virtual int GetBase() const { return 10; } + virtual bool SetBase(int WXUNUSED(base)) { return 0; } + protected: virtual void DoSendEvent(); + virtual bool DoTextToValue(const wxString& text, double *val); + virtual wxString DoValueToText(double val); + unsigned m_digits; +private: + // Common part of all ctors. + void Init() + { + m_digits = 0; + m_format = wxS("%g"); + } + + wxString m_format; + DECLARE_DYNAMIC_CLASS(wxSpinCtrlDouble) }; diff --git a/Externals/wxWidgets3/include/wx/generic/splash.h b/Externals/wxWidgets3/include/wx/generic/splash.h index a98704a639..24ad733d5d 100644 --- a/Externals/wxWidgets3/include/wx/generic/splash.h +++ b/Externals/wxWidgets3/include/wx/generic/splash.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 28/6/2000 -// RCS-ID: $Id: splash.h 69796 2011-11-22 13:18:55Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/splitter.h b/Externals/wxWidgets3/include/wx/generic/splitter.h index 47bdebceed..61128a3959 100644 --- a/Externals/wxWidgets3/include/wx/generic/splitter.h +++ b/Externals/wxWidgets3/include/wx/generic/splitter.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: splitter.h 70840 2012-03-08 13:23:39Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -212,7 +211,7 @@ public: virtual void DrawSashTracker(int x, int y); // Tests for x, y over sash - virtual bool SashHitTest(int x, int y, int tolerance = 5); + virtual bool SashHitTest(int x, int y); // Resizes subwindows virtual void SizeWindows(); @@ -334,16 +333,16 @@ public: // all void SetSashPosition(int pos) { - wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED - || GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING); + wxASSERT( GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGED + || GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGING); m_data.pos = pos; } int GetSashPosition() const { - wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED - || GetEventType() == wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING); + wxASSERT( GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGED + || GetEventType() == wxEVT_SPLITTER_SASH_POS_CHANGING); return m_data.pos; } @@ -351,7 +350,7 @@ public: // UNSPLIT event methods wxWindow *GetWindowBeingRemoved() const { - wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_UNSPLIT ); + wxASSERT( GetEventType() == wxEVT_SPLITTER_UNSPLIT ); return m_data.win; } @@ -359,14 +358,14 @@ public: // DCLICK event methods int GetX() const { - wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_DOUBLECLICKED ); + wxASSERT( GetEventType() == wxEVT_SPLITTER_DOUBLECLICKED ); return m_data.pt.x; } int GetY() const { - wxASSERT( GetEventType() == wxEVT_COMMAND_SPLITTER_DOUBLECLICKED ); + wxASSERT( GetEventType() == wxEVT_SPLITTER_DOUBLECLICKED ); return m_data.pt.y; } @@ -396,7 +395,7 @@ typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&); wxEVENT_HANDLER_CAST(wxSplitterEventFunction, func) #define wx__DECLARE_SPLITTEREVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_SPLITTER_ ## evt, id, wxSplitterEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_SPLITTER_ ## evt, id, wxSplitterEventHandler(fn)) #define EVT_SPLITTER_SASH_POS_CHANGED(id, fn) \ wx__DECLARE_SPLITTEREVT(SASH_POS_CHANGED, id, fn) @@ -410,4 +409,11 @@ typedef void (wxEvtHandler::*wxSplitterEventFunction)(wxSplitterEvent&); #define EVT_SPLITTER_UNSPLIT(id, fn) \ wx__DECLARE_SPLITTEREVT(UNSPLIT, id, fn) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED wxEVT_SPLITTER_SASH_POS_CHANGED +#define wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING wxEVT_SPLITTER_SASH_POS_CHANGING +#define wxEVT_COMMAND_SPLITTER_DOUBLECLICKED wxEVT_SPLITTER_DOUBLECLICKED +#define wxEVT_COMMAND_SPLITTER_UNSPLIT wxEVT_SPLITTER_UNSPLIT + #endif // _WX_GENERIC_SPLITTER_H_ diff --git a/Externals/wxWidgets3/include/wx/generic/srchctlg.h b/Externals/wxWidgets3/include/wx/generic/srchctlg.h index 864efcd142..c61ddee751 100644 --- a/Externals/wxWidgets3/include/wx/generic/srchctlg.h +++ b/Externals/wxWidgets3/include/wx/generic/srchctlg.h @@ -3,7 +3,6 @@ // Purpose: generic wxSearchCtrl class // Author: Vince Harron // Created: 2006-02-19 -// RCS-ID: $Id: srchctlg.h 68911 2011-08-27 12:13:23Z VZ $ // Copyright: Vince Harron // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -219,7 +218,7 @@ protected: virtual wxBitmap RenderSearchBitmap( int x, int y, bool renderDrop ); virtual wxBitmap RenderCancelBitmap( int x, int y ); - virtual void OnSearchButton( wxCommandEvent& event ); + void OnCancelButton( wxCommandEvent& event ); void OnSetFocus( wxFocusEvent& event ); void OnSize( wxSizeEvent& event ); diff --git a/Externals/wxWidgets3/include/wx/generic/statbmpg.h b/Externals/wxWidgets3/include/wx/generic/statbmpg.h index 930e3943b9..8a8fa15dfd 100644 --- a/Externals/wxWidgets3/include/wx/generic/statbmpg.h +++ b/Externals/wxWidgets3/include/wx/generic/statbmpg.h @@ -3,7 +3,6 @@ // Purpose: wxGenericStaticBitmap header // Author: Marcin Wojdyr, Stefan Csomor // Created: 2008-06-16 -// RCS-ID: $Id: statbmpg.h 67681 2011-05-03 16:29:04Z DS $ // Copyright: wxWidgets developers // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/statline.h b/Externals/wxWidgets3/include/wx/generic/statline.h index 8a9fee1b1e..8a7ccbf088 100644 --- a/Externals/wxWidgets3/include/wx/generic/statline.h +++ b/Externals/wxWidgets3/include/wx/generic/statline.h @@ -3,7 +3,6 @@ // Purpose: a generic wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 -// Version: $Id: statline.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/stattextg.h b/Externals/wxWidgets3/include/wx/generic/stattextg.h index 306b59217a..918a4f4eb3 100644 --- a/Externals/wxWidgets3/include/wx/generic/stattextg.h +++ b/Externals/wxWidgets3/include/wx/generic/stattextg.h @@ -3,7 +3,6 @@ // Purpose: wxGenericStaticText header // Author: Marcin Wojdyr // Created: 2008-06-26 -// Id: $Id: stattextg.h 67067 2011-02-27 12:48:38Z VZ $ // Copyright: Marcin Wojdyr // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/statusbr.h b/Externals/wxWidgets3/include/wx/generic/statusbr.h index dc2a3f88a4..bff20807e3 100644 --- a/Externals/wxWidgets3/include/wx/generic/statusbr.h +++ b/Externals/wxWidgets3/include/wx/generic/statusbr.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: VZ at 05.02.00 to derive from wxStatusBarBase // Created: 01/02/97 -// RCS-ID: $Id: statusbr.h 67384 2011-04-03 20:31:32Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -91,8 +90,9 @@ protected: // common part of all ctors void Init(); - // the last known height of the client rect - int m_lastClientHeight; + // the last known size, fields widths must be updated whenever it's out of + // date + wxSize m_lastClientSize; // the absolute widths of the status bar panes in pixels wxArrayInt m_widthsAbs; @@ -106,6 +106,9 @@ protected: virtual wxSize DoGetBestSize() const; private: + // Update m_lastClientSize and m_widthsAbs from the current size. + void DoUpdateFieldWidths(); + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS_NO_COPY(wxStatusBarGeneric) }; diff --git a/Externals/wxWidgets3/include/wx/generic/tabg.h b/Externals/wxWidgets3/include/wx/generic/tabg.h index ea21a32a6d..d376b3b510 100644 --- a/Externals/wxWidgets3/include/wx/generic/tabg.h +++ b/Externals/wxWidgets3/include/wx/generic/tabg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: tabg.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/textdlgg.h b/Externals/wxWidgets3/include/wx/generic/textdlgg.h index f27e0b0296..023d497c30 100644 --- a/Externals/wxWidgets3/include/wx/generic/textdlgg.h +++ b/Externals/wxWidgets3/include/wx/generic/textdlgg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: textdlgg.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -37,16 +36,33 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxGetPasswordFromUserPromptStr[]; class WXDLLIMPEXP_CORE wxTextEntryDialog : public wxDialog { public: + wxTextEntryDialog() + { + m_textctrl = NULL; + } + wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr, const wxString& value = wxEmptyString, long style = wxTextEntryDialogStyle, - const wxPoint& pos = wxDefaultPosition); + const wxPoint& pos = wxDefaultPosition) + { + Create(parent, message, caption, value, style, pos); + } + + bool Create(wxWindow *parent, + const wxString& message, + const wxString& caption = wxGetTextFromUserPromptStr, + const wxString& value = wxEmptyString, + long style = wxTextEntryDialogStyle, + const wxPoint& pos = wxDefaultPosition); void SetValue(const wxString& val); wxString GetValue() const { return m_value; } + void SetMaxLength(unsigned long len); + #if wxUSE_VALIDATORS void SetTextValidator( const wxTextValidator& validator ); #if WXWIN_COMPATIBILITY_2_8 @@ -54,8 +70,10 @@ public: #endif void SetTextValidator( wxTextValidatorStyle style = wxFILTER_NONE ); wxTextValidator* GetTextValidator() { return (wxTextValidator*)m_textctrl->GetValidator(); } -#endif - // wxUSE_VALIDATORS +#endif // wxUSE_VALIDATORS + + virtual bool TransferDataToWindow(); + virtual bool TransferDataFromWindow(); // implementation only void OnOK(wxCommandEvent& event); diff --git a/Externals/wxWidgets3/include/wx/generic/timectrl.h b/Externals/wxWidgets3/include/wx/generic/timectrl.h index c04ab8f254..20b02498bd 100644 --- a/Externals/wxWidgets3/include/wx/generic/timectrl.h +++ b/Externals/wxWidgets3/include/wx/generic/timectrl.h @@ -3,7 +3,6 @@ // Purpose: Generic implementation of wxTimePickerCtrl. // Author: Paul Breen, Vadim Zeitlin // Created: 2011-09-22 -// RCS-ID: $Id: timectrl.h 69489 2011-10-20 16:45:48Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/generic/treectlg.h b/Externals/wxWidgets3/include/wx/generic/treectlg.h index 45be6d54a9..53b3942835 100644 --- a/Externals/wxWidgets3/include/wx/generic/treectlg.h +++ b/Externals/wxWidgets3/include/wx/generic/treectlg.h @@ -4,7 +4,6 @@ // Author: Robert Roebling // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: treectlg.h 65587 2010-09-22 10:06:39Z SJL $ // Copyright: (c) 1997,1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -65,7 +64,6 @@ public: const wxValidator &validator = wxDefaultValidator, const wxString& name = wxTreeCtrlNameStr); - // implement base class pure virtuals // ---------------------------------- @@ -169,6 +167,8 @@ public: virtual void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false); + virtual void EnableBellOnNoMatch(bool on = true); + virtual void SortChildren(const wxTreeItemId& item); // items geometry @@ -275,6 +275,10 @@ protected: // incremental search data wxString m_findPrefix; wxTimer *m_findTimer; + // This flag is set to 0 if the bell is disabled, 1 if it is enabled and -1 + // if it is globally enabled but has been temporarily disabled because we + // had already beeped for this particular search. + int m_findBell; bool m_dropEffectAboveItem; @@ -352,6 +356,10 @@ protected: virtual wxSize DoGetBestSize() const; private: + // Reset the state of the last find (i.e. keyboard incremental search) + // operation. + void ResetFindState(); + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxGenericTreeCtrl) wxDECLARE_NO_COPY_CLASS(wxGenericTreeCtrl); diff --git a/Externals/wxWidgets3/include/wx/generic/wizard.h b/Externals/wxWidgets3/include/wx/generic/wizard.h index 4f5e2ef67c..2161870077 100644 --- a/Externals/wxWidgets3/include/wx/generic/wizard.h +++ b/Externals/wxWidgets3/include/wx/generic/wizard.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: Robert Vazan (sizers) // Created: 28.09.99 -// RCS-ID: $Id: wizard.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/geometry.h b/Externals/wxWidgets3/include/wx/geometry.h index d8981c5756..37d3a74539 100644 --- a/Externals/wxWidgets3/include/wx/geometry.h +++ b/Externals/wxWidgets3/include/wx/geometry.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 08/05/99 -// RCS-ID: $Id: geometry.h 70493 2012-01-31 19:39:43Z VZ $ // Copyright: (c) 1999 Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -526,9 +525,9 @@ public: */ // single attribute accessors - inline wxPoint2DDouble GetPosition() + wxPoint2DDouble GetPosition() const { return wxPoint2DDouble(m_x, m_y); } - inline wxSize GetSize() + wxSize GetSize() const { return wxSize((int) m_width, (int) m_height); } // for the edge and corner accessors there are two setters counterparts, the Set.. functions keep the other corners at their @@ -655,8 +654,8 @@ public: // single attribute accessors - inline wxPoint2DInt GetPosition() { return wxPoint2DInt(m_x, m_y); } - inline wxSize GetSize() { return wxSize(m_width, m_height); } + wxPoint2DInt GetPosition() const { return wxPoint2DInt(m_x, m_y); } + wxSize GetSize() const { return wxSize(m_width, m_height); } // for the edge and corner accessors there are two setters counterparts, the Set.. functions keep the other corners at their // position whenever sensible, the Move.. functions keep the size of the rect and move the other corners appropriately @@ -778,7 +777,7 @@ inline bool wxRect2DInt::operator != (const wxRect2DInt& rect) const return !(*this == rect); } -class wxTransform2D +class WXDLLIMPEXP_CORE wxTransform2D { public : virtual ~wxTransform2D() { } @@ -793,24 +792,6 @@ public : virtual wxRect2DInt InverseTransform( const wxRect2DInt &r ) const ; }; -inline void wxTransform2D::Transform( wxRect2DInt* r ) const - { wxPoint2DInt a = r->GetLeftTop() , b = r->GetRightBottom(); Transform( &a ); Transform( &b ); *r = wxRect2DInt( a , b ); } - -inline wxPoint2DInt wxTransform2D::Transform( const wxPoint2DInt &pt ) const - { wxPoint2DInt res = pt; Transform( &res ); return res; } - -inline wxRect2DInt wxTransform2D::Transform( const wxRect2DInt &r ) const - { wxRect2DInt res = r; Transform( &res ); return res; } - -inline void wxTransform2D::InverseTransform( wxRect2DInt* r ) const - { wxPoint2DInt a = r->GetLeftTop() , b = r->GetRightBottom(); InverseTransform( &a ); InverseTransform( &b ); *r = wxRect2DInt( a , b ); } - -inline wxPoint2DInt wxTransform2D::InverseTransform( const wxPoint2DInt &pt ) const - { wxPoint2DInt res = pt; InverseTransform( &res ); return res; } - -inline wxRect2DInt wxTransform2D::InverseTransform( const wxRect2DInt &r ) const - { wxRect2DInt res = r; InverseTransform( &res ); return res; } - #endif // wxUSE_GEOMETRY diff --git a/Externals/wxWidgets3/include/wx/gifdecod.h b/Externals/wxWidgets3/include/wx/gifdecod.h index 01b5e96d7f..f0b84fc4bf 100644 --- a/Externals/wxWidgets3/include/wx/gifdecod.h +++ b/Externals/wxWidgets3/include/wx/gifdecod.h @@ -3,7 +3,6 @@ // Purpose: wxGIFDecoder, GIF reader for wxImage and wxAnimation // Author: Guillermo Rodriguez Garcia // Version: 3.02 -// CVS-ID: $Id: gifdecod.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 1999 Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/glcanvas.h b/Externals/wxWidgets3/include/wx/glcanvas.h index c0ae3dbdf9..688d4788b0 100644 --- a/Externals/wxWidgets3/include/wx/glcanvas.h +++ b/Externals/wxWidgets3/include/wx/glcanvas.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: glcanvas.h 70165 2011-12-29 14:42:13Z SN $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/graphics.h b/Externals/wxWidgets3/include/wx/graphics.h index 0b2420faa8..46f60b6884 100644 --- a/Externals/wxWidgets3/include/wx/graphics.h +++ b/Externals/wxWidgets3/include/wx/graphics.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Stefan Csomor -// RCS-ID: $Id: graphics.h 69485 2011-10-20 04:49:12Z RD $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -107,6 +106,7 @@ class WXDLLIMPEXP_FWD_CORE wxGraphicsBitmap; // class WXDLLIMPEXP_FWD_CORE wxGraphicsObjectRefData; +class WXDLLIMPEXP_FWD_CORE wxGraphicsBitmapData; class WXDLLIMPEXP_FWD_CORE wxGraphicsMatrixData; class WXDLLIMPEXP_FWD_CORE wxGraphicsPathData; @@ -174,6 +174,13 @@ public: #if wxUSE_IMAGE wxImage ConvertToImage() const; #endif // wxUSE_IMAGE + + void* GetNativeBitmap() const; + + const wxGraphicsBitmapData* GetBitmapData() const + { return (const wxGraphicsBitmapData*) GetRefData(); } + wxGraphicsBitmapData* GetBitmapData() + { return (wxGraphicsBitmapData*) GetRefData(); } private: DECLARE_DYNAMIC_CLASS(wxGraphicsBitmap) @@ -390,7 +397,7 @@ public: void Add(wxColour col, float pos) { Add(wxGraphicsGradientStop(col, pos)); } // Get the number of stops. - unsigned GetCount() const { return m_stops.size(); } + size_t GetCount() const { return m_stops.size(); } // Return the stop at the given index (which must be valid). wxGraphicsGradientStop Item(unsigned n) const { return m_stops.at(n); } @@ -510,6 +517,16 @@ public: virtual wxGraphicsMatrix CreateMatrix( wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, wxDouble tx=0.0, wxDouble ty=0.0) const; + wxGraphicsMatrix CreateMatrix( const wxAffineMatrix2DBase& mat ) const + { + wxMatrix2D mat2D; + wxPoint2DDouble tr; + mat.Get(&mat2D, &tr); + + return CreateMatrix(mat2D.m_11, mat2D.m_12, mat2D.m_21, mat2D.m_22, + tr.m_x, tr.m_y); + } + // push the current state of the context, ie the transformation matrix on a stack virtual void PushState() = 0; @@ -547,7 +564,7 @@ public: virtual bool SetCompositionMode(wxCompositionMode op) = 0; // returns the size of the graphics context in device coordinates - void GetSize(wxDouble* width, wxDouble* height) + void GetSize(wxDouble* width, wxDouble* height) const { if ( width ) *width = m_width; diff --git a/Externals/wxWidgets3/include/wx/grid.h b/Externals/wxWidgets3/include/wx/grid.h index 406cd3533c..02055658ed 100644 --- a/Externals/wxWidgets3/include/wx/grid.h +++ b/Externals/wxWidgets3/include/wx/grid.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: grid.h 58510 2009-01-30 09:08:37Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/accel.h b/Externals/wxWidgets3/include/wx/gtk/accel.h index e2107d9e61..09ffb61cc1 100644 --- a/Externals/wxWidgets3/include/wx/gtk/accel.h +++ b/Externals/wxWidgets3/include/wx/gtk/accel.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: accel.h 33948 2005-05-04 18:57:50Z JS $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/animate.h b/Externals/wxWidgets3/include/wx/gtk/animate.h index b48fb3a543..1cda545a41 100644 --- a/Externals/wxWidgets3/include/wx/gtk/animate.h +++ b/Externals/wxWidgets3/include/wx/gtk/animate.h @@ -4,7 +4,6 @@ // Author: Julian Smart and Guillermo Rodriguez Garcia // Modified by: Francesco Montorsi // Created: 13/8/99 -// RCS-ID: $Id: animate.h 70520 2012-02-05 22:53:39Z SN $ // Copyright: (c) Julian Smart and Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -95,8 +94,6 @@ public: Create(parent, id, anim, pos, size, style, name); } - void Init(); - bool Create(wxWindow *parent, wxWindowID id, const wxAnimation& anim = wxNullAnimation, const wxPoint& pos = wxDefaultPosition, @@ -146,6 +143,9 @@ protected: // internal vars private: typedef wxAnimationCtrlBase base_type; + + void Init(); + DECLARE_DYNAMIC_CLASS(wxAnimationCtrl) DECLARE_EVENT_TABLE() }; diff --git a/Externals/wxWidgets3/include/wx/gtk/anybutton.h b/Externals/wxWidgets3/include/wx/gtk/anybutton.h index 7dee3e096d..604c72c72a 100644 --- a/Externals/wxWidgets3/include/wx/gtk/anybutton.h +++ b/Externals/wxWidgets3/include/wx/gtk/anybutton.h @@ -3,7 +3,6 @@ // Purpose: wxGTK wxAnyButton class declaration // Author: Robert Roebling // Created: 1998-05-20 (extracted from button.h) -// Id: $Id: anybutton.h 67931 2011-06-14 13:00:42Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/app.h b/Externals/wxWidgets3/include/wx/gtk/app.h index 00028aca9d..6f112a3c88 100644 --- a/Externals/wxWidgets3/include/wx/gtk/app.h +++ b/Externals/wxWidgets3/include/wx/gtk/app.h @@ -2,7 +2,6 @@ // Name: wx/gtk/app.h // Purpose: wxApp definition for wxGTK // Author: Robert Roebling -// Id: $Id: app.h 69020 2011-09-07 16:56:50Z PC $ // Copyright: (c) 1998 Robert Roebling, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -56,6 +55,13 @@ public: // must return XVisualInfo pointer (it is not freed by caller) virtual void *GetXVisualInfo() { return NULL; } + // Check if we're using a global menu. Currently this is only true when + // running under Ubuntu Unity and global menu is not disabled. + // + // This is mostly used in the implementation in order to work around + // various bugs arising due to this. + static bool GTKIsUsingGlobalMenu(); + #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 // Maemo-specific method: get the main program object HildonProgram *GetHildonProgram(); diff --git a/Externals/wxWidgets3/include/wx/gtk/assertdlg_gtk.h b/Externals/wxWidgets3/include/wx/gtk/assertdlg_gtk.h index 91197215b6..098e9b1123 100644 --- a/Externals/wxWidgets3/include/wx/gtk/assertdlg_gtk.h +++ b/Externals/wxWidgets3/include/wx/gtk/assertdlg_gtk.h @@ -2,7 +2,6 @@ // Name: wx/gtk/assertdlg_gtk.h // Purpose: GtkAssertDialog // Author: Francesco Montorsi -// Id: $Id: assertdlg_gtk.h 67338 2011-03-30 05:35:24Z PC $ // Copyright: (c) 2006 Francesco Montorsi // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////// */ @@ -72,7 +71,6 @@ void gtk_assert_dialog_set_backtrace_callback(GtkAssertDialog *assertdlg, /* appends a stack frame to the dialog */ void gtk_assert_dialog_append_stack_frame(GtkAssertDialog *dlg, const gchar *function, - const gchar *arguments, const gchar *sourcefile, guint line_number); diff --git a/Externals/wxWidgets3/include/wx/gtk/bitmap.h b/Externals/wxWidgets3/include/wx/gtk/bitmap.h index a6e6634320..42e2d4d4d3 100644 --- a/Externals/wxWidgets3/include/wx/gtk/bitmap.h +++ b/Externals/wxWidgets3/include/wx/gtk/bitmap.h @@ -2,7 +2,6 @@ // Name: wx/gtk/bitmap.h // Purpose: // Author: Robert Roebling -// RCS-ID: $Id: bitmap.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -10,6 +9,10 @@ #ifndef _WX_GTK_BITMAP_H_ #define _WX_GTK_BITMAP_H_ +#ifdef __WXGTK3__ +typedef struct _cairo cairo_t; +typedef struct _cairo_surface cairo_surface_t; +#endif typedef struct _GdkPixbuf GdkPixbuf; class WXDLLIMPEXP_FWD_CORE wxPixelDataBase; @@ -28,16 +31,29 @@ public: #endif // wxUSE_PALETTE wxMask( const wxBitmap& bitmap ); virtual ~wxMask(); + wxBitmap GetBitmap() const; // implementation - GdkPixmap* m_bitmap; - GdkPixmap* GetBitmap() const; +#ifdef __WXGTK3__ + wxMask(cairo_surface_t*); + operator cairo_surface_t*() const; +#else + wxMask(GdkPixmap*); + operator GdkPixmap*() const; +#endif protected: virtual void FreeData(); virtual bool InitFromColour(const wxBitmap& bitmap, const wxColour& colour); virtual bool InitFromMonoBitmap(const wxBitmap& bitmap); +private: +#ifdef __WXGTK3__ + cairo_surface_t* m_bitmap; +#else + GdkPixmap* m_bitmap; +#endif + DECLARE_DYNAMIC_CLASS(wxMask) }; @@ -62,14 +78,17 @@ public: #endif wxBitmap( const wxString &filename, wxBitmapType type = wxBITMAP_DEFAULT_TYPE ); #if wxUSE_IMAGE - wxBitmap( const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH ) - { (void)CreateFromImage(image, depth); } + wxBitmap(const wxImage& image, int depth = wxBITMAP_SCREEN_DEPTH); #endif // wxUSE_IMAGE + wxBitmap(GdkPixbuf* pixbuf, int depth = 0); virtual ~wxBitmap(); bool Create(int width, int height, int depth = wxBITMAP_SCREEN_DEPTH); bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) { return Create(sz.GetWidth(), sz.GetHeight(), depth); } + bool Create(int width, int height, const wxDC& WXUNUSED(dc)) + { return Create(width,height); } + virtual int GetHeight() const; virtual int GetWidth() const; @@ -84,6 +103,7 @@ public: wxMask *GetMask() const; void SetMask( wxMask *mask ); + wxBitmap GetMaskBitmap() const; wxBitmap GetSubBitmap( const wxRect& rect ) const; @@ -105,11 +125,18 @@ public: void SetHeight( int height ); void SetWidth( int width ); void SetDepth( int depth ); - void SetPixbuf(GdkPixbuf* pixbuf); +#ifdef __WXGTK3__ + GdkPixbuf* GetPixbufNoMask() const; + cairo_t* CairoCreate() const; + void Draw(cairo_t* cr, int x, int y, bool useMask = true, const wxColour* fg = NULL, const wxColour* bg = NULL) const; + void SetSourceSurface(cairo_t* cr, int x, int y, const wxColour* fg = NULL, const wxColour* bg = NULL) const; +#else GdkPixmap *GetPixmap() const; bool HasPixmap() const; bool HasPixbuf() const; + wxBitmap(GdkPixmap* pixmap); +#endif GdkPixbuf *GetPixbuf() const; // raw bitmap access support functions @@ -119,14 +146,17 @@ public: bool HasAlpha() const; protected: +#ifndef __WXGTK3__ #if wxUSE_IMAGE bool CreateFromImage(const wxImage& image, int depth); #endif // wxUSE_IMAGE +#endif virtual wxGDIRefData* CreateGDIRefData() const; virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const; private: +#ifndef __WXGTK3__ void SetPixmap(GdkPixmap* pixmap); #if wxUSE_IMAGE // to be called from CreateFromImage only! @@ -144,6 +174,7 @@ public: // removes other representations from memory, keeping only 'keep' // (wxBitmap may keep same bitmap e.g. as both pixmap and pixbuf): void PurgeOtherRepresentations(Representation keep); +#endif DECLARE_DYNAMIC_CLASS(wxBitmap) }; diff --git a/Externals/wxWidgets3/include/wx/gtk/bmpbuttn.h b/Externals/wxWidgets3/include/wx/gtk/bmpbuttn.h index 0bc69997ca..f70e28ceb7 100644 --- a/Externals/wxWidgets3/include/wx/gtk/bmpbuttn.h +++ b/Externals/wxWidgets3/include/wx/gtk/bmpbuttn.h @@ -2,7 +2,6 @@ // Name: wx/gtk/bmpbutton.h // Purpose: // Author: Robert Roebling -// Id: $Id: bmpbuttn.h 61221 2009-06-27 22:22:48Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/bmpcbox.h b/Externals/wxWidgets3/include/wx/gtk/bmpcbox.h index 8da02bda13..f5d00a517b 100644 --- a/Externals/wxWidgets3/include/wx/gtk/bmpcbox.h +++ b/Externals/wxWidgets3/include/wx/gtk/bmpcbox.h @@ -3,7 +3,6 @@ // Purpose: wxBitmapComboBox // Author: Jaakko Salli // Created: 2008-05-19 -// RCS-ID: $Id: bmpcbox.h 61448 2009-07-18 08:33:55Z JMS $ // Copyright: (c) 2008 Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/brush.h b/Externals/wxWidgets3/include/wx/gtk/brush.h index c23da5f79d..37a4845e6e 100644 --- a/Externals/wxWidgets3/include/wx/gtk/brush.h +++ b/Externals/wxWidgets3/include/wx/gtk/brush.h @@ -2,7 +2,6 @@ // Name: wx/gtk/brush.h // Purpose: // Author: Robert Roebling -// Id: $Id: brush.h 54273 2008-06-17 17:28:26Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/button.h b/Externals/wxWidgets3/include/wx/gtk/button.h index 6b8988ed7e..9e7a57d890 100644 --- a/Externals/wxWidgets3/include/wx/gtk/button.h +++ b/Externals/wxWidgets3/include/wx/gtk/button.h @@ -2,7 +2,6 @@ // Name: wx/gtk/button.h // Purpose: wxGTK wxButton class declaration // Author: Robert Roebling -// Id: $Id: button.h 67931 2011-06-14 13:00:42Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/calctrl.h b/Externals/wxWidgets3/include/wx/gtk/calctrl.h index a0cab6253f..3fce698ee5 100644 --- a/Externals/wxWidgets3/include/wx/gtk/calctrl.h +++ b/Externals/wxWidgets3/include/wx/gtk/calctrl.h @@ -2,7 +2,6 @@ // Name: wx/gtk/calctrl.h // Purpose: wxGtkCalendarCtrl control // Author: Marcin Wojdyr -// RCS-ID: $Id: calctrl.h 67987 2011-06-19 22:46:36Z VZ $ // Copyright: (C) 2008 Marcin Wojdyr // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/checkbox.h b/Externals/wxWidgets3/include/wx/gtk/checkbox.h index 3a575127e0..69985fc457 100644 --- a/Externals/wxWidgets3/include/wx/gtk/checkbox.h +++ b/Externals/wxWidgets3/include/wx/gtk/checkbox.h @@ -2,7 +2,6 @@ // Name: wx/gtk/checkbox.h // Purpose: // Author: Robert Roebling -// Id: $Id: checkbox.h 62786 2009-12-05 19:26:39Z PC $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -18,6 +17,7 @@ class WXDLLIMPEXP_CORE wxCheckBox : public wxCheckBoxBase { public: wxCheckBox(); + ~wxCheckBox(); wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, diff --git a/Externals/wxWidgets3/include/wx/gtk/checklst.h b/Externals/wxWidgets3/include/wx/gtk/checklst.h index e81fd9686c..3cfbd76407 100644 --- a/Externals/wxWidgets3/include/wx/gtk/checklst.h +++ b/Externals/wxWidgets3/include/wx/gtk/checklst.h @@ -3,32 +3,18 @@ // Purpose: wxCheckListBox class // Author: Robert Roebling // Modified by: -// RCS-ID: $Id: checklst.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#ifndef __GTKCHECKLISTH__ -#define __GTKCHECKLISTH__ - -// ---------------------------------------------------------------------------- -// macros -// ---------------------------------------------------------------------------- - -// there is no "right" choice of the checkbox indicators, so allow the user to -// define them himself if he wants -#ifndef wxCHECKLBOX_CHECKED - #define wxCHECKLBOX_CHECKED wxT('x') - #define wxCHECKLBOX_UNCHECKED wxT(' ') - - #define wxCHECKLBOX_STRING wxT("[ ] ") -#endif +#ifndef _WX_GTKCHECKLIST_H_ +#define _WX_GTKCHECKLIST_H_ //----------------------------------------------------------------------------- // wxCheckListBox // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxCheckListBox : public wxListBox +class WXDLLIMPEXP_CORE wxCheckListBox : public wxCheckListBoxBase { public: wxCheckListBox(); @@ -36,7 +22,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, int nStrings = 0, - const wxString *choices = (const wxString *)NULL, + const wxString *choices = NULL, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); @@ -48,8 +34,8 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxListBoxNameStr); - bool IsChecked(unsigned int index) const; - void Check(unsigned int index, bool check = true); + virtual bool IsChecked(unsigned int index) const; + virtual void Check(unsigned int index, bool check = true); int GetItemHeight() const; @@ -59,4 +45,4 @@ private: DECLARE_DYNAMIC_CLASS(wxCheckListBox) }; -#endif //__GTKCHECKLISTH__ +#endif // _WX_GTKCHECKLIST_H_ diff --git a/Externals/wxWidgets3/include/wx/gtk/chkconf.h b/Externals/wxWidgets3/include/wx/gtk/chkconf.h index 5566d4cef6..84595b256c 100644 --- a/Externals/wxWidgets3/include/wx/gtk/chkconf.h +++ b/Externals/wxWidgets3/include/wx/gtk/chkconf.h @@ -3,7 +3,6 @@ * Purpose: wxGTK-specific settings consistency checks * Author: Vadim Zeitlin * Created: 2007-07-19 (extracted from wx/chkconf.h) - * RCS-ID: $Id: chkconf.h 47564 2007-07-19 15:47:11Z VZ $ * Copyright: (c) 2000-2007 Vadim Zeitlin * Licence: wxWindows licence */ @@ -29,3 +28,71 @@ # endif # endif #endif /* wxUSE_JOYSTICK */ + +#if wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW && !wxUSE_POSTSCRIPT +# undef wxUSE_POSTSCRIPT +# define wxUSE_POSTSCRIPT 1 +#endif + +#if wxUSE_OWNER_DRAWN +# undef wxUSE_OWNER_DRAWN +# define wxUSE_OWNER_DRAWN 0 +#endif + +#if wxUSE_METAFILE +# undef wxUSE_METAFILE +# define wxUSE_METAFILE 0 +#endif + +#if wxUSE_ENH_METAFILE +# undef wxUSE_ENH_METAFILE +# define wxUSE_ENH_METAFILE 0 +#endif + +#ifndef __UNIX__ + +# undef wxUSE_WEBVIEW +# define wxUSE_WEBVIEW 0 +# undef wxUSE_WEBVIEW_WEBKIT +# define wxUSE_WEBVIEW_WEBKIT 0 + +# undef wxUSE_MEDIACTRL +# define wxUSE_MEDIACTRL 0 + + /* + We could use GDK_WINDOWING_X11 for those but this would require + including gdk/gdk.h and we don't want to do it from here, so assume + we're not using X11 if we're not under Unix. + */ + +# undef wxUSE_UIACTIONSIMULATOR +# define wxUSE_UIACTIONSIMULATOR 0 + +# undef wxUSE_GLCANVAS +# define wxUSE_GLCANVAS 0 + +#endif /* __UNIX__ */ + +/* + We always need Cairo with wxGTK, enable it if necessary (this can only + happen under Windows). + */ +#ifdef __WINDOWS__ + +#if !wxUSE_CAIRO +# undef wxUSE_CAIRO +# define wxUSE_CAIRO 1 +#endif + +#endif /* __WINDOWS__ */ + +#ifdef __WXGTK3__ + #if !wxUSE_GRAPHICS_CONTEXT + #ifdef wxABORT_ON_CONFIG_ERROR + #error "GTK+ 3 support requires wxGraphicsContext" + #else + #undef wxUSE_GRAPHICS_CONTEXT + #define wxUSE_GRAPHICS_CONTEXT 1 + #endif + #endif +#endif diff --git a/Externals/wxWidgets3/include/wx/gtk/choice.h b/Externals/wxWidgets3/include/wx/gtk/choice.h index 026eac4a1f..d952a0fa2c 100644 --- a/Externals/wxWidgets3/include/wx/gtk/choice.h +++ b/Externals/wxWidgets3/include/wx/gtk/choice.h @@ -2,7 +2,6 @@ // Name: wx/gtk/choice.h // Purpose: // Author: Robert Roebling -// Id: $Id: choice.h 65818 2010-10-15 23:46:32Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -64,8 +63,6 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr ); - void SendSelectionChangedEvent(wxEventType evt_type); - int GetSelection() const; void SetSelection(int n); @@ -95,6 +92,7 @@ protected: int m_stringCellIndex; virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; virtual int DoInsertItems(const wxArrayStringsAdapter& items, unsigned int pos, void **clientData, wxClientDataType type); diff --git a/Externals/wxWidgets3/include/wx/gtk/clipbrd.h b/Externals/wxWidgets3/include/wx/gtk/clipbrd.h index 51af594ef7..28d84df815 100644 --- a/Externals/wxWidgets3/include/wx/gtk/clipbrd.h +++ b/Externals/wxWidgets3/include/wx/gtk/clipbrd.h @@ -2,7 +2,6 @@ // Name: wx/gtk/clipbrd.h // Purpose: wxClipboard for wxGTK // Author: Robert Roebling, Vadim Zeitlin -// Id: $Id: clipbrd.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Robert Roebling // (c) 2007 Vadim Zeitlin // Licence: wxWindows licence @@ -118,6 +117,9 @@ private: GtkWidget *m_clipboardWidget; // for getting and offering data GtkWidget *m_targetsWidget; // for getting list of supported formats + // ID of the connection to "selection_get" signal, initially 0. + unsigned long m_idSelectionGetHandler; + bool m_open; bool m_formatSupported; diff --git a/Externals/wxWidgets3/include/wx/gtk/clrpicker.h b/Externals/wxWidgets3/include/wx/gtk/clrpicker.h index e21dd85c51..4a375fb849 100644 --- a/Externals/wxWidgets3/include/wx/gtk/clrpicker.h +++ b/Externals/wxWidgets3/include/wx/gtk/clrpicker.h @@ -5,7 +5,6 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Francesco Montorsi -// RCS-ID: $Id: clrpicker.h 49668 2007-11-06 00:32:34Z MR $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -52,8 +51,8 @@ protected: public: // used by the GTK callback only - void SetGdkColor(const GdkColor& gdkColor) - { m_colour = wxColor(gdkColor); } + void GTKSetColour(const wxColour& colour) + { m_colour = colour; } wxWindow *m_topParent; diff --git a/Externals/wxWidgets3/include/wx/gtk/collpane.h b/Externals/wxWidgets3/include/wx/gtk/collpane.h index 6ae545e257..7503b8e1b2 100644 --- a/Externals/wxWidgets3/include/wx/gtk/collpane.h +++ b/Externals/wxWidgets3/include/wx/gtk/collpane.h @@ -4,7 +4,6 @@ // Author: Francesco Montorsi // Modified by: // Created: 8/10/2006 -// RCS-ID: $Id: collpane.h 58632 2009-02-03 09:53:33Z RR $ // Copyright: (c) Francesco Montorsi // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -35,11 +34,6 @@ public: Create(parent, winid, label, pos, size, style, val, name); } - void Init() - { - m_bIgnoreNextChange = false; - } - bool Create(wxWindow *parent, wxWindowID winid, const wxString& label, @@ -69,6 +63,11 @@ public: // used by GTK callbacks wxString m_strLabel; private: + void Init() + { + m_bIgnoreNextChange = false; + } + void OnSize(wxSizeEvent&); virtual void AddChildGTK(wxWindowGTK* child); GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; diff --git a/Externals/wxWidgets3/include/wx/gtk/colordlg.h b/Externals/wxWidgets3/include/wx/gtk/colordlg.h index b0cac3cfe7..a1fdbb75ec 100644 --- a/Externals/wxWidgets3/include/wx/gtk/colordlg.h +++ b/Externals/wxWidgets3/include/wx/gtk/colordlg.h @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 2004/06/04 -// RCS-ID: $Id: colordlg.h 66615 2011-01-07 05:26:57Z PC $ // Copyright: (c) Vaclav Slavik, 2004 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/colour.h b/Externals/wxWidgets3/include/wx/gtk/colour.h index 54ed5ec5b8..d48d707cbe 100644 --- a/Externals/wxWidgets3/include/wx/gtk/colour.h +++ b/Externals/wxWidgets3/include/wx/gtk/colour.h @@ -2,7 +2,6 @@ // Name: wx/gtk/colour.h // Purpose: // Author: Robert Roebling -// Id: $Id: colour.h 50897 2007-12-22 15:03:58Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -10,6 +9,10 @@ #ifndef _WX_GTK_COLOUR_H_ #define _WX_GTK_COLOUR_H_ +#ifdef __WXGTK3__ +typedef struct _GdkRGBA GdkRGBA; +#endif + //----------------------------------------------------------------------------- // wxColour //----------------------------------------------------------------------------- @@ -21,6 +24,9 @@ public: // ------------ DEFINE_STD_WXCOLOUR_CONSTRUCTORS wxColour(const GdkColor& gdkColor); +#ifdef __WXGTK3__ + wxColour(const GdkRGBA& gdkRGBA); +#endif virtual ~wxColour(); @@ -33,8 +39,12 @@ public: unsigned char Alpha() const; // Implementation part +#ifdef __WXGTK3__ + operator const GdkRGBA*() const; +#else void CalcPixel( GdkColormap *cmap ); int GetPixel() const; +#endif const GdkColor *GetColor() const; protected: @@ -43,7 +53,6 @@ protected: virtual bool FromString(const wxString& str); -private: DECLARE_DYNAMIC_CLASS(wxColour) }; diff --git a/Externals/wxWidgets3/include/wx/gtk/combobox.h b/Externals/wxWidgets3/include/wx/gtk/combobox.h index 87154df510..c655991e3c 100644 --- a/Externals/wxWidgets3/include/wx/gtk/combobox.h +++ b/Externals/wxWidgets3/include/wx/gtk/combobox.h @@ -3,7 +3,6 @@ // Purpose: // Author: Robert Roebling // Created: 01/02/97 -// Id: $Id: combobox.h 70880 2012-03-11 23:55:19Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -56,6 +55,7 @@ public: Init(); Create(parent, id, value, pos, size, choices, style, validator, name); } + ~wxComboBox(); bool Create(wxWindow *parent, wxWindowID id, const wxString& value = wxEmptyString, @@ -144,6 +144,8 @@ protected: // custom list stores. virtual void GTKCreateComboBoxWidget(); + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + virtual GtkEntry *GetEntry() const { return m_entry; } diff --git a/Externals/wxWidgets3/include/wx/gtk/control.h b/Externals/wxWidgets3/include/wx/gtk/control.h index 3d00b42278..454d1fc90d 100644 --- a/Externals/wxWidgets3/include/wx/gtk/control.h +++ b/Externals/wxWidgets3/include/wx/gtk/control.h @@ -2,7 +2,6 @@ // Name: wx/gtk/control.h // Purpose: // Author: Robert Roebling -// Id: $Id: control.h 70714 2012-02-27 17:49:33Z PC $ // Copyright: (c) 1998 Robert Roebling, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,20 +11,15 @@ typedef struct _GtkLabel GtkLabel; typedef struct _GtkFrame GtkFrame; +typedef struct _GtkEntry GtkEntry; //----------------------------------------------------------------------------- // wxControl //----------------------------------------------------------------------------- -// C-linkage function pointer types for GetDefaultAttributesFromGTKWidget -extern "C" { - typedef GtkWidget* (*wxGtkWidgetNew_t)(void); - typedef GtkWidget* (*wxGtkWidgetNewFromStr_t)(const char*); - typedef GtkWidget* (*wxGtkWidgetNewFromAdj_t)(GtkAdjustment*); -} - class WXDLLIMPEXP_CORE wxControl : public wxControlBase { + typedef wxControlBase base_type; public: wxControl(); wxControl(wxWindow *parent, wxWindowID id, @@ -43,8 +37,10 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxControlNameStr); - virtual wxVisualAttributes GetDefaultAttributes() const; +#ifdef __WXGTK3__ + virtual bool SetFont(const wxFont& font); +#endif protected: virtual wxSize DoGetBestSize() const; @@ -76,19 +72,6 @@ protected: GetDefaultAttributesFromGTKWidget(GtkWidget* widget, bool useBase = false, int state = 0); - static wxVisualAttributes - GetDefaultAttributesFromGTKWidget(wxGtkWidgetNew_t, - bool useBase = false, - int state = 0); - static wxVisualAttributes - GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromStr_t, - bool useBase = false, - int state = 0); - - static wxVisualAttributes - GetDefaultAttributesFromGTKWidget(wxGtkWidgetNewFromAdj_t, - bool useBase = false, - int state = 0); // Widgets that use the style->base colour for the BG colour should // override this and return true. @@ -97,6 +80,12 @@ protected: // Fix sensitivity due to bug in GTK+ < 2.14 void GTKFixSensitivity(bool onlyIfUnderMouse = true); + // Ask GTK+ for preferred size. Use it after setting the font. + wxSize GTKGetPreferredSize(GtkWidget* widget) const; + + // Inner margins in a GtkEntry + wxPoint GTKGetEntryMargins(GtkEntry* entry) const; + private: DECLARE_DYNAMIC_CLASS(wxControl) }; diff --git a/Externals/wxWidgets3/include/wx/gtk/cursor.h b/Externals/wxWidgets3/include/wx/gtk/cursor.h index 583d9889e1..e1915efc1d 100644 --- a/Externals/wxWidgets3/include/wx/gtk/cursor.h +++ b/Externals/wxWidgets3/include/wx/gtk/cursor.h @@ -2,7 +2,6 @@ // Name: wx/gtk/cursor.h // Purpose: // Author: Robert Roebling -// Id: $Id: cursor.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/dataform.h b/Externals/wxWidgets3/include/wx/gtk/dataform.h index 6ec92c66c2..b7c3be71f3 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dataform.h +++ b/Externals/wxWidgets3/include/wx/gtk/dataform.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.10.99 (extracted from gtk/dataobj.h) -// RCS-ID: $Id: dataform.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/dataobj.h b/Externals/wxWidgets3/include/wx/gtk/dataobj.h index 108250ee08..859093fcb2 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dataobj.h +++ b/Externals/wxWidgets3/include/wx/gtk/dataobj.h @@ -2,7 +2,6 @@ // Name: wx/gtk/dataobj.h // Purpose: declaration of the wxDataObject // Author: Robert Roebling -// RCS-ID: $Id: dataobj.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/dataobj2.h b/Externals/wxWidgets3/include/wx/gtk/dataobj2.h index 1e6f81919d..62f380a429 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dataobj2.h +++ b/Externals/wxWidgets3/include/wx/gtk/dataobj2.h @@ -3,7 +3,6 @@ // Purpose: declaration of standard wxDataObjectSimple-derived classes // Author: Robert Roebling // Created: 19.10.99 (extracted from gtk/dataobj.h) -// RCS-ID: $Id: dataobj2.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -49,7 +48,6 @@ public: } protected: - void Init() { m_pngData = NULL; m_pngSize = 0; } void Clear() { free(m_pngData); } void ClearAll() { Clear(); Init(); } @@ -57,6 +55,9 @@ protected: void *m_pngData; void DoConvertToPng(); + +private: + void Init() { m_pngData = NULL; m_pngSize = 0; } }; // ---------------------------------------------------------------------------- @@ -93,34 +94,19 @@ public: // wxURLDataObject is a specialization of wxDataObject for URLs // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxURLDataObject : public wxDataObjectSimple +class WXDLLIMPEXP_CORE wxURLDataObject : public wxDataObjectComposite { public: wxURLDataObject(const wxString& url = wxEmptyString); - wxString GetURL() const { return m_url; } - void SetURL(const wxString& url) { m_url = url; } - - virtual size_t GetDataSize() const; - virtual bool GetDataHere(void *buf) const; - virtual bool SetData(size_t len, const void *buf); - - // Must provide overloads to avoid hiding them (and warnings about it) - virtual size_t GetDataSize(const wxDataFormat&) const - { - return GetDataSize(); - } - virtual bool GetDataHere(const wxDataFormat&, void *buf) const - { - return GetDataHere(buf); - } - virtual bool SetData(const wxDataFormat&, size_t len, const void *buf) - { - return SetData(len, buf); - } + wxString GetURL() const; + void SetURL(const wxString& url); private: - wxString m_url; + class wxTextURIListDataObject* const m_dobjURIList; + wxTextDataObject* const m_dobjText; + + wxDECLARE_NO_COPY_CLASS(wxURLDataObject); }; diff --git a/Externals/wxWidgets3/include/wx/gtk/dataview.h b/Externals/wxWidgets3/include/wx/gtk/dataview.h index 75463bd02d..44d2af93b2 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dataview.h +++ b/Externals/wxWidgets3/include/wx/gtk/dataview.h @@ -2,7 +2,6 @@ // Name: wx/gtk/dataview.h // Purpose: wxDataViewCtrl GTK+2 implementation header // Author: Robert Roebling -// Id: $Id: dataview.h 70377 2012-01-17 14:05:17Z VS $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/dc.h b/Externals/wxWidgets3/include/wx/gtk/dc.h index 3a2cc8afdc..7eb9dd1267 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dc.h +++ b/Externals/wxWidgets3/include/wx/gtk/dc.h @@ -2,7 +2,6 @@ // Name: wx/gtk/dc.h // Purpose: // Author: Robert Roebling -// Id: $Id: dc.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -10,6 +9,107 @@ #ifndef _WX_GTKDC_H_ #define _WX_GTKDC_H_ +#ifdef __WXGTK3__ + +#include "wx/dcgraph.h" + +class wxGTKCairoDCImpl: public wxGCDCImpl +{ + typedef wxGCDCImpl base_type; +public: + wxGTKCairoDCImpl(wxDC* owner); + wxGTKCairoDCImpl(wxDC* owner, int); + wxGTKCairoDCImpl(wxDC* owner, wxWindow* window); + + virtual void DoDrawBitmap(const wxBitmap& bitmap, int x, int y, bool useMask); + virtual void DoDrawIcon(const wxIcon& icon, int x, int y); +#if wxUSE_IMAGE + virtual bool DoFloodFill(int x, int y, const wxColour& col, wxFloodFillStyle style); +#endif + virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const; + virtual bool DoGetPixel(int x, int y, wxColour* col) const; + virtual void DoGetSize(int* width, int* height) const; + virtual bool DoStretchBlit(int xdest, int ydest, int dstWidth, int dstHeight, wxDC* source, int xsrc, int ysrc, int srcWidth, int srcHeight, wxRasterOperationMode rop, bool useMask, int xsrcMask, int ysrcMask); + virtual void* GetCairoContext() const; + +protected: + int m_width, m_height; + + wxDECLARE_NO_COPY_CLASS(wxGTKCairoDCImpl); +}; +//----------------------------------------------------------------------------- + +class wxWindowDCImpl: public wxGTKCairoDCImpl +{ + typedef wxGTKCairoDCImpl base_type; +public: + wxWindowDCImpl(wxWindowDC* owner, wxWindow* window); + + wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl); +}; +//----------------------------------------------------------------------------- + +class wxClientDCImpl: public wxGTKCairoDCImpl +{ + typedef wxGTKCairoDCImpl base_type; +public: + wxClientDCImpl(wxClientDC* owner, wxWindow* window); + + wxDECLARE_NO_COPY_CLASS(wxClientDCImpl); +}; +//----------------------------------------------------------------------------- + +class wxPaintDCImpl: public wxGTKCairoDCImpl +{ + typedef wxGTKCairoDCImpl base_type; +public: + wxPaintDCImpl(wxPaintDC* owner, wxWindow* window); + + wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl); +}; +//----------------------------------------------------------------------------- + +class wxScreenDCImpl: public wxGTKCairoDCImpl +{ + typedef wxGTKCairoDCImpl base_type; +public: + wxScreenDCImpl(wxScreenDC* owner); + + wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl); +}; +//----------------------------------------------------------------------------- + +class wxMemoryDCImpl: public wxGTKCairoDCImpl +{ + typedef wxGTKCairoDCImpl base_type; +public: + wxMemoryDCImpl(wxMemoryDC* owner); + wxMemoryDCImpl(wxMemoryDC* owner, wxBitmap& bitmap); + wxMemoryDCImpl(wxMemoryDC* owner, wxDC* dc); + virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const; + virtual void DoSelect(const wxBitmap& bitmap); + virtual const wxBitmap& GetSelectedBitmap() const; + virtual wxBitmap& GetSelectedBitmap(); + +private: + void Setup(); + wxBitmap m_bitmap; + + wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl); +}; +//----------------------------------------------------------------------------- + +class WXDLLIMPEXP_CORE wxGTKCairoDC: public wxDC +{ + typedef wxDC base_type; +public: + wxGTKCairoDC(cairo_t* cr); + + wxDECLARE_NO_COPY_CLASS(wxGTKCairoDC); +}; + +#else + #include "wx/dc.h" //----------------------------------------------------------------------------- @@ -35,7 +135,8 @@ public: virtual void EndPage() { } virtual GdkWindow* GetGDKWindow() const { return NULL; } - + virtual void* GetHandle() const { return GetGDKWindow(); } + // base class pure virtuals implemented here virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); virtual void DoGetSizeMM(int* width, int* height) const; @@ -50,4 +151,5 @@ public: #define wxHAS_WORKING_GTK_DC_BLIT #endif +#endif #endif // _WX_GTKDC_H_ diff --git a/Externals/wxWidgets3/include/wx/gtk/dcclient.h b/Externals/wxWidgets3/include/wx/gtk/dcclient.h index c3eb92fcea..53469796a1 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dcclient.h +++ b/Externals/wxWidgets3/include/wx/gtk/dcclient.h @@ -2,7 +2,6 @@ // Name: wx/gtk/dcclient.h // Purpose: // Author: Robert Roebling -// Id: $Id: dcclient.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -11,10 +10,6 @@ #define _WX_GTKDCCLIENT_H_ #include "wx/gtk/dc.h" -#include "wx/dcclient.h" -#include "wx/region.h" - -class WXDLLIMPEXP_FWD_CORE wxWindow; //----------------------------------------------------------------------------- // wxWindowDCImpl @@ -44,9 +39,9 @@ public: double sa, double ea ); virtual void DoDrawPoint( wxCoord x, wxCoord y ); - virtual void DoDrawLines(int n, wxPoint points[], + virtual void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset); - virtual void DoDrawPolygon(int n, wxPoint points[], + virtual void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); diff --git a/Externals/wxWidgets3/include/wx/gtk/dcmemory.h b/Externals/wxWidgets3/include/wx/gtk/dcmemory.h index ede21042bd..8afb45c52e 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dcmemory.h +++ b/Externals/wxWidgets3/include/wx/gtk/dcmemory.h @@ -2,7 +2,6 @@ // Name: wx/gtk/dcmemory.h // Purpose: // Author: Robert Roebling -// RCS-ID: $Id: dcmemory.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -39,7 +38,8 @@ public: // overridden from wxDCImpl virtual void DoGetSize( int *width, int *height ) const; virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const; - + virtual void* GetHandle() const; + // overridden for wxMemoryDC Impl virtual void DoSelect(const wxBitmap& bitmap); diff --git a/Externals/wxWidgets3/include/wx/gtk/dcscreen.h b/Externals/wxWidgets3/include/wx/gtk/dcscreen.h index 3fef9b1a6e..c91926b910 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dcscreen.h +++ b/Externals/wxWidgets3/include/wx/gtk/dcscreen.h @@ -2,7 +2,6 @@ // Name: wx/gtk/dcscreen.h // Purpose: // Author: Robert Roebling -// Id: $Id: dcscreen.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -25,7 +24,7 @@ public: virtual void DoGetSize(int *width, int *height) const; -protected: +private: void Init(); DECLARE_ABSTRACT_CLASS(wxScreenDCImpl) diff --git a/Externals/wxWidgets3/include/wx/gtk/dialog.h b/Externals/wxWidgets3/include/wx/gtk/dialog.h index 4ad6d18bdc..bc6e8625bd 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dialog.h +++ b/Externals/wxWidgets3/include/wx/gtk/dialog.h @@ -3,7 +3,6 @@ // Purpose: // Author: Robert Roebling // Created: -// Id: $Id: dialog.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -39,7 +38,6 @@ public: virtual int ShowModal(); virtual void EndModal( int retCode ); virtual bool IsModal() const; - void SetModal( bool modal ); // implementation // -------------- diff --git a/Externals/wxWidgets3/include/wx/gtk/dirdlg.h b/Externals/wxWidgets3/include/wx/gtk/dirdlg.h index 78e8c02a96..8a05d55796 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dirdlg.h +++ b/Externals/wxWidgets3/include/wx/gtk/dirdlg.h @@ -2,7 +2,6 @@ // Name: wx/gtk/dirdlg.h // Purpose: wxDirDialog // Author: Francesco Montorsi -// Id: $Id: dirdlg.h 70898 2012-03-14 12:32:27Z VZ $ // Copyright: (c) 2006 Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -42,6 +41,11 @@ public: // overrides from wxGenericDirDialog void SetPath(const wxString& path); + // Implementation only. + + void GTKOnAccept(); + void GTKOnCancel(); + protected: // override this from wxTLW since the native // form doesn't have any m_wxwindow @@ -51,10 +55,9 @@ protected: private: - void OnFakeOk( wxCommandEvent &event ); + wxString m_selectedDirectory; DECLARE_DYNAMIC_CLASS(wxDirDialog) - DECLARE_EVENT_TABLE() }; #endif // __GTKDIRDLGH__ diff --git a/Externals/wxWidgets3/include/wx/gtk/dnd.h b/Externals/wxWidgets3/include/wx/gtk/dnd.h index f7725017b5..0aea7b41f6 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dnd.h +++ b/Externals/wxWidgets3/include/wx/gtk/dnd.h @@ -2,7 +2,6 @@ // Name: wx/gtk/dnd.h // Purpose: declaration of the wxDropTarget class // Author: Robert Roebling -// RCS-ID: $Id: dnd.h 69020 2011-09-07 16:56:50Z PC $ // Copyright: (c) 1998 Vadim Zeitlin, Robert Roebling // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -81,6 +80,17 @@ public: virtual ~wxDropSource(); + // set the icon corresponding to given drag result + void SetIcon(wxDragResult res, const wxIcon& icon) + { + if ( res == wxDragCopy ) + m_iconCopy = icon; + else if ( res == wxDragMove ) + m_iconMove = icon; + else + m_iconNone = icon; + } + // start drag action virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); diff --git a/Externals/wxWidgets3/include/wx/gtk/dvrenderer.h b/Externals/wxWidgets3/include/wx/gtk/dvrenderer.h index a8a75dc4fd..dfaba5609a 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dvrenderer.h +++ b/Externals/wxWidgets3/include/wx/gtk/dvrenderer.h @@ -3,7 +3,6 @@ // Purpose: wxDataViewRenderer for GTK wxDataViewCtrl implementation // Author: Robert Roebling, Vadim Zeitlin // Created: 2009-11-07 (extracted from wx/gtk/dataview.h) -// RCS-ID: $Id: dvrenderer.h 69020 2011-09-07 16:56:50Z PC $ // Copyright: (c) 2006 Robert Roebling // (c) 2009 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/gtk/dvrenderers.h b/Externals/wxWidgets3/include/wx/gtk/dvrenderers.h index 95b84d416b..385fa73a0b 100644 --- a/Externals/wxWidgets3/include/wx/gtk/dvrenderers.h +++ b/Externals/wxWidgets3/include/wx/gtk/dvrenderers.h @@ -3,7 +3,6 @@ // Purpose: All GTK wxDataViewCtrl renderer classes // Author: Robert Roebling, Vadim Zeitlin // Created: 2009-11-07 (extracted from wx/gtk/dataview.h) -// RCS-ID: $Id: dvrenderers.h 70300 2012-01-09 06:31:07Z PC $ // Copyright: (c) 2006 Robert Roebling // (c) 2009 Vadim Zeitlin // Licence: wxWindows licence @@ -12,7 +11,12 @@ #ifndef _WX_GTK_DVRENDERERS_H_ #define _WX_GTK_DVRENDERERS_H_ -typedef struct _GdkRectangle GdkRectangle; +#ifdef __WXGTK3__ + typedef struct _cairo_rectangle_int cairo_rectangle_int_t; + typedef cairo_rectangle_int_t GdkRectangle; +#else + typedef struct _GdkRectangle GdkRectangle; +#endif // --------------------------------------------------------- // wxDataViewTextRenderer @@ -137,10 +141,9 @@ public: virtual GtkCellRendererText *GtkGetTextRenderer() const; -protected: +private: bool Init(wxDataViewCellMode mode, int align); -private: // Called from GtkGetTextRenderer() to really create the renderer if // necessary. void GtkInitTextRenderer(); diff --git a/Externals/wxWidgets3/include/wx/gtk/evtloop.h b/Externals/wxWidgets3/include/wx/gtk/evtloop.h index 7a5e31033f..ba8db406d5 100644 --- a/Externals/wxWidgets3/include/wx/gtk/evtloop.h +++ b/Externals/wxWidgets3/include/wx/gtk/evtloop.h @@ -3,7 +3,6 @@ // Purpose: wxGTK event loop implementation // Author: Vadim Zeitlin // Created: 2008-12-27 -// RCS-ID: $Id: evtloop.h 62475 2009-10-22 11:36:35Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -22,22 +21,19 @@ class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase public: wxGUIEventLoop(); - virtual int Run(); - virtual void Exit(int rc = 0); + virtual void ScheduleExit(int rc = 0); virtual bool Pending() const; virtual bool Dispatch(); virtual int DispatchTimeout(unsigned long timeout); virtual void WakeUp(); virtual bool YieldFor(long eventsToProcess); -#if wxUSE_EVENTLOOP_SOURCE - virtual wxEventLoopSource * - AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags); -#endif // wxUSE_EVENTLOOP_SOURCE - void StoreGdkEventForLaterProcessing(GdkEvent* ev) { m_arrGdkEvents.Add(ev); } +protected: + virtual int DoRun(); + private: // the exit code of this event loop int m_exitcode; diff --git a/Externals/wxWidgets3/include/wx/gtk/evtloopsrc.h b/Externals/wxWidgets3/include/wx/gtk/evtloopsrc.h index 6a59895f64..f80523424d 100644 --- a/Externals/wxWidgets3/include/wx/gtk/evtloopsrc.h +++ b/Externals/wxWidgets3/include/wx/gtk/evtloopsrc.h @@ -3,7 +3,6 @@ // Purpose: wxGTKEventLoopSource class // Author: Vadim Zeitlin // Created: 2009-10-21 -// RCS-ID: $Id: evtloopsrc.h 64140 2010-04-25 21:33:16Z FM $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/filectrl.h b/Externals/wxWidgets3/include/wx/gtk/filectrl.h index 1551923ec3..3de17e3af8 100644 --- a/Externals/wxWidgets3/include/wx/gtk/filectrl.h +++ b/Externals/wxWidgets3/include/wx/gtk/filectrl.h @@ -4,7 +4,6 @@ // Author: Diaa M. Sami // Modified by: // Created: Aug-10-2007 -// RCS-ID: $Id: filectrl.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) Diaa M. Sami // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -88,9 +87,8 @@ public: Create( parent, id, defaultDirectory, defaultFilename, wildCard, style, pos, size, name ); } - virtual ~wxGtkFileCtrl() {} + virtual ~wxGtkFileCtrl(); - void Init(); bool Create( wxWindow *parent, wxWindowID id, const wxString& defaultDirectory = wxEmptyString, @@ -134,6 +132,9 @@ protected: wxGtkFileChooser m_fc; wxString m_wildCard; +private: + void Init(); + DECLARE_DYNAMIC_CLASS( wxGtkFileCtrl ) }; diff --git a/Externals/wxWidgets3/include/wx/gtk/filedlg.h b/Externals/wxWidgets3/include/wx/gtk/filedlg.h index 667e94a359..377734db79 100644 --- a/Externals/wxWidgets3/include/wx/gtk/filedlg.h +++ b/Externals/wxWidgets3/include/wx/gtk/filedlg.h @@ -2,7 +2,6 @@ // Name: wx/gtk/filedlg.h // Purpose: // Author: Robert Roebling -// Id: $Id: filedlg.h 70898 2012-03-14 12:32:27Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -43,7 +42,6 @@ public: virtual wxString GetPath() const; virtual void GetPaths(wxArrayString& paths) const; - virtual wxString GetDirectory() const; virtual wxString GetFilename() const; virtual void GetFilenames(wxArrayString& files) const; virtual int GetFilterIndex() const; @@ -59,6 +57,9 @@ public: virtual bool SupportsExtraControl() const { return true; } + // Implementation only. + void GTKSelectionChanged(const wxString& filename); + protected: // override this from wxTLW since the native diff --git a/Externals/wxWidgets3/include/wx/gtk/filehistory.h b/Externals/wxWidgets3/include/wx/gtk/filehistory.h index 9125f89928..70a93d6f5e 100644 --- a/Externals/wxWidgets3/include/wx/gtk/filehistory.h +++ b/Externals/wxWidgets3/include/wx/gtk/filehistory.h @@ -3,7 +3,6 @@ // Purpose: GTK+ bits for wxFileHistory // Author: Vaclav Slavik // Created: 2010-05-06 -// RCS-ID: $Id: filehistory.h 64240 2010-05-07 06:45:48Z VS $ // Copyright: (c) 2010 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/filepicker.h b/Externals/wxWidgets3/include/wx/gtk/filepicker.h index ad6be66083..27e1fdc779 100644 --- a/Externals/wxWidgets3/include/wx/gtk/filepicker.h +++ b/Externals/wxWidgets3/include/wx/gtk/filepicker.h @@ -5,7 +5,6 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Francesco Montorsi -// RCS-ID: $Id: filepicker.h 70043 2011-12-18 12:34:47Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -34,13 +33,6 @@ return NULL; \ } \ \ - virtual bool Destroy() \ - { \ - if (m_dialog) \ - m_dialog->Destroy(); \ - return wxButton::Destroy(); \ - } \ - \ /* even if wx derive from wxGenericFileButton, i.e. from wxButton, our */ \ /* native GTK+ widget does not derive from GtkButton thus *all* uses */ \ /* GTK_BUTTON(m_widget) macro done by wxButton must be bypassed to */ \ @@ -107,8 +99,6 @@ public: // overrides FILEDIRBTN_OVERRIDES protected: - virtual bool GTKShouldConnectSizeRequest() const { return false; } - wxDialog *m_dialog; private: @@ -178,13 +168,6 @@ public: // overrides FILEDIRBTN_OVERRIDES protected: - // common part of all ctors - void Init() - { - m_dialog = NULL; - m_bIgnoreNextChange = false; - } - wxDialog *m_dialog; public: // used by the GTK callback only @@ -194,6 +177,12 @@ public: // used by the GTK callback only void GTKUpdatePath(const char *gtkpath); private: + void Init() + { + m_dialog = NULL; + m_bIgnoreNextChange = false; + } + DECLARE_DYNAMIC_CLASS(wxDirButton) }; diff --git a/Externals/wxWidgets3/include/wx/gtk/font.h b/Externals/wxWidgets3/include/wx/gtk/font.h index 53bc2d6441..a218a29dfe 100644 --- a/Externals/wxWidgets3/include/wx/gtk/font.h +++ b/Externals/wxWidgets3/include/wx/gtk/font.h @@ -2,7 +2,6 @@ // Name: wx/gtk/font.h // Purpose: // Author: Robert Roebling -// Id: $Id: font.h 70476 2012-01-29 08:14:34Z PC $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,7 +18,8 @@ class WXDLLIMPEXP_CORE wxFont : public wxFontBase public: wxFont() { } - // wxGTK-specific + wxFont(const wxFontInfo& info); + wxFont(const wxString& nativeFontInfoString) { Create(nativeFontInfoString); @@ -63,12 +63,6 @@ public: SetPixelSize(pixelSize); } - wxFont(int pointSize, - wxFontFamily family, - int flags = wxFONTFLAG_DEFAULT, - const wxString& face = wxEmptyString, - wxFontEncoding encoding = wxFONTENCODING_DEFAULT); - bool Create(int size, wxFontFamily family, wxFontStyle style, @@ -119,15 +113,14 @@ public: protected: virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info ); - // common part of all ctors - void Init(); - virtual wxGDIRefData* CreateGDIRefData() const; virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const; virtual wxFontFamily DoGetFamily() const; private: + void Init(); + DECLARE_DYNAMIC_CLASS(wxFont) }; diff --git a/Externals/wxWidgets3/include/wx/gtk/fontdlg.h b/Externals/wxWidgets3/include/wx/gtk/fontdlg.h index 18db2771c0..4c5b57a3e3 100644 --- a/Externals/wxWidgets3/include/wx/gtk/fontdlg.h +++ b/Externals/wxWidgets3/include/wx/gtk/fontdlg.h @@ -3,13 +3,12 @@ // Purpose: wxFontDialog // Author: Robert Roebling // Created: -// RCS-ID: $Id: fontdlg.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef __GTK_FONTDLGH__ -#define __GTK_FONTDLGH__ +#ifndef _WX_GTK_FONTDLG_H_ +#define _WX_GTK_FONTDLG_H_ //----------------------------------------------------------------------------- // wxFontDialog @@ -26,9 +25,6 @@ public: virtual ~wxFontDialog(); - // implementation only - void SetChosenFont(const char *name); - #if WXWIN_COMPATIBILITY_2_6 // deprecated interface, don't use wxDEPRECATED( wxFontDialog(wxWindow *parent, const wxFontData *data) ); @@ -38,7 +34,6 @@ protected: // create the GTK dialog virtual bool DoCreate(wxWindow *parent); -private: DECLARE_DYNAMIC_CLASS(wxFontDialog) }; diff --git a/Externals/wxWidgets3/include/wx/gtk/fontpicker.h b/Externals/wxWidgets3/include/wx/gtk/fontpicker.h index 505090e762..65bb5c9593 100644 --- a/Externals/wxWidgets3/include/wx/gtk/fontpicker.h +++ b/Externals/wxWidgets3/include/wx/gtk/fontpicker.h @@ -5,7 +5,6 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Francesco Montorsi -// RCS-ID: $Id: fontpicker.h 69020 2011-09-07 16:56:50Z PC $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/frame.h b/Externals/wxWidgets3/include/wx/gtk/frame.h index a4a4bbe6f0..1f172c43c1 100644 --- a/Externals/wxWidgets3/include/wx/gtk/frame.h +++ b/Externals/wxWidgets3/include/wx/gtk/frame.h @@ -2,7 +2,6 @@ // Name: wx/gtk/frame.h // Purpose: // Author: Robert Roebling -// Id: $Id: frame.h 66648 2011-01-08 06:42:41Z PC $ // Copyright: (c) 1998 Robert Roebling, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -64,9 +63,6 @@ public: virtual bool SendIdleEvents(wxIdleEvent& event); protected: - // common part of all ctors - void Init(); - // override wxWindow methods to take into account tool/menu/statusbars virtual void DoGetClientSize( int *width, int *height ) const; @@ -76,6 +72,8 @@ protected: #endif // wxUSE_MENUS_NATIVE private: + void Init(); + long m_fsSaveFlag; DECLARE_DYNAMIC_CLASS(wxFrame) diff --git a/Externals/wxWidgets3/include/wx/gtk/gauge.h b/Externals/wxWidgets3/include/wx/gtk/gauge.h index 7f065f2657..8df47461e5 100644 --- a/Externals/wxWidgets3/include/wx/gtk/gauge.h +++ b/Externals/wxWidgets3/include/wx/gtk/gauge.h @@ -2,7 +2,6 @@ // Name: wx/gtk/gauge.h // Purpose: // Author: Robert Roebling -// Id: $Id: gauge.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -71,15 +70,14 @@ public: m_gaugePos; protected: - // common part of all ctors - void Init() { m_rangeMax = m_gaugePos = 0; } - // set the gauge value to the value of m_gaugePos void DoSetGauge(); virtual wxSize DoGetBestSize() const; private: + void Init() { m_rangeMax = m_gaugePos = 0; } + DECLARE_DYNAMIC_CLASS(wxGauge) }; diff --git a/Externals/wxWidgets3/include/wx/gtk/glcanvas.h b/Externals/wxWidgets3/include/wx/gtk/glcanvas.h index 1d7d925501..01591149b5 100644 --- a/Externals/wxWidgets3/include/wx/gtk/glcanvas.h +++ b/Externals/wxWidgets3/include/wx/gtk/glcanvas.h @@ -4,7 +4,6 @@ // Author: Robert Roebling // Modified by: // Created: 17/8/98 -// RCS-ID: $Id: glcanvas.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -39,6 +38,7 @@ public: const int *attribList = NULL, const wxPalette& palette = wxNullPalette); + virtual bool SetBackgroundStyle(wxBackgroundStyle style); // implement wxGLCanvasX11 methods // -------------------------------- @@ -93,6 +93,9 @@ public: void OnInternalIdle(); bool m_exposed; +#ifdef __WXGTK3__ + cairo_t* m_cairoPaintContext; +#endif #if WXWIN_COMPATIBILITY_2_8 wxGLContext *m_sharedContext; diff --git a/Externals/wxWidgets3/include/wx/gtk/gnome/gprint.h b/Externals/wxWidgets3/include/wx/gtk/gnome/gprint.h index 5b0eca3b5a..21ee1b04b2 100644 --- a/Externals/wxWidgets3/include/wx/gtk/gnome/gprint.h +++ b/Externals/wxWidgets3/include/wx/gtk/gnome/gprint.h @@ -3,7 +3,6 @@ // Author: Robert Roebling // Purpose: GNOME printing support // Created: 09/20/04 -// RCS-ID: $Id: gprint.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: Robert Roebling // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -258,9 +257,9 @@ protected: void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc); void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea); void DoDrawPoint(wxCoord x, wxCoord y); - void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); - void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); - void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); + void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); + void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); + void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0); void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); @@ -294,6 +293,8 @@ protected: virtual wxRect GetPaperRect() const; virtual int GetResolution() const; + virtual void* GetHandle() const { return (void*)m_gpc; } + private: wxPrintData m_printData; PangoContext *m_context; diff --git a/Externals/wxWidgets3/include/wx/gtk/gnome/gvfs.h b/Externals/wxWidgets3/include/wx/gtk/gnome/gvfs.h index 536da8c1f2..559f14f569 100644 --- a/Externals/wxWidgets3/include/wx/gtk/gnome/gvfs.h +++ b/Externals/wxWidgets3/include/wx/gtk/gnome/gvfs.h @@ -3,7 +3,6 @@ // Author: Robert Roebling // Purpose: GNOME VFS support // Created: 17/03/06 -// RCS-ID: $Id: gvfs.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: Robert Roebling // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/hildon/notifmsg.h b/Externals/wxWidgets3/include/wx/gtk/hildon/notifmsg.h index 3365527053..ade115fe8a 100644 --- a/Externals/wxWidgets3/include/wx/gtk/hildon/notifmsg.h +++ b/Externals/wxWidgets3/include/wx/gtk/hildon/notifmsg.h @@ -3,7 +3,6 @@ // Purpose: Hildon implementation of wxNotificationMessage // Author: Vadim Zeitlin // Created: 2007-11-21 -// RCS-ID: $Id: notifmsg.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/hyperlink.h b/Externals/wxWidgets3/include/wx/gtk/hyperlink.h index 7fdb40f020..0b6ce6bf9a 100644 --- a/Externals/wxWidgets3/include/wx/gtk/hyperlink.h +++ b/Externals/wxWidgets3/include/wx/gtk/hyperlink.h @@ -4,7 +4,6 @@ // Author: Francesco Montorsi // Modified by: // Created: 14/2/2007 -// RCS-ID: $Id: hyperlink.h 67378 2011-04-02 20:43:29Z PC $ // Copyright: (c) 2007 Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/infobar.h b/Externals/wxWidgets3/include/wx/gtk/infobar.h index 72df919e24..45563eb275 100644 --- a/Externals/wxWidgets3/include/wx/gtk/infobar.h +++ b/Externals/wxWidgets3/include/wx/gtk/infobar.h @@ -3,7 +3,6 @@ // Purpose: native implementation of wxInfoBar for GTK+ 2.18 and later // Author: Vadim Zeitlin // Created: 2009-09-26 -// RCS-ID: $Id: infobar.h 64213 2010-05-05 12:20:08Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -54,7 +53,6 @@ public: void GTKResponse(int btnid); protected: - virtual bool GTKShouldConnectSizeRequest() const { return false; } virtual void DoApplyWidgetStyle(GtkRcStyle *style); private: diff --git a/Externals/wxWidgets3/include/wx/gtk/listbox.h b/Externals/wxWidgets3/include/wx/gtk/listbox.h index b2862a935f..c40bda6a27 100644 --- a/Externals/wxWidgets3/include/wx/gtk/listbox.h +++ b/Externals/wxWidgets3/include/wx/gtk/listbox.h @@ -2,7 +2,6 @@ // Name: wx/gtk/listbox.h // Purpose: wxListBox class declaration // Author: Robert Roebling -// Id: $Id: listbox.h 67298 2011-03-23 17:36:10Z PC $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -10,7 +9,7 @@ #ifndef _WX_GTK_LISTBOX_H_ #define _WX_GTK_LISTBOX_H_ -struct _GtkTreeEntry; +struct _wxTreeEntry; struct _GtkTreeIter; //----------------------------------------------------------------------------- @@ -91,7 +90,7 @@ public: bool m_hasCheckBoxes; #endif // wxUSE_CHECKLISTBOX - struct _GtkTreeEntry* GTKGetEntry(unsigned pos) const; + struct _wxTreeEntry* GTKGetEntry(unsigned pos) const; void GTKDisableEvents(); void GTKEnableEvents(); @@ -111,6 +110,7 @@ protected: virtual int DoInsertItems(const wxArrayStringsAdapter& items, unsigned int pos, void **clientData, wxClientDataType type); + virtual int DoInsertOneItem(const wxString& item, unsigned int pos); virtual void DoSetFirstItem(int n); virtual void DoSetItemClientData(unsigned int n, void* clientData); @@ -123,9 +123,6 @@ protected: // get the index for the given iterator, return wxNOT_FOUND on failure int GTKGetIndexFor(_GtkTreeIter& iter) const; - // set the specified item - void GTKSetItem(_GtkTreeIter& iter, const _GtkTreeEntry *entry); - // common part of DoSetFirstItem() and EnsureVisible() void DoScrollToCell(int n, float alignY, float alignX); diff --git a/Externals/wxWidgets3/include/wx/gtk/mdi.h b/Externals/wxWidgets3/include/wx/gtk/mdi.h index 6b7b50da20..02a61eb899 100644 --- a/Externals/wxWidgets3/include/wx/gtk/mdi.h +++ b/Externals/wxWidgets3/include/wx/gtk/mdi.h @@ -3,7 +3,6 @@ // Purpose: TDI-based MDI implementation for wxGTK // Author: Robert Roebling // Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes -// Id: $Id: mdi.h 69528 2011-10-25 16:56:57Z PC $ // Copyright: (c) 1998 Robert Roebling // (c) 2008 Vadim Zeitlin // Licence: wxWindows licence @@ -67,11 +66,11 @@ public: virtual void OnInternalIdle(); protected: - void Init(); virtual void DoGetClientSize(int* width, int* height) const; private: friend class wxMDIChildFrame; + void Init(); DECLARE_DYNAMIC_CLASS(wxMDIParentFrame) }; diff --git a/Externals/wxWidgets3/include/wx/gtk/menu.h b/Externals/wxWidgets3/include/wx/gtk/menu.h index 25302e3ace..fec12ba977 100644 --- a/Externals/wxWidgets3/include/wx/gtk/menu.h +++ b/Externals/wxWidgets3/include/wx/gtk/menu.h @@ -2,7 +2,6 @@ // Name: wx/gtk/menu.h // Purpose: // Author: Robert Roebling -// Id: $Id: menu.h 70350 2012-01-15 13:41:17Z VZ $ // Copyright: (c) 1998 Robert Roebling, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -21,6 +20,7 @@ public: wxMenuBar(); wxMenuBar(long style); wxMenuBar(size_t n, wxMenu *menus[], const wxString titles[], long style = 0); + ~wxMenuBar(); // implement base class (pure) virtuals virtual bool Append( wxMenu *menu, const wxString &title ); @@ -40,22 +40,21 @@ public: void SetLayoutDirection(wxLayoutDirection dir); wxLayoutDirection GetLayoutDirection() const; - // wxMenuBar is not a top level window but it still doesn't need a parent - // window - virtual bool GTKNeedsParent() const { return false; } - virtual void Attach(wxFrame *frame); virtual void Detach(); - // implementation only from now on - GtkWidget *m_menubar; // Public for hildon support - private: // common part of Append and Insert void GtkAppend(wxMenu* menu, const wxString& title, int pos = -1); void Init(size_t n, wxMenu *menus[], const wxString titles[], long style); + // wxMenuBar is not a top level window but it still doesn't need a parent + // window + virtual bool GTKNeedsParent() const { return false; } + + GtkWidget* m_menubar; + DECLARE_DYNAMIC_CLASS(wxMenuBar) }; @@ -82,7 +81,8 @@ public: // Returns the title, with mnemonics translated to wx format wxString GetTitle() const; - // TODO: virtual void SetTitle(const wxString& title); + // Sets the title, with mnemonics translated to gtk format + virtual void SetTitle(const wxString& title); // implementation GTK only GtkWidget *m_menu; // GtkMenu diff --git a/Externals/wxWidgets3/include/wx/gtk/menuitem.h b/Externals/wxWidgets3/include/wx/gtk/menuitem.h index 778eb8af83..c17ad03a97 100644 --- a/Externals/wxWidgets3/include/wx/gtk/menuitem.h +++ b/Externals/wxWidgets3/include/wx/gtk/menuitem.h @@ -2,7 +2,6 @@ // Name: wx/gtk/menuitem.h // Purpose: wxMenuItem class // Author: Robert Roebling -// RCS-ID: $Id: menuitem.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -36,14 +35,13 @@ public: virtual const wxBitmap& GetBitmap() const { return m_bitmap; } // implementation - void SetMenuItem(GtkWidget *menuItem) { m_menuItem = menuItem; } + void SetMenuItem(GtkWidget *menuItem); GtkWidget *GetMenuItem() const { return m_menuItem; } void SetGtkLabel(); #if WXWIN_COMPATIBILITY_2_8 // compatibility only, don't use in new code - wxDEPRECATED( - inline + wxDEPRECATED_CONSTRUCTOR( wxMenuItem(wxMenu *parentMenu, int id, const wxString& text, diff --git a/Externals/wxWidgets3/include/wx/gtk/minifram.h b/Externals/wxWidgets3/include/wx/gtk/minifram.h index ebcbeec33f..748f266a9a 100644 --- a/Externals/wxWidgets3/include/wx/gtk/minifram.h +++ b/Externals/wxWidgets3/include/wx/gtk/minifram.h @@ -2,7 +2,6 @@ // Name: wx/gtk/minifram.h // Purpose: wxMiniFrame class // Author: Robert Roebling -// RCS-ID: $Id: minifram.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -33,6 +32,7 @@ public: { Create(parent, id, title, pos, size, style, name); } + ~wxMiniFrame(); bool Create(wxWindow *parent, wxWindowID id, diff --git a/Externals/wxWidgets3/include/wx/gtk/msgdlg.h b/Externals/wxWidgets3/include/wx/gtk/msgdlg.h index 90cc21da1f..670d7f9782 100644 --- a/Externals/wxWidgets3/include/wx/gtk/msgdlg.h +++ b/Externals/wxWidgets3/include/wx/gtk/msgdlg.h @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 2003/02/28 -// RCS-ID: $Id: msgdlg.h 68537 2011-08-04 22:53:42Z VZ $ // Copyright: (c) Vaclav Slavik, 2003 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/nonownedwnd.h b/Externals/wxWidgets3/include/wx/gtk/nonownedwnd.h index 8dcb75a696..70e853c1ce 100644 --- a/Externals/wxWidgets3/include/wx/gtk/nonownedwnd.h +++ b/Externals/wxWidgets3/include/wx/gtk/nonownedwnd.h @@ -3,7 +3,6 @@ // Purpose: wxGTK-specific wxNonOwnedWindow declaration. // Author: Vadim Zeitlin // Created: 2011-10-12 -// RCS-ID: $Id: nonownedwnd.h 69462 2011-10-18 21:56:52Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/notebook.h b/Externals/wxWidgets3/include/wx/gtk/notebook.h index 50cedf0171..6edbb84fb1 100644 --- a/Externals/wxWidgets3/include/wx/gtk/notebook.h +++ b/Externals/wxWidgets3/include/wx/gtk/notebook.h @@ -3,7 +3,6 @@ // Purpose: wxNotebook class // Author: Robert Roebling // Modified by: -// RCS-ID: $Id: notebook.h 70112 2011-12-24 18:19:26Z VZ $ // Copyright: (c) Julian Smart and Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -107,9 +106,6 @@ public: bool DoPhase(int phase); #endif - // common part of all ctors - void Init(); - // Called by GTK event handler when the current page is definitely changed. void GTKOnPageChanged(); @@ -138,6 +134,7 @@ private: // the padding set by SetPadding() int m_padding; + void Init(); virtual void AddChildGTK(wxWindowGTK* child); DECLARE_DYNAMIC_CLASS(wxNotebook) diff --git a/Externals/wxWidgets3/include/wx/gtk/notifmsg.h b/Externals/wxWidgets3/include/wx/gtk/notifmsg.h new file mode 100644 index 0000000000..9135b3aee8 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/gtk/notifmsg.h @@ -0,0 +1,51 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/notifmsg.h +// Purpose: wxNotificationMessage for wxGTK. +// Author: Vadim Zeitlin +// Created: 2012-07-25 +// Copyright: (c) 2012 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_NOTIFMSG_H_ +#define _WX_GTK_NOTIFMSG_H_ + +typedef struct _NotifyNotification NotifyNotification; + +// ---------------------------------------------------------------------------- +// wxNotificationMessage +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_ADV wxNotificationMessage : public wxNotificationMessageBase +{ +public: + wxNotificationMessage() { Init(); } + wxNotificationMessage(const wxString& title, + const wxString& message = wxString(), + wxWindow *parent = NULL, + int flags = wxICON_INFORMATION) + : wxNotificationMessageBase(title, message, parent, flags) + { + Init(); + } + + virtual ~wxNotificationMessage(); + + + virtual bool Show(int timeout = Timeout_Auto); + virtual bool Close(); + + // Set the name of the icon to use, overriding the default icon determined + // by the flags. Call with empty string to reset custom icon. + bool GTKSetIconName(const wxString& name); + +private: + void Init() { m_notification = NULL; } + + NotifyNotification* m_notification; + wxString m_iconName; + + wxDECLARE_NO_COPY_CLASS(wxNotificationMessage); +}; + +#endif // _WX_GTK_NOTIFMSG_H_ diff --git a/Externals/wxWidgets3/include/wx/gtk/pen.h b/Externals/wxWidgets3/include/wx/gtk/pen.h index 137066611c..85aa102747 100644 --- a/Externals/wxWidgets3/include/wx/gtk/pen.h +++ b/Externals/wxWidgets3/include/wx/gtk/pen.h @@ -2,7 +2,6 @@ // Name: wx/gtk/pen.h // Purpose: // Author: Robert Roebling -// Id: $Id: pen.h 69020 2011-09-07 16:56:50Z PC $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/popupwin.h b/Externals/wxWidgets3/include/wx/gtk/popupwin.h index 616ae41618..1c848795b9 100644 --- a/Externals/wxWidgets3/include/wx/gtk/popupwin.h +++ b/Externals/wxWidgets3/include/wx/gtk/popupwin.h @@ -3,7 +3,6 @@ // Purpose: // Author: Robert Roebling // Created: -// Id: $Id: popupwin.h 70739 2012-02-28 17:25:59Z PC $ // Copyright: (c) 2001 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/print.h b/Externals/wxWidgets3/include/wx/gtk/print.h index 3dceebb115..e4eae1cef3 100644 --- a/Externals/wxWidgets3/include/wx/gtk/print.h +++ b/Externals/wxWidgets3/include/wx/gtk/print.h @@ -3,7 +3,6 @@ // Author: Anthony Bretaudeau // Purpose: GTK printing support // Created: 2007-08-25 -// RCS-ID: $Id: print.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) Anthony Bretaudeau // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -19,8 +18,6 @@ #include "wx/printdlg.h" #include "wx/prntbase.h" #include "wx/dc.h" -#include "wx/cairo.h" - typedef struct _GtkPrintOperation GtkPrintOperation; typedef struct _GtkPrintContext GtkPrintContext; @@ -197,6 +194,7 @@ public: void SetPrintConfig( GtkPrintSettings * config ); GtkPrintOperation* GetPrintJob() { return m_job; } + void SetPrintJob(GtkPrintOperation *job) { m_job = job; } GtkPrintContext *GetPrintContext() { return m_context; } void SetPrintContext(GtkPrintContext *context) {m_context = context; } @@ -206,6 +204,8 @@ public: void SetPageSetupToSettings(GtkPrintSettings* settings, GtkPageSetup* page_setup); private: + // NB: m_config is created and owned by us, but the other objects are not + // and their accessors don't change their ref count. GtkPrintSettings *m_config; GtkPrintOperation *m_job; GtkPrintContext *m_context; @@ -227,7 +227,8 @@ public: bool IsOk() const; virtual void* GetCairoContext() const; - + virtual void* GetHandle() const; + bool CanDrawBitmap() const { return true; } void Clear(); void SetFont( const wxFont& font ); @@ -264,9 +265,9 @@ protected: void DoDrawArc(wxCoord x1,wxCoord y1,wxCoord x2,wxCoord y2,wxCoord xc,wxCoord yc); void DoDrawEllipticArc(wxCoord x,wxCoord y,wxCoord w,wxCoord h,double sa,double ea); void DoDrawPoint(wxCoord x, wxCoord y); - void DoDrawLines(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); - void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); - void DoDrawPolyPolygon(int n, int count[], wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); + void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0); + void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); + void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset = 0, wxCoord yoffset = 0, wxPolygonFillMode fillStyle=wxODDEVEN_RULE); void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height); void DoDrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0); void DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height); diff --git a/Externals/wxWidgets3/include/wx/gtk/private.h b/Externals/wxWidgets3/include/wx/gtk/private.h index 321ba28f3c..dfe8889798 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private.h +++ b/Externals/wxWidgets3/include/wx/gtk/private.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 12.03.02 -// RCS-ID: $Id: private.h 70475 2012-01-29 08:00:15Z PC $ // Copyright: (c) 2002 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -28,7 +27,7 @@ extern const gchar *wx_pango_version_check(int major, int minor, int micro); #if wxUSE_UNICODE - #define wxGTK_CONV(s) s.utf8_str() + #define wxGTK_CONV(s) (s).utf8_str() #define wxGTK_CONV_ENC(s, enc) wxGTK_CONV((s)) #define wxGTK_CONV_FONT(s, font) wxGTK_CONV((s)) #define wxGTK_CONV_SYS(s) wxGTK_CONV((s)) @@ -87,6 +86,17 @@ extern const gchar *wx_pango_version_check(int major, int minor, int micro); #define wxGTK_CONV_BACK_SYS(s) wxConvertFromGTK((s)) #endif +// Define a macro for converting wxString to char* in appropriate encoding for +// the file names. +#ifdef G_OS_WIN32 + // Under MSW, UTF-8 file name encodings are always used. + #define wxGTK_CONV_FN(s) (s).utf8_str() +#else + // Under Unix use GLib file name encoding (which is also UTF-8 by default + // but may be different from it). + #define wxGTK_CONV_FN(s) (s).fn_str() +#endif + // ---------------------------------------------------------------------------- // various private helper functions // ---------------------------------------------------------------------------- @@ -99,17 +109,18 @@ namespace wxGTKPrivate // // the returned widgets shouldn't be destroyed, this is done automatically on // shutdown -GtkWidget *GetButtonWidget(); -GtkWidget *GetCheckButtonWidget(); -GtkWidget *GetComboBoxWidget(); -GtkWidget *GetEntryWidget(); -GtkWidget *GetHeaderButtonWidgetFirst(); -GtkWidget *GetHeaderButtonWidgetLast(); -GtkWidget *GetHeaderButtonWidget(); -GtkWidget *GetRadioButtonWidget(); -GtkWidget *GetSplitterWidget(); -GtkWidget *GetTextEntryWidget(); -GtkWidget *GetTreeWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetButtonWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetCheckButtonWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetComboBoxWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetEntryWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetHeaderButtonWidgetFirst(); +WXDLLIMPEXP_CORE GtkWidget *GetHeaderButtonWidgetLast(); +WXDLLIMPEXP_CORE GtkWidget *GetHeaderButtonWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetNotebookWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetRadioButtonWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetSplitterWidget(wxOrientation orient = wxHORIZONTAL); +WXDLLIMPEXP_CORE GtkWidget *GetTextEntryWidget(); +WXDLLIMPEXP_CORE GtkWidget *GetTreeWidget(); } // wxGTKPrivate diff --git a/Externals/wxWidgets3/include/wx/gtk/private/dialogcount.h b/Externals/wxWidgets3/include/wx/gtk/private/dialogcount.h new file mode 100644 index 0000000000..b282e99ca5 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/gtk/private/dialogcount.h @@ -0,0 +1,48 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/dialogcount.h +// Purpose: Helper for temporarily changing wxOpenModalDialogsCount global. +// Author: Vadim Zeitlin +// Created: 2013-03-21 +// Copyright: (c) 2013 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_DIALOGCOUNT_H_ +#define _WX_GTK_PRIVATE_DIALOGCOUNT_H_ + +#include "wx/defs.h" + +// This global variable contains the number of currently opened modal dialogs. +// When it is non null, the global menu used in Ubuntu Unity needs to be +// explicitly disabled as this doesn't currently happen on its own due to a bug +// in Unity, see https://bugs.launchpad.net/indicator-appmenu/+bug/674605 +// +// For this to work, all modal dialogs must use wxOpenModalDialogLocker class +// below to increment this variable while they are indeed being modally shown. +// +// This variable is defined in src/gtk/toplevel.cpp +extern int wxOpenModalDialogsCount; + +// ---------------------------------------------------------------------------- +// wxOpenModalDialogLocker: Create an object of this class to increment +// wxOpenModalDialogsCount during its lifetime. +// ---------------------------------------------------------------------------- + +class wxOpenModalDialogLocker +{ +public: + wxOpenModalDialogLocker() + { + wxOpenModalDialogsCount++; + } + + ~wxOpenModalDialogLocker() + { + wxOpenModalDialogsCount--; + } + +private: + wxDECLARE_NO_COPY_CLASS(wxOpenModalDialogLocker); +}; + +#endif // _WX_GTK_PRIVATE_DIALOGCOUNT_H_ diff --git a/Externals/wxWidgets3/include/wx/gtk/private/error.h b/Externals/wxWidgets3/include/wx/gtk/private/error.h new file mode 100644 index 0000000000..5432b18bf3 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/gtk/private/error.h @@ -0,0 +1,45 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: gtk/private/error.h +// Purpose: Wrapper around GError. +// Author: Vadim Zeitlin +// Created: 2012-07-25 +// Copyright: (c) 2012 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_ERROR_H_ +#define _WX_GTK_PRIVATE_ERROR_H_ + +// ---------------------------------------------------------------------------- +// wxGtkError wraps GError and releases it automatically. +// ---------------------------------------------------------------------------- + +// Create an object of this class and pass the result of its Out() method to a +// function taking "GError**", then use GetMessage() if the function returned +// false. +class wxGtkError +{ +public: + wxGtkError() { m_error = NULL; } + ~wxGtkError() { if ( m_error ) g_error_free(m_error); } + + GError** Out() + { + // This would result in a GError leak. + wxASSERT_MSG( !m_error, wxS("Can't reuse the same object.") ); + + return &m_error; + } + + wxString GetMessage() const + { + return wxString::FromUTF8(m_error->message); + } + +private: + GError* m_error; + + wxDECLARE_NO_COPY_CLASS(wxGtkError); +}; + +#endif // _WX_GTK_PRIVATE_ERROR_H_ diff --git a/Externals/wxWidgets3/include/wx/gtk/private/event.h b/Externals/wxWidgets3/include/wx/gtk/private/event.h index 7c1254fea8..eda9e6e7f4 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private/event.h +++ b/Externals/wxWidgets3/include/wx/gtk/private/event.h @@ -3,7 +3,6 @@ // Purpose: Helper functions for working with GDK and wx events // Author: Vaclav Slavik // Created: 2011-10-14 -// RCS-ID: $Id$ // Copyright: (c) 2011 Vaclav Slavik // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/private/gdkconv.h b/Externals/wxWidgets3/include/wx/gtk/private/gdkconv.h index d3a2ac872a..b63b0c74cd 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private/gdkconv.h +++ b/Externals/wxWidgets3/include/wx/gtk/private/gdkconv.h @@ -3,7 +3,6 @@ // Purpose: Helper functions for converting between GDK and wx types // Author: Vadim Zeitlin // Created: 2009-11-10 -// RCS-ID: $Id: gdkconv.h 64140 2010-04-25 21:33:16Z FM $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/private/gtk2-compat.h b/Externals/wxWidgets3/include/wx/gtk/private/gtk2-compat.h index fddeaafca9..20e9358d90 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private/gtk2-compat.h +++ b/Externals/wxWidgets3/include/wx/gtk/private/gtk2-compat.h @@ -3,7 +3,6 @@ // Purpose: Compatibility code for older GTK+ versions // Author: Vaclav Slavik // Created: 2011-03-25 -// RCS-ID: $Id$ // Copyright: (c) 2011 Vaclav Slavik // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -26,7 +25,7 @@ // functions even if GTK_CHECK_VERSION would indicate the function is // already available in GTK+. -#if !GTK_CHECK_VERSION(3,0,0) && !(defined(GTK_DISABLE_DEPRECATED) || defined(GSEAL_ENABLE)) +#ifndef __WXGTK3__ // ---------------------------------------------------------------------------- // the following were introduced in GTK+ 2.8 @@ -55,16 +54,13 @@ static inline gpointer wx_g_object_ref_sink(gpointer object) #define g_object_ref_sink wx_g_object_ref_sink // ---------------------------------------------------------------------------- -// the following were introduced in GTK+ 2.12 and GtkAboutDialog itself is not -// in 2.4 so skip this if we don't have it. -#if GTK_CHECK_VERSION(2,6,0) +// the following were introduced in GTK+ 2.12 static inline void wx_gtk_about_dialog_set_program_name(GtkAboutDialog* about, const gchar* name) { gtk_about_dialog_set_name(about, name); } #define gtk_about_dialog_set_program_name wx_gtk_about_dialog_set_program_name -#endif // 2.6.0 // ---------------------------------------------------------------------------- // the following were introduced in GTK+ 2.14 @@ -129,18 +125,6 @@ static inline guint16 wx_gtk_entry_get_text_length(GtkEntry* entry) } #define gtk_entry_get_text_length wx_gtk_entry_get_text_length -static inline GtkWidget* wx_gtk_font_selection_dialog_get_cancel_button(GtkFontSelectionDialog* fsd) -{ - return fsd->cancel_button; -} -#define gtk_font_selection_dialog_get_cancel_button wx_gtk_font_selection_dialog_get_cancel_button - -static inline GtkWidget* wx_gtk_font_selection_dialog_get_ok_button(GtkFontSelectionDialog* fsd) -{ - return fsd->ok_button; -} -#define gtk_font_selection_dialog_get_ok_button wx_gtk_font_selection_dialog_get_ok_button - static inline const guchar* wx_gtk_selection_data_get_data(GtkSelectionData* selection_data) { return selection_data->data; @@ -342,9 +326,66 @@ static inline GdkWindow* wx_gtk_entry_get_text_window(GtkEntry* entry) } #define gtk_entry_get_text_window wx_gtk_entry_get_text_window +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 2.22 + +static inline GdkWindow* wx_gtk_button_get_event_window(GtkButton* button) +{ + return button->event_window; +} +#define gtk_button_get_event_window wx_gtk_button_get_event_window + +static inline GdkDragAction wx_gdk_drag_context_get_actions(GdkDragContext* context) +{ + return context->actions; +} +#define gdk_drag_context_get_actions wx_gdk_drag_context_get_actions + +static inline GdkDragAction wx_gdk_drag_context_get_selected_action(GdkDragContext* context) +{ + return context->action; +} +#define gdk_drag_context_get_selected_action wx_gdk_drag_context_get_selected_action + +static inline GdkDragAction wx_gdk_drag_context_get_suggested_action(GdkDragContext* context) +{ + return context->suggested_action; +} +#define gdk_drag_context_get_suggested_action wx_gdk_drag_context_get_suggested_action + +static inline GList* wx_gdk_drag_context_list_targets(GdkDragContext* context) +{ + return context->targets; +} +#define gdk_drag_context_list_targets wx_gdk_drag_context_list_targets + +static inline gint wx_gdk_visual_get_depth(GdkVisual* visual) +{ + return visual->depth; +} +#define gdk_visual_get_depth wx_gdk_visual_get_depth + +static inline gboolean wx_gtk_window_has_group(GtkWindow* window) +{ + return window->group != NULL; +} +#define gtk_window_has_group wx_gtk_window_has_group + // ---------------------------------------------------------------------------- // the following were introduced in GTK+ 2.24 +static inline GdkDisplay* wx_gdk_window_get_display(GdkWindow* window) +{ + return gdk_drawable_get_display(window); +} +#define gdk_window_get_display wx_gdk_window_get_display + +static inline GdkScreen* wx_gdk_window_get_screen(GdkWindow* window) +{ + return gdk_drawable_get_screen(window); +} +#define gdk_window_get_screen wx_gdk_window_get_screen + static inline gint wx_gdk_window_get_height(GdkWindow* window) { int h; @@ -369,8 +410,106 @@ static inline void wx_gdk_cairo_set_source_window(cairo_t* cr, GdkWindow* window #define gdk_cairo_set_source_window wx_gdk_cairo_set_source_window #endif -#endif // !GTK_CHECK_VERSION(3,0,0) && !defined(GTK_DISABLE_DEPRECATED) +// ---------------------------------------------------------------------------- +// the following were introduced in GTK+ 3.0 +static inline void wx_gdk_window_get_geometry(GdkWindow* window, gint* x, gint* y, gint* width, gint* height) +{ + gdk_window_get_geometry(window, x, y, width, height, NULL); +} +#define gdk_window_get_geometry wx_gdk_window_get_geometry +static inline GtkWidget* wx_gtk_tree_view_column_get_button(GtkTreeViewColumn* tree_column) +{ + return tree_column->button; +} +#define gtk_tree_view_column_get_button wx_gtk_tree_view_column_get_button + +static inline GtkWidget* wx_gtk_box_new(GtkOrientation orientation, gint spacing) +{ + GtkWidget* widget; + if (orientation == GTK_ORIENTATION_HORIZONTAL) + widget = gtk_hbox_new(false, spacing); + else + widget = gtk_vbox_new(false, spacing); + return widget; +} +#define gtk_box_new wx_gtk_box_new + +static inline GtkWidget* wx_gtk_button_box_new(GtkOrientation orientation) +{ + GtkWidget* widget; + if (orientation == GTK_ORIENTATION_HORIZONTAL) + widget = gtk_hbutton_box_new(); + else + widget = gtk_vbutton_box_new(); + return widget; +} +#define gtk_button_box_new wx_gtk_button_box_new + +static inline GtkWidget* wx_gtk_scale_new(GtkOrientation orientation, GtkAdjustment* adjustment) +{ + GtkWidget* widget; + if (orientation == GTK_ORIENTATION_HORIZONTAL) + widget = gtk_hscale_new(adjustment); + else + widget = gtk_vscale_new(adjustment); + return widget; +} +#define gtk_scale_new wx_gtk_scale_new + +static inline GtkWidget* wx_gtk_scrollbar_new(GtkOrientation orientation, GtkAdjustment* adjustment) +{ + GtkWidget* widget; + if (orientation == GTK_ORIENTATION_HORIZONTAL) + widget = gtk_hscrollbar_new(adjustment); + else + widget = gtk_vscrollbar_new(adjustment); + return widget; +} +#define gtk_scrollbar_new wx_gtk_scrollbar_new + +static inline GtkWidget* wx_gtk_separator_new(GtkOrientation orientation) +{ + GtkWidget* widget; + if (orientation == GTK_ORIENTATION_HORIZONTAL) + widget = gtk_hseparator_new(); + else + widget = gtk_vseparator_new(); + return widget; +} +#define gtk_separator_new wx_gtk_separator_new + +static inline void wx_gtk_widget_get_preferred_height(GtkWidget* widget, gint* minimum, gint* natural) +{ + GtkRequisition req; + gtk_widget_size_request(widget, &req); + if (minimum) + *minimum = req.height; + if (natural) + *natural = req.height; +} +#define gtk_widget_get_preferred_height wx_gtk_widget_get_preferred_height + +static inline void wx_gtk_widget_get_preferred_width(GtkWidget* widget, gint* minimum, gint* natural) +{ + GtkRequisition req; + gtk_widget_size_request(widget, &req); + if (minimum) + *minimum = req.width; + if (natural) + *natural = req.width; +} +#define gtk_widget_get_preferred_width wx_gtk_widget_get_preferred_width + +static inline void wx_gtk_widget_get_preferred_size(GtkWidget* widget, GtkRequisition* minimum, GtkRequisition* natural) +{ + GtkRequisition* req = minimum; + if (req == NULL) + req = natural; + gtk_widget_size_request(widget, req); +} +#define gtk_widget_get_preferred_size wx_gtk_widget_get_preferred_size + +#endif // !__WXGTK3__ #endif // _WX_GTK_PRIVATE_COMPAT_H_ - diff --git a/Externals/wxWidgets3/include/wx/gtk/private/list.h b/Externals/wxWidgets3/include/wx/gtk/private/list.h index 0ec669317d..15ddf71cae 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private/list.h +++ b/Externals/wxWidgets3/include/wx/gtk/private/list.h @@ -3,7 +3,6 @@ // Purpose: wxGtkList class. // Author: Vadim Zeitlin // Created: 2011-08-21 -// RCS-ID: $Id: list.h 68842 2011-08-22 12:41:00Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/private/messagetype.h b/Externals/wxWidgets3/include/wx/gtk/private/messagetype.h index 72c41570e5..2c3a2a5a58 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private/messagetype.h +++ b/Externals/wxWidgets3/include/wx/gtk/private/messagetype.h @@ -3,7 +3,6 @@ // Purpose: translate between wx and GtkMessageType // Author: Vadim Zeitlin // Created: 2009-09-27 -// RCS-ID: $Id: messagetype.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/private/mnemonics.h b/Externals/wxWidgets3/include/wx/gtk/private/mnemonics.h index 07a363ba53..0b6e4ba45a 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private/mnemonics.h +++ b/Externals/wxWidgets3/include/wx/gtk/private/mnemonics.h @@ -3,7 +3,6 @@ // Purpose: helper functions for dealing with GTK+ mnemonics // Author: Vadim Zeitlin // Created: 2007-11-12 -// RCS-ID: $Id: mnemonics.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/private/object.h b/Externals/wxWidgets3/include/wx/gtk/private/object.h index f420d65134..472e4c3ede 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private/object.h +++ b/Externals/wxWidgets3/include/wx/gtk/private/object.h @@ -3,7 +3,6 @@ // Purpose: wxGtkObject class declaration // Author: Vadim Zeitlin // Created: 2008-08-27 -// RCS-ID: $Id: object.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/private/string.h b/Externals/wxWidgets3/include/wx/gtk/private/string.h index 75b4fc3e4f..bd188d10f8 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private/string.h +++ b/Externals/wxWidgets3/include/wx/gtk/private/string.h @@ -3,7 +3,6 @@ // Purpose: wxGtkString class declaration // Author: Vadim Zeitlin // Created: 2006-10-19 -// RCS-ID: $Id: string.h 65680 2010-09-30 11:44:45Z VZ $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/private/textmeasure.h b/Externals/wxWidgets3/include/wx/gtk/private/textmeasure.h new file mode 100644 index 0000000000..d27b096f26 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/gtk/private/textmeasure.h @@ -0,0 +1,64 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/textmeasure.h +// Purpose: wxGTK-specific declaration of wxTextMeasure class +// Author: Manuel Martin +// Created: 2012-10-05 +// Copyright: (c) 1997-2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_GTK_PRIVATE_TEXTMEASURE_H_ +#define _WX_GTK_PRIVATE_TEXTMEASURE_H_ + +// ---------------------------------------------------------------------------- +// wxTextMeasure +// ---------------------------------------------------------------------------- + +class WXDLLIMPEXP_FWD_CORE wxWindowDCImpl; + +class wxTextMeasure : public wxTextMeasureBase +{ +public: + wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL) + : wxTextMeasureBase(dc, font) + { + Init(); + } + + wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL) + : wxTextMeasureBase(win, font) + { + Init(); + } + +protected: + // Common part of both ctors. + void Init(); + + virtual void BeginMeasuring(); + virtual void EndMeasuring(); + + virtual void DoGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL); + + virtual bool DoGetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX); + + // This class is only used for DC text measuring with GTK+ 2 as GTK+ 3 uses + // Cairo and not Pango for this. However it's still used even with GTK+ 3 + // for window text measuring, so the context and the layout are still + // needed. +#ifndef __WXGTK3__ + wxWindowDCImpl *m_wdc; +#endif // GTK+ < 3 + PangoContext *m_context; + PangoLayout *m_layout; + + wxDECLARE_NO_COPY_CLASS(wxTextMeasure); +}; + +#endif // _WX_GTK_PRIVATE_TEXTMEASURE_H_ diff --git a/Externals/wxWidgets3/include/wx/gtk/private/timer.h b/Externals/wxWidgets3/include/wx/gtk/private/timer.h index 509303cda6..89f1355bba 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private/timer.h +++ b/Externals/wxWidgets3/include/wx/gtk/private/timer.h @@ -2,7 +2,6 @@ // Name: wx/gtk/private/timer.h // Purpose: wxTimerImpl for wxGTK // Author: Robert Roebling -// Id: $Id: timer.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/private/treeentry_gtk.h b/Externals/wxWidgets3/include/wx/gtk/private/treeentry_gtk.h new file mode 100644 index 0000000000..17abe2fc77 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/gtk/private/treeentry_gtk.h @@ -0,0 +1,58 @@ +/* /////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/private/treeentry_gtk.h +// Purpose: GtkTreeEntry - a string/userdata combo for use with treeview +// Author: Ryan Norton +// Copyright: (c) 2006 Ryan Norton +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////// */ + +#ifndef _WX_GTK_TREE_ENTRY_H_ +#define _WX_GTK_TREE_ENTRY_H_ + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#include /* for gpointer and gchar* etc. */ + +#define WX_TYPE_TREE_ENTRY wx_tree_entry_get_type() +#define WX_TREE_ENTRY(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, wx_tree_entry_get_type(), wxTreeEntry) +#define WX_IS_TREE_ENTRY(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, wx_tree_entry_get_type()) + +typedef struct _wxTreeEntry wxTreeEntry; + +typedef void (*wxTreeEntryDestroy)(wxTreeEntry* entry, void* context); + +struct _wxTreeEntry +{ + GObject parent; /* object instance */ + gchar* label; /* label - always copied by this object except on get */ + gchar* collate_key; /* collate key used for string comparisons/sorting */ + gpointer userdata; /* untouched userdata */ + wxTreeEntryDestroy destroy_func; /* called upon destruction - use for freeing userdata etc. */ + gpointer destroy_func_data; /* context passed to destroy_func */ +}; + +wxTreeEntry* wx_tree_entry_new(void); + +GType wx_tree_entry_get_type(void); + +char* wx_tree_entry_get_collate_key(wxTreeEntry* entry); + +char* wx_tree_entry_get_label(wxTreeEntry* entry); + +void* wx_tree_entry_get_userdata(wxTreeEntry* entry); + +void wx_tree_entry_set_label(wxTreeEntry* entry, const char* label); + +void wx_tree_entry_set_userdata(wxTreeEntry* entry, void* userdata); + +void wx_tree_entry_set_destroy_func(wxTreeEntry* entry, + wxTreeEntryDestroy destroy_func, + gpointer destroy_func_data); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _WX_GTK_TREE_ENTRY_H_ */ diff --git a/Externals/wxWidgets3/include/wx/gtk/private/win_gtk.h b/Externals/wxWidgets3/include/wx/gtk/private/win_gtk.h index 5d49572227..0fd421f3bc 100644 --- a/Externals/wxWidgets3/include/wx/gtk/private/win_gtk.h +++ b/Externals/wxWidgets3/include/wx/gtk/private/win_gtk.h @@ -2,7 +2,6 @@ // Name: wx/gtk/private/win_gtk.h // Purpose: native GTK+ widget for wxWindow // Author: Robert Roebling -// Id: $Id: win_gtk.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////// */ @@ -10,8 +9,6 @@ #ifndef _WX_GTK_PIZZA_H_ #define _WX_GTK_PIZZA_H_ -#include - #define WX_PIZZA(obj) G_TYPE_CHECK_INSTANCE_CAST(obj, wxPizza::type(), wxPizza) #define WX_IS_PIZZA(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj, wxPizza::type()) @@ -23,16 +20,16 @@ struct WXDLLIMPEXP_CORE wxPizza static GtkWidget* New(long windowStyle = 0); static GType type(); - void move(GtkWidget* widget, int x, int y); - void put(GtkWidget* widget, int x, int y); + void move(GtkWidget* widget, int x, int y, int width, int height); + void put(GtkWidget* widget, int x, int y, int width, int height); void scroll(int dx, int dy); - void get_border_widths(int& x, int& y); + void get_border(GtkBorder& border); GtkFixed m_fixed; + GList* m_children; int m_scroll_x; int m_scroll_y; - int m_border_style; - bool m_is_scrollable; + int m_windowStyle; }; #endif // _WX_GTK_PIZZA_H_ diff --git a/Externals/wxWidgets3/include/wx/gtk/radiobox.h b/Externals/wxWidgets3/include/wx/gtk/radiobox.h index ced13bc390..a7f6bd9125 100644 --- a/Externals/wxWidgets3/include/wx/gtk/radiobox.h +++ b/Externals/wxWidgets3/include/wx/gtk/radiobox.h @@ -2,7 +2,6 @@ // Name: wx/gtk/radiobox.h // Purpose: // Author: Robert Roebling -// Id: $Id: radiobox.h 67298 2011-03-23 17:36:10Z PC $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -28,7 +27,7 @@ class WXDLLIMPEXP_CORE wxRadioBox : public wxControl, { public: // ctors and dtor - wxRadioBox() { Init(); } + wxRadioBox() { } wxRadioBox(wxWindow *parent, wxWindowID id, const wxString& title, @@ -41,8 +40,6 @@ public: const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) { - Init(); - Create( parent, id, title, pos, size, n, choices, majorDim, style, val, name ); } @@ -57,8 +54,6 @@ public: const wxValidator& val = wxDefaultValidator, const wxString& name = wxRadioBoxNameStr) { - Init(); - Create( parent, id, title, pos, size, choices, majorDim, style, val, name ); } diff --git a/Externals/wxWidgets3/include/wx/gtk/radiobut.h b/Externals/wxWidgets3/include/wx/gtk/radiobut.h index 60b508b148..165370aa12 100644 --- a/Externals/wxWidgets3/include/wx/gtk/radiobut.h +++ b/Externals/wxWidgets3/include/wx/gtk/radiobut.h @@ -2,7 +2,6 @@ // Name: wx/gtk/radiobut.h // Purpose: // Author: Robert Roebling -// Id: $Id: radiobut.h 62785 2009-12-05 19:25:04Z PC $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/region.h b/Externals/wxWidgets3/include/wx/gtk/region.h index 18b2f26169..a2231a1950 100644 --- a/Externals/wxWidgets3/include/wx/gtk/region.h +++ b/Externals/wxWidgets3/include/wx/gtk/region.h @@ -2,7 +2,6 @@ // Name: wx/gtk/region.h // Purpose: // Author: Robert Roebling -// Id: $Id: region.h 69815 2011-11-25 00:52:24Z PC $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -10,6 +9,10 @@ #ifndef _WX_GTK_REGION_H_ #define _WX_GTK_REGION_H_ +#ifdef __WXGTK3__ +typedef struct _cairo_region cairo_region_t; +#endif + // ---------------------------------------------------------------------------- // wxRegion // ---------------------------------------------------------------------------- @@ -56,12 +59,12 @@ public: virtual void Clear(); virtual bool IsEmpty() const; -public: - // Init with GdkRegion, set ref count to 2 so that - // the C++ class will not destroy the region! - wxRegion( GdkRegion *region ); - +#ifdef __WXGTK3__ + cairo_region_t* GetRegion() const; +#else + wxRegion(const GdkRegion* region); GdkRegion *GetRegion() const; +#endif protected: virtual wxGDIRefData *CreateGDIRefData() const; diff --git a/Externals/wxWidgets3/include/wx/gtk/scrolbar.h b/Externals/wxWidgets3/include/wx/gtk/scrolbar.h index 2ab5353ed8..e49bb7a2ce 100644 --- a/Externals/wxWidgets3/include/wx/gtk/scrolbar.h +++ b/Externals/wxWidgets3/include/wx/gtk/scrolbar.h @@ -2,7 +2,6 @@ // Name: wx/gtk/scrolbar.h // Purpose: // Author: Robert Roebling -// Id: $Id: scrolbar.h 67326 2011-03-28 06:27:49Z PC $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/scrolwin.h b/Externals/wxWidgets3/include/wx/gtk/scrolwin.h index d7f188bb90..c36040ce88 100644 --- a/Externals/wxWidgets3/include/wx/gtk/scrolwin.h +++ b/Externals/wxWidgets3/include/wx/gtk/scrolwin.h @@ -4,7 +4,6 @@ // Author: Robert Roebling // Modified by: Vadim Zeitlin (2005-10-10): wxScrolledWindow is now common // Created: 01/02/97 -// RCS-ID: $Id: scrolwin.h 58773 2009-02-08 20:51:44Z PC $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -30,6 +29,8 @@ public: bool noRefresh = false); virtual void AdjustScrollbars(); + virtual bool IsScrollbarShown(int orient) const; + protected: virtual void DoScroll(int x, int y); virtual void DoShowScrollbars(wxScrollbarVisibility horz, diff --git a/Externals/wxWidgets3/include/wx/gtk/setup0.h b/Externals/wxWidgets3/include/wx/gtk/setup0.h new file mode 100644 index 0000000000..ba0bee22fc --- /dev/null +++ b/Externals/wxWidgets3/include/wx/gtk/setup0.h @@ -0,0 +1,1665 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/gtk/setup.h +// Purpose: Configuration for the library +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SETUP_H_ +#define _WX_SETUP_H_ + +/* --- start common options --- */ +// ---------------------------------------------------------------------------- +// global settings +// ---------------------------------------------------------------------------- + +// 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 +// ---------------------------------------------------------------------------- + +// This setting determines the compatibility with 2.6 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_6 0 + +// This setting determines the compatibility with 2.8 API: set it to 0 to +// flag all cases of using deprecated functions. +// +// Default is 1 but please try building your code with 0 as the default will +// change to 0 in the next version and the deprecated functions will disappear +// in the version after it completely. +// +// Recommended setting: 0 (please update your code) +#define WXWIN_COMPATIBILITY_2_8 1 + +// MSW-only: Set to 0 for accurate dialog units, else 1 for old behaviour when +// default system font is used for wxWindow::GetCharWidth/Height() instead of +// the current font. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxDIALOG_UNIT_COMPATIBILITY 0 + +// ---------------------------------------------------------------------------- +// debugging settings +// ---------------------------------------------------------------------------- + +// wxDEBUG_LEVEL will be defined as 1 in wx/debug.h so normally there is no +// need to define it here. You may do it for two reasons: either completely +// disable/compile out the asserts in release version (then do it inside #ifdef +// NDEBUG) or, on the contrary, enable more asserts, including the usually +// disabled ones, in the debug build (then do it inside #ifndef NDEBUG) +// +// #ifdef NDEBUG +// #define wxDEBUG_LEVEL 0 +// #else +// #define wxDEBUG_LEVEL 2 +// #endif + +// wxHandleFatalExceptions() may be used to catch the program faults at run +// time and, instead of terminating the program with a usual GPF message box, +// call the user-defined wxApp::OnFatalException() function. If you set +// wxUSE_ON_FATAL_EXCEPTION to 0, wxHandleFatalExceptions() will not work. +// +// This setting is for Win32 only and can only be enabled if your compiler +// supports Win32 structured exception handling (currently only VC++ does) +// +// Default is 1 +// +// Recommended setting: 1 if your compiler supports it. +#define wxUSE_ON_FATAL_EXCEPTION 1 + +// Set this to 1 to be able to generate a human-readable (unlike +// machine-readable minidump created by wxCrashReport::Generate()) stack back +// trace when your program crashes using wxStackWalker +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_STACKWALKER 1 + +// Set this to 1 to compile in wxDebugReport class which allows you to create +// and optionally upload to your web site a debug report consisting of back +// trace of the crash (if wxUSE_STACKWALKER == 1) and other information. +// +// Default is 1 if supported by the compiler. +// +// Recommended setting: 1, it is compiled into a separate library so there +// is no overhead if you don't use it +#define wxUSE_DEBUGREPORT 1 + +// Generic comment about debugging settings: they are very useful if you don't +// use any other memory leak detection tools such as Purify/BoundsChecker, but +// are probably redundant otherwise. Also, Visual C++ CRT has the same features +// as wxWidgets memory debugging subsystem built in since version 5.0 and you +// may prefer to use it instead of built in memory debugging code because it is +// faster and more fool proof. +// +// Using VC++ CRT memory debugging is enabled by default in debug build (_DEBUG +// is defined) if wxUSE_GLOBAL_MEMORY_OPERATORS is *not* enabled (i.e. is 0) +// and if __NO_VC_CRTDBG__ is not defined. + +// The rest of the options in this section are obsolete and not supported, +// enable them at your own risk. + +// If 1, enables wxDebugContext, for writing error messages to file, etc. If +// __WXDEBUG__ is not defined, will still use the normal memory operators. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_CONTEXT 0 + +// If 1, enables debugging versions of wxObject::new and wxObject::delete *IF* +// __WXDEBUG__ is also defined. +// +// WARNING: this code may not work with all architectures, especially if +// alignment is an issue. This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 1 if you are not using a memory debugging tool, else 0 +#define wxUSE_MEMORY_TRACING 0 + +// In debug mode, cause new and delete to be redefined globally. +// If this causes problems (e.g. link errors which is a common problem +// especially if you use another library which also redefines the global new +// and delete), set this to 0. +// This switch is currently ignored for mingw / cygwin +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_GLOBAL_MEMORY_OPERATORS 0 + +// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If +// this causes problems (e.g. link errors), set this to 0. You may need to set +// this to 0 if using templates (at least for VC++). This switch is currently +// ignored for MinGW/Cygwin. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_DEBUG_NEW_ALWAYS 0 + + +// ---------------------------------------------------------------------------- +// Unicode support +// ---------------------------------------------------------------------------- + +// These settings are obsolete: the library is always built in Unicode mode +// now, only set wxUSE_UNICODE to 0 to compile legacy code in ANSI mode if +// absolutely necessary -- updating it is strongly recommended as the ANSI mode +// will disappear completely in future wxWidgets releases. +#ifndef wxUSE_UNICODE + #define wxUSE_UNICODE 1 +#endif + +// wxUSE_WCHAR_T is required by wxWidgets now, don't change. +#define wxUSE_WCHAR_T 1 + +// ---------------------------------------------------------------------------- +// global features +// ---------------------------------------------------------------------------- + +// Compile library in exception-safe mode? If set to 1, the library will try to +// behave correctly in presence of exceptions (even though it still will not +// use the exceptions itself) and notify the user code about any unhandled +// exceptions. If set to 0, propagation of the exceptions through the library +// code will lead to undefined behaviour -- but the code itself will be +// slightly smaller and faster. +// +// Note that like wxUSE_THREADS this option is automatically set to 0 if +// wxNO_EXCEPTIONS is defined. +// +// Default is 1 +// +// Recommended setting: depends on whether you intend to use C++ exceptions +// in your own code (1 if you do, 0 if you don't) +#define wxUSE_EXCEPTIONS 1 + +// Set wxUSE_EXTENDED_RTTI to 1 to use extended RTTI +// +// Default is 0 +// +// Recommended setting: 0 (this is still work in progress...) +#define wxUSE_EXTENDED_RTTI 0 + +// Support for message/error logging. This includes wxLogXXX() functions and +// wxLog and derived classes. Don't set this to 0 unless you really know what +// you are doing. +// +// Default is 1 +// +// Recommended setting: 1 (always) +#define wxUSE_LOG 1 + +// Recommended setting: 1 +#define wxUSE_LOGWINDOW 1 + +// Recommended setting: 1 +#define wxUSE_LOGGUI 1 + +// Recommended setting: 1 +#define wxUSE_LOG_DIALOG 1 + +// Support for command line parsing using wxCmdLineParser class. +// +// Default is 1 +// +// Recommended setting: 1 (can be set to 0 if you don't use the cmd line) +#define wxUSE_CMDLINE_PARSER 1 + +// Support for multithreaded applications: if 1, compile in thread classes +// (thread.h) and make the library a bit more thread safe. Although thread +// support is quite stable by now, you may still consider recompiling the +// library without it if you have no use for it - this will result in a +// somewhat smaller and faster operation. +// +// Notice that if wxNO_THREADS is defined, wxUSE_THREADS is automatically reset +// to 0 in wx/chkconf.h, so, for example, if you set USE_THREADS to 0 in +// build/msw/config.* file this value will have no effect. +// +// Default is 1 +// +// Recommended setting: 0 unless you do plan to develop MT applications +#define wxUSE_THREADS 1 + +// If enabled, compiles wxWidgets streams classes +// +// wx stream classes are used for image IO, process IO redirection, network +// protocols implementation and much more and so disabling this results in a +// lot of other functionality being lost. +// +// Default is 1 +// +// Recommended setting: 1 as setting it to 0 disables many other things +#define wxUSE_STREAMS 1 + +// Support for positional parameters (e.g. %1$d, %2$s ...) in wxVsnprintf. +// Note that if the system's implementation does not support positional +// parameters, setting this to 1 forces the use of the wxWidgets implementation +// of wxVsnprintf. The standard vsnprintf() supports positional parameters on +// many Unix systems but usually doesn't under Windows. +// +// Positional parameters are very useful when translating a program since using +// them in formatting strings allow translators to correctly reorder the +// translated sentences. +// +// Default is 1 +// +// Recommended setting: 1 if you want to support multiple languages +#define wxUSE_PRINTF_POS_PARAMS 1 + +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but must +// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using +// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS +// support that results in crashes when any TLS variables are used. So if you +// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set +// this to 0. +// +// Default is 1, but set to 0 if the scenario above is applicable. +#define wxUSE_COMPILER_TLS 1 + +// ---------------------------------------------------------------------------- +// Interoperability with the standard library. +// ---------------------------------------------------------------------------- + +// Set wxUSE_STL to 1 to enable maximal interoperability with the standard +// library, even at the cost of backwards compatibility. +// +// Default is 0 +// +// Recommended setting: 0 as the options below already provide a relatively +// good level of interoperability and changing this option arguably isn't worth +// diverging from the official builds of the library. +#define wxUSE_STL 0 + +// This is not a real option but is used as the default value for +// wxUSE_STD_IOSTREAM, wxUSE_STD_STRING and wxUSE_STD_CONTAINERS. +// +// Currently the Digital Mars and Watcom compilers come without standard C++ +// library headers by default, wxUSE_STD_STRING can be set to 1 if you do have +// them (e.g. from STLPort). +// +// VC++ 5.0 does include standard C++ library headers, however they produce +// many warnings that can't be turned off when compiled at warning level 4. +#if defined(__DMC__) || defined(__WATCOMC__) \ + || (defined(_MSC_VER) && _MSC_VER < 1200) + #define wxUSE_STD_DEFAULT 0 +#else + #define wxUSE_STD_DEFAULT 1 +#endif + +// Use standard C++ containers to implement wxVector<>, wxStack<>, wxDList<> +// and wxHashXXX<> classes. If disabled, wxWidgets own (mostly compatible but +// usually more limited) implementations are used which allows to avoid the +// dependency on the C++ run-time library. +// +// Notice that the compilers mentioned in wxUSE_STD_DEFAULT comment above don't +// support using standard containers and that VC6 needs non-default options for +// such build to avoid getting "fatal error C1076: compiler limit : internal +// heap limit reached; use /Zm to specify a higher limit" in its own standard +// headers, so you need to ensure you do increase the heap size before enabling +// this option for this compiler. +// +// Default is 0 for compatibility reasons. +// +// Recommended setting: 1 unless compatibility with the official wxWidgets +// build and/or the existing code is a concern. +#define wxUSE_STD_CONTAINERS 0 + +// Use standard C++ streams if 1 instead of wx streams in some places. If +// disabled, wx streams are used everywhere and wxWidgets doesn't depend on the +// standard streams library. +// +// Notice that enabling this does not replace wx streams with std streams +// everywhere, in a lot of places wx streams are used no matter what. +// +// Default is 1 if compiler supports it. +// +// Recommended setting: 1 if you use the standard streams anyhow and so +// dependency on the standard streams library is not a +// problem +#define wxUSE_STD_IOSTREAM wxUSE_STD_DEFAULT + +// Enable minimal interoperability with the standard C++ string class if 1. +// "Minimal" means that wxString can be constructed from std::string or +// std::wstring but can't be implicitly converted to them. You need to enable +// the option below for the latter. +// +// Default is 1 for most compilers. +// +// Recommended setting: 1 unless you want to ensure your program doesn't use +// the standard C++ library at all. +#define wxUSE_STD_STRING wxUSE_STD_DEFAULT + +// Make wxString as much interchangeable with std::[w]string as possible, in +// particular allow implicit conversion of wxString to either of these classes. +// This comes at a price (or a benefit, depending on your point of view) of not +// allowing implicit conversion to "const char *" and "const wchar_t *". +// +// Because a lot of existing code relies on these conversions, this option is +// disabled by default but can be enabled for your build if you don't care +// about compatibility. +// +// Default is 0 if wxUSE_STL has its default value or 1 if it is enabled. +// +// Recommended setting: 0 to remain compatible with the official builds of +// wxWidgets. +#define wxUSE_STD_STRING_CONV_IN_WXSTRING wxUSE_STL + +// VC++ 4.2 and above allows and but you can't mix +// them. Set this option to 1 to use , 0 to use . +// +// Note that newer compilers (including VC++ 7.1 and later) don't support +// wxUSE_IOSTREAMH == 1 and so will be used anyhow. +// +// Default is 0. +// +// Recommended setting: 0, only set to 1 if you use a really old compiler +#define wxUSE_IOSTREAMH 0 + + +// ---------------------------------------------------------------------------- +// non GUI features selection +// ---------------------------------------------------------------------------- + +// Set wxUSE_LONGLONG to 1 to compile the wxLongLong class. This is a 64 bit +// integer which is implemented in terms of native 64 bit integers if any or +// uses emulation otherwise. +// +// This class is required by wxDateTime and so you should enable it if you want +// to use wxDateTime. For most modern platforms, it will use the native 64 bit +// integers in which case (almost) all of its functions are inline and it +// almost does not take any space, so there should be no reason to switch it +// off. +// +// Recommended setting: 1 +#define wxUSE_LONGLONG 1 + +// Set wxUSE_BASE64 to 1, to compile in Base64 support. This is required for +// storing binary data in wxConfig on most platforms. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_BASE64 1 + +// Set this to 1 to be able to use wxEventLoop even in console applications +// (i.e. using base library only, without GUI). This is mostly useful for +// processing socket events but is also necessary to use timers in console +// applications +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_CONSOLE_EVENTLOOP 1 + +// Set wxUSE_(F)FILE to 1 to compile wx(F)File classes. wxFile uses low level +// POSIX functions for file access, wxFFile uses ANSI C stdio.h functions. +// +// Default is 1 +// +// Recommended setting: 1 (wxFile is highly recommended as it is required by +// i18n code, wxFileConfig and others) +#define wxUSE_FILE 1 +#define wxUSE_FFILE 1 + +// Use wxFSVolume class providing access to the configured/active mount points +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely disabled if you don't use it) +#define wxUSE_FSVOLUME 1 + +// Use wxStandardPaths class which allows to retrieve some standard locations +// in the file system +// +// Default is 1 +// +// Recommended setting: 1 (may be disabled to save space, but not much) +#define wxUSE_STDPATHS 1 + +// use wxTextBuffer class: required by wxTextFile +#define wxUSE_TEXTBUFFER 1 + +// use wxTextFile class: requires wxFile and wxTextBuffer, required by +// wxFileConfig +#define wxUSE_TEXTFILE 1 + +// i18n support: _() macro, wxLocale class. Requires wxTextFile. +#define wxUSE_INTL 1 + +// Provide wxFoo_l() functions similar to standard foo() functions but taking +// an extra locale parameter. +// +// Notice that this is fully implemented only for the systems providing POSIX +// xlocale support or Microsoft Visual C++ >= 8 (which provides proprietary +// almost-equivalent of xlocale functions), otherwise wxFoo_l() functions will +// only work for the current user locale and "C" locale. You can use +// wxHAS_XLOCALE_SUPPORT to test whether the full support is available. +// +// Default is 1 +// +// Recommended setting: 1 but may be disabled if you are writing programs +// running only in C locale anyhow +#define wxUSE_XLOCALE 1 + +// Set wxUSE_DATETIME to 1 to compile the wxDateTime and related classes which +// allow to manipulate dates, times and time intervals. wxDateTime replaces the +// old wxTime and wxDate classes which are still provided for backwards +// compatibility (and implemented in terms of wxDateTime). +// +// Note that this class is relatively new and is still officially in alpha +// stage because some features are not yet (fully) implemented. It is already +// quite useful though and should only be disabled if you are aiming at +// absolutely minimal version of the library. +// +// Requires: wxUSE_LONGLONG +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_DATETIME 1 + +// Set wxUSE_TIMER to 1 to compile wxTimer class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_TIMER 1 + +// Use wxStopWatch clas. +// +// Default is 1 +// +// Recommended setting: 1 (needed by wxSocket) +#define wxUSE_STOPWATCH 1 + +// Set wxUSE_FSWATCHER to 1 if you want to enable wxFileSystemWatcher +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FSWATCHER 1 + +// Setting wxUSE_CONFIG to 1 enables the use of wxConfig and related classes +// which allow the application to store its settings in the persistent +// storage. Setting this to 1 will also enable on-demand creation of the +// global config object in wxApp. +// +// See also wxUSE_CONFIG_NATIVE below. +// +// Recommended setting: 1 +#define wxUSE_CONFIG 1 + +// If wxUSE_CONFIG is 1, you may choose to use either the native config +// classes under Windows (using .INI files under Win16 and the registry under +// Win32) or the portable text file format used by the config classes under +// Unix. +// +// Default is 1 to use native classes. Note that you may still use +// wxFileConfig even if you set this to 1 - just the config object created by +// default for the applications needs will be a wxRegConfig or wxIniConfig and +// not wxFileConfig. +// +// Recommended setting: 1 +#define wxUSE_CONFIG_NATIVE 1 + +// 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. Requires wxUSE_DYNAMIC_LOADER. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DIALUP_MANAGER 1 + +// Compile in classes for run-time DLL loading and function calling. +// Required by wxUSE_DIALUP_MANAGER. +// +// This setting is for Win32 only +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DYNLIB_CLASS 1 + +// experimental, don't use for now +#define wxUSE_DYNAMIC_LOADER 1 + +// Set to 1 to use socket classes +#define wxUSE_SOCKETS 1 + +// Set to 1 to use ipv6 socket classes (requires wxUSE_SOCKETS) +// +// Notice that currently setting this option under Windows will result in +// programs which can only run on recent OS versions (with ws2_32.dll +// installed) which is why it is disabled by default. +// +// Default is 1. +// +// Recommended setting: 1 if you need IPv6 support +#define wxUSE_IPV6 0 + +// 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 archive filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_ARCHIVE 1 + +// Set to 1 to enable virtual Internet filesystem (requires wxUSE_FILESYSTEM) +#define wxUSE_FS_INET 1 + +// wxArchive classes for accessing archives such as zip and tar +#define wxUSE_ARCHIVE_STREAMS 1 + +// Set to 1 to compile wxZipInput/OutputStream classes. +#define wxUSE_ZIPSTREAM 1 + +// Set to 1 to compile wxTarInput/OutputStream classes. +#define wxUSE_TARSTREAM 1 + +// Set to 1 to compile wxZlibInput/OutputStream classes. Also required by +// wxUSE_LIBPNG +#define wxUSE_ZLIB 1 + +// 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 wxWidgets one. +// +// Default is 1. +// +// Recommended setting: 1 unless you don't like the license terms (unlikely) +#define wxUSE_APPLE_IEEE 1 + +// Joystick support class +#define wxUSE_JOYSTICK 1 + +// wxFontEnumerator class +#define wxUSE_FONTENUM 1 + +// wxFontMapper class +#define wxUSE_FONTMAP 1 + +// wxMimeTypesManager class +#define wxUSE_MIMETYPE 1 + +// wxProtocol and related classes: if you want to use either of wxFTP, wxHTTP +// or wxURL you need to set this to 1. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_PROTOCOL 1 + +// The settings for the individual URL schemes +#define wxUSE_PROTOCOL_FILE 1 +#define wxUSE_PROTOCOL_FTP 1 +#define wxUSE_PROTOCOL_HTTP 1 + +// Define this to use wxURL class. +#define wxUSE_URL 1 + +// Define this to use native platform url and protocol support. +// Currently valid only for MS-Windows. +// Note: if you set this to 1, you can open ftp/http/gopher sites +// and obtain a valid input stream for these sites +// even when you set wxUSE_PROTOCOL_FTP/HTTP to 0. +// Doing so reduces the code size. +// +// This code is experimental and subject to change. +#define wxUSE_URL_NATIVE 0 + +// Support for wxVariant class used in several places throughout the library, +// notably in wxDataViewCtrl API. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size as much as +// possible in which case setting this to 0 can gain up to 100KB. +#define wxUSE_VARIANT 1 + +// Support for wxAny class, the successor for wxVariant. +// +// Default is 1. +// +// Recommended setting: 1 unless you want to reduce the library size by a small amount, +// or your compiler cannot for some reason cope with complexity of templates used. +#define wxUSE_ANY 1 + +// Support for regular expression matching via wxRegEx class: enable this to +// use POSIX regular expressions in your code. You need to compile regex +// library from src/regex to use it under Windows. +// +// Default is 0 +// +// Recommended setting: 1 if your compiler supports it, if it doesn't please +// contribute us a makefile for src/regex for it +#define wxUSE_REGEX 1 + +// wxSystemOptions class +#define wxUSE_SYSTEM_OPTIONS 1 + +// wxSound class +#define wxUSE_SOUND 1 + +// Use wxMediaCtrl +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_MEDIACTRL 1 + +// Use wxWidget's XRC XML-based resource system. Recommended. +// +// Default is 1 +// +// Recommended setting: 1 (requires wxUSE_XML) +#define wxUSE_XRC 1 + +// XML parsing classes. Note that their API will change in the future, so +// using wxXmlDocument and wxXmlNode in your app is not recommended. +// +// Default is the same as wxUSE_XRC, i.e. 1 by default. +// +// Recommended setting: 1 (required by XRC) +#define wxUSE_XML wxUSE_XRC + +// Use wxWidget's AUI docking system +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_AUI 1 + +// Use wxWidget's Ribbon classes for interfaces +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_RIBBON 1 + +// Use wxPropertyGrid. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_PROPGRID 1 + +// Use wxStyledTextCtrl, a wxWidgets implementation of Scintilla. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STC 1 + +// Use wxWidget's web viewing classes +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW 1 + +// Use the IE wxWebView backend +// +// Default is 1 on MSW +// +// Recommended setting: 1 +#ifdef __WXMSW__ +#define wxUSE_WEBVIEW_IE 1 +#else +#define wxUSE_WEBVIEW_IE 0 +#endif + +// Use the WebKit wxWebView backend +// +// Default is 1 on GTK and OSX +// +// Recommended setting: 1 +#if defined(__WXGTK__) || defined(__WXOSX__) +#define wxUSE_WEBVIEW_WEBKIT 1 +#else +#define wxUSE_WEBVIEW_WEBKIT 0 +#endif + +// Enable the new wxGraphicsPath and wxGraphicsContext classes for an advanced +// 2D drawing API. (Still somewhat experimental) +// +// Please note that on Windows gdiplus.dll is loaded dynamically which means +// that nothing special needs to be done as long as you don't use +// wxGraphicsContext at all or only use it on XP and later systems but you +// still do need to distribute it yourself for an application using +// wxGraphicsContext to be runnable on pre-XP systems. +// +// Default is 1 except if you're using a non-Microsoft compiler under Windows +// as only MSVC7+ is known to ship with gdiplus.h. For other compilers (e.g. +// mingw32) you may need to install the headers (and just the headers) +// yourself. If you do, change the setting below manually. +// +// Recommended setting: 1 if supported by the compilation environment + +// notice that we can't use wxCHECK_VISUALC_VERSION() here as this file is +// included from wx/platform.h before wxCHECK_VISUALC_VERSION() is defined +#ifdef _MSC_VER +# if _MSC_VER >= 1310 + // MSVC7.1+ comes with new enough Platform SDK, enable + // wxGraphicsContext support for it +# define wxUSE_GRAPHICS_CONTEXT 1 +# else + // MSVC 6 didn't include GDI+ headers so disable by default, enable it + // here if you use MSVC 6 with a newer SDK +# define wxUSE_GRAPHICS_CONTEXT 0 +# endif +#else + // Disable support for other Windows compilers, enable it if your compiler + // comes with new enough SDK or you installed the headers manually. + // + // Notice that this will be set by configure under non-Windows platforms + // anyhow so the value there is not important. +# define wxUSE_GRAPHICS_CONTEXT 0 +#endif + +// Enable wxGraphicsContext implementation using Cairo library. +// +// This is not needed under Windows and detected automatically by configure +// under other systems, however you may set this to 1 manually if you installed +// Cairo under Windows yourself and prefer to use it instead the native GDI+ +// implementation. +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_CAIRO 0 + + +// ---------------------------------------------------------------------------- +// Individual GUI controls +// ---------------------------------------------------------------------------- + +// You must set wxUSE_CONTROLS to 1 if you are using any controls at all +// (without it, wxControl class is not compiled) +// +// Default is 1 +// +// Recommended setting: 1 (don't change except for very special programs) +#define wxUSE_CONTROLS 1 + +// Support markup in control labels, i.e. provide wxControl::SetLabelMarkup(). +// Currently markup is supported only by a few controls and only some ports but +// their number will increase with time. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you want to save on code size) +#define wxUSE_MARKUP 1 + +// wxPopupWindow class is a top level transient window. It is currently used +// to implement wxTipWindow +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0 if you don't wxUSE_TIPWINDOW) +#define wxUSE_POPUPWIN 1 + +// wxTipWindow allows to implement the custom tooltips, it is used by the +// context help classes. Requires wxUSE_POPUPWIN. +// +// Default is 1 +// +// Recommended setting: 1 (may be set to 0) +#define wxUSE_TIPWINDOW 1 + +// Each of the settings below corresponds to one wxWidgets control. They are +// all switched on by default but may be disabled if you are sure that your +// program (including any standard dialogs it can show!) doesn't need them and +// if you desperately want to save some space. If you use any of these you must +// set wxUSE_CONTROLS as well. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_ANIMATIONCTRL 1 // wxAnimationCtrl +#define wxUSE_BANNERWINDOW 1 // wxBannerWindow +#define wxUSE_BUTTON 1 // wxButton +#define wxUSE_BMPBUTTON 1 // wxBitmapButton +#define wxUSE_CALENDARCTRL 1 // wxCalendarCtrl +#define wxUSE_CHECKBOX 1 // wxCheckBox +#define wxUSE_CHECKLISTBOX 1 // wxCheckListBox (requires wxUSE_OWNER_DRAWN) +#define wxUSE_CHOICE 1 // wxChoice +#define wxUSE_COLLPANE 1 // wxCollapsiblePane +#define wxUSE_COLOURPICKERCTRL 1 // wxColourPickerCtrl +#define wxUSE_COMBOBOX 1 // wxComboBox +#define wxUSE_COMMANDLINKBUTTON 1 // wxCommandLinkButton +#define wxUSE_DATAVIEWCTRL 1 // wxDataViewCtrl +#define wxUSE_DATEPICKCTRL 1 // wxDatePickerCtrl +#define wxUSE_DIRPICKERCTRL 1 // wxDirPickerCtrl +#define wxUSE_EDITABLELISTBOX 1 // wxEditableListBox +#define wxUSE_FILECTRL 1 // wxFileCtrl +#define wxUSE_FILEPICKERCTRL 1 // wxFilePickerCtrl +#define wxUSE_FONTPICKERCTRL 1 // wxFontPickerCtrl +#define wxUSE_GAUGE 1 // wxGauge +#define wxUSE_HEADERCTRL 1 // wxHeaderCtrl +#define wxUSE_HYPERLINKCTRL 1 // wxHyperlinkCtrl +#define wxUSE_LISTBOX 1 // wxListBox +#define wxUSE_LISTCTRL 1 // wxListCtrl +#define wxUSE_RADIOBOX 1 // wxRadioBox +#define wxUSE_RADIOBTN 1 // wxRadioButton +#define wxUSE_RICHMSGDLG 1 // wxRichMessageDialog +#define wxUSE_SCROLLBAR 1 // wxScrollBar +#define wxUSE_SEARCHCTRL 1 // wxSearchCtrl +#define wxUSE_SLIDER 1 // wxSlider +#define wxUSE_SPINBTN 1 // wxSpinButton +#define wxUSE_SPINCTRL 1 // wxSpinCtrl +#define wxUSE_STATBOX 1 // wxStaticBox +#define wxUSE_STATLINE 1 // wxStaticLine +#define wxUSE_STATTEXT 1 // wxStaticText +#define wxUSE_STATBMP 1 // wxStaticBitmap +#define wxUSE_TEXTCTRL 1 // wxTextCtrl +#define wxUSE_TIMEPICKCTRL 1 // wxTimePickerCtrl +#define wxUSE_TOGGLEBTN 1 // requires wxButton +#define wxUSE_TREECTRL 1 // wxTreeCtrl +#define wxUSE_TREELISTCTRL 1 // wxTreeListCtrl + +// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR +// below either wxStatusBar95 or a generic wxStatusBar will be used. +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_STATUSBAR 1 + +// Two status bar implementations are available under Win32: the generic one +// or the wrapper around native control. For native look and feel the native +// version should be used. +// +// Default is 1 for the platforms where native status bar is supported. +// +// Recommended setting: 1 (there is no advantage in using the generic one) +#define wxUSE_NATIVE_STATUSBAR 1 + +// wxToolBar related settings: if wxUSE_TOOLBAR is 0, don't compile any toolbar +// classes at all. Otherwise, use the native toolbar class unless +// wxUSE_TOOLBAR_NATIVE is 0. +// +// Default is 1 for all settings. +// +// Recommended setting: 1 for wxUSE_TOOLBAR and wxUSE_TOOLBAR_NATIVE. +#define wxUSE_TOOLBAR 1 +#define wxUSE_TOOLBAR_NATIVE 1 + +// wxNotebook is a control with several "tabs" located on one of its sides. It +// may be used to logically organise the data presented to the user instead of +// putting everything in one huge dialog. It replaces wxTabControl and related +// classes of wxWin 1.6x. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTEBOOK 1 + +// wxListbook control is similar to wxNotebook but uses wxListCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_LISTBOOK 1 + +// wxChoicebook control is similar to wxNotebook but uses wxChoice instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CHOICEBOOK 1 + +// wxTreebook control is similar to wxNotebook but uses wxTreeCtrl instead of +// the tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TREEBOOK 1 + +// wxToolbook control is similar to wxNotebook but uses wxToolBar instead of +// tabs +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLBOOK 1 + +// wxTaskBarIcon is a small notification icon shown in the system toolbar or +// dock. +// +// Default is 1. +// +// Recommended setting: 1 (but can be set to 0 if you don't need it) +#define wxUSE_TASKBARICON 1 + +// wxGrid class +// +// Default is 1, set to 0 to cut down compilation time and binaries size if you +// don't use it. +// +// Recommended setting: 1 +// +#define wxUSE_GRID 1 + +// wxMiniFrame class: a frame with narrow title bar +// +// Default is 1. +// +// Recommended setting: 1 (it doesn't cost almost anything) +#define wxUSE_MINIFRAME 1 + +// wxComboCtrl and related classes: combobox with custom popup window and +// not necessarily a listbox. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 except for wxUniv where it +// it used by wxComboBox +#define wxUSE_COMBOCTRL 1 + +// wxOwnerDrawnComboBox is a custom combobox allowing to paint the combobox +// items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0, except where it is +// needed as a base class for generic wxBitmapComboBox. +#define wxUSE_ODCOMBOBOX 1 + +// wxBitmapComboBox is a combobox that can have images in front of text items. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 +#define wxUSE_BITMAPCOMBOBOX 1 + +// wxRearrangeCtrl is a wxCheckListBox with two buttons allowing to move items +// up and down in it. It is also used as part of wxRearrangeDialog. +// +// Default is 1. +// +// Recommended setting: 1 but can be safely set to 0 (currently used only by +// wxHeaderCtrl) +#define wxUSE_REARRANGECTRL 1 + +// ---------------------------------------------------------------------------- +// Miscellaneous GUI stuff +// ---------------------------------------------------------------------------- + +// wxAcceleratorTable/Entry classes and support for them in wxMenu(Bar) +#define wxUSE_ACCEL 1 + +// Use the standard art provider. The icons returned by this provider are +// embedded into the library as XPMs so disabling it reduces the library size +// somewhat but this should only be done if you use your own custom art +// provider returning the icons or never use any icons not provided by the +// native art provider (which might not be implemented at all for some +// platforms) or by the Tango icons provider (if it's not itself disabled +// below). +// +// Default is 1. +// +// Recommended setting: 1 unless you use your own custom art provider. +#define wxUSE_ARTPROVIDER_STD 1 + +// Use art provider providing Tango icons: this art provider has higher quality +// icons than the default ones using smaller size XPM icons without +// transparency but the embedded PNG icons add to the library size. +// +// Default is 1 under non-GTK ports. Under wxGTK the native art provider using +// the GTK+ stock icons replaces it so it is normally not necessary. +// +// Recommended setting: 1 but can be turned off to reduce the library size. +#define wxUSE_ARTPROVIDER_TANGO 1 + +// Hotkey support (currently Windows only) +#define wxUSE_HOTKEY 1 + +// Use wxCaret: a class implementing a "cursor" in a text control (called caret +// under Windows). +// +// Default is 1. +// +// Recommended setting: 1 (can be safely set to 0, not used by the library) +#define wxUSE_CARET 1 + +// Use wxDisplay class: it allows enumerating all displays on a system and +// their geometries as well as finding the display on which the given point or +// window lies. +// +// Default is 1. +// +// Recommended setting: 1 if you need it, can be safely set to 0 otherwise +#define wxUSE_DISPLAY 1 + +// Miscellaneous geometry code: needed for Canvas library +#define wxUSE_GEOMETRY 1 + +// Use wxImageList. This class is needed by wxNotebook, wxTreeCtrl and +// wxListCtrl. +// +// Default is 1. +// +// Recommended setting: 1 (set it to 0 if you don't use any of the controls +// enumerated above, then this class is mostly useless too) +#define wxUSE_IMAGLIST 1 + +// Use wxInfoBar class. +// +// Default is 1. +// +// Recommended setting: 1 (but can be disabled without problems as nothing +// depends on it) +#define wxUSE_INFOBAR 1 + +// Use wxMenu, wxMenuBar, wxMenuItem. +// +// Default is 1. +// +// Recommended setting: 1 (can't be disabled under MSW) +#define wxUSE_MENUS 1 + +// Use wxNotificationMessage. +// +// wxNotificationMessage allows to show non-intrusive messages to the user +// using balloons, banners, popups or whatever is the appropriate method for +// the current platform. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_NOTIFICATION_MESSAGE 1 + +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + +// wxRichToolTip is a customizable tooltip class which has more functionality +// than the stock (but native, unlike this class) wxToolTip. +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely set to 0 if you don't need it) +#define wxUSE_RICHTOOLTIP 1 + +// Use wxSashWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SASH 1 + +// Use wxSplitterWindow class. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_SPLITTER 1 + +// Use wxToolTip and wxWindow::Set/GetToolTip() methods. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_TOOLTIPS 1 + +// wxValidator class and related methods +#define wxUSE_VALIDATORS 1 + +// Use reference counted ID management: this means that wxWidgets will track +// the automatically allocated ids (those used when you use wxID_ANY when +// creating a window, menu or toolbar item &c) instead of just supposing that +// the program never runs out of them. This is mostly useful only under wxMSW +// where the total ids range is limited to SHRT_MIN..SHRT_MAX and where +// long-running programs can run into problems with ids reuse without this. On +// the other platforms, where the ids have the full int range, this shouldn't +// be necessary. +#ifdef __WXMSW__ +#define wxUSE_AUTOID_MANAGEMENT 1 +#else +#define wxUSE_AUTOID_MANAGEMENT 0 +#endif + +// ---------------------------------------------------------------------------- +// common dialogs +// ---------------------------------------------------------------------------- + +// On rare occasions (e.g. using DJGPP) may want to omit common dialogs (e.g. +// file selector, printer dialog). Switching this off also switches off the +// printing architecture and interactive wxPrinterDC. +// +// Default is 1 +// +// Recommended setting: 1 (unless it really doesn't work) +#define wxUSE_COMMON_DIALOGS 1 + +// wxBusyInfo displays window with message when app is busy. Works in same way +// as wxBusyCursor +#define wxUSE_BUSYINFO 1 + +// Use single/multiple choice dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_CHOICEDLG 1 + +// Use colour picker dialog +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_COLOURDLG 1 + +// wxDirDlg class for getting a directory name from user +#define wxUSE_DIRDLG 1 + +// TODO: setting to choose the generic or native one + +// Use file open/save dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (used in many places in the library itself) +#define wxUSE_FILEDLG 1 + +// Use find/replace dialogs. +// +// Default is 1 +// +// Recommended setting: 1 (but may be safely set to 0) +#define wxUSE_FINDREPLDLG 1 + +// Use font picker dialog +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_FONTDLG 1 + +// Use wxMessageDialog and wxMessageBox. +// +// Default is 1 +// +// Recommended setting: 1 (used in the library itself) +#define wxUSE_MSGDLG 1 + +// progress dialog class for lengthy operations +#define wxUSE_PROGRESSDLG 1 + +// support for startup tips (wxShowTip &c) +#define wxUSE_STARTUP_TIPS 1 + +// text entry dialog and wxGetTextFromUser function +#define wxUSE_TEXTDLG 1 + +// number entry dialog +#define wxUSE_NUMBERDLG 1 + +// splash screen class +#define wxUSE_SPLASH 1 + +// wizards +#define wxUSE_WIZARDDLG 1 + +// Compile in wxAboutBox() function showing the standard "About" dialog. +// +// Default is 1 +// +// Recommended setting: 1 but can be set to 0 to save some space if you don't +// use this function +#define wxUSE_ABOUTDLG 1 + +// wxFileHistory class +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_FILE_HISTORY 1 + +// ---------------------------------------------------------------------------- +// Metafiles support +// ---------------------------------------------------------------------------- + +// Windows supports the graphics format known as metafile which is, though not +// portable, is widely used under Windows and so is supported by wxWin (under +// Windows only, of course). Win16 (Win3.1) used the so-called "Window +// MetaFiles" or WMFs which were replaced with "Enhanced MetaFiles" or EMFs in +// Win32 (Win9x, NT, 2000). Both of these are supported in wxWin and, by +// default, WMFs will be used under Win16 and EMFs under Win32. This may be +// changed by setting wxUSE_WIN_METAFILES_ALWAYS to 1 and/or setting +// wxUSE_ENH_METAFILE to 0. You may also set wxUSE_METAFILE to 0 to not compile +// in any metafile related classes at all. +// +// Default is 1 for wxUSE_ENH_METAFILE and 0 for wxUSE_WIN_METAFILES_ALWAYS. +// +// Recommended setting: default or 0 for everything for portable programs. +#define wxUSE_METAFILE 1 +#define wxUSE_ENH_METAFILE 1 +#define wxUSE_WIN_METAFILES_ALWAYS 0 + +// ---------------------------------------------------------------------------- +// Big GUI components +// ---------------------------------------------------------------------------- + +// Set to 0 to disable MDI support. +// +// Requires wxUSE_NOTEBOOK under platforms other than MSW. +// +// Default is 1. +// +// Recommended setting: 1, can be safely set to 0. +#define wxUSE_MDI 1 + +// Set to 0 to disable document/view architecture +#define wxUSE_DOC_VIEW_ARCHITECTURE 1 + +// Set to 0 to disable MDI document/view architecture +// +// Requires wxUSE_MDI && wxUSE_DOC_VIEW_ARCHITECTURE +#define wxUSE_MDI_ARCHITECTURE 1 + +// Set to 0 to disable print/preview architecture code +#define wxUSE_PRINTING_ARCHITECTURE 1 + +// wxHTML sublibrary allows to display HTML in wxWindow programs and much, +// much more. +// +// Default is 1. +// +// Recommended setting: 1 (wxHTML is great!), set to 0 if you want compile a +// smaller library. +#define wxUSE_HTML 1 + +// Setting wxUSE_GLCANVAS to 1 enables OpenGL support. You need to have OpenGL +// headers and libraries to be able to compile the library with wxUSE_GLCANVAS +// set to 1 and, under Windows, also to add opengl32.lib and glu32.lib to the +// list of libraries used to link your application (although this is done +// implicitly for Microsoft Visual C++ users). +// +// Default is 1 unless the compiler is known to ship without the necessary +// headers (Digital Mars) or the platform doesn't support OpenGL (Windows CE). +// +// Recommended setting: 1 if you intend to use OpenGL, can be safely set to 0 +// otherwise. +#define wxUSE_GLCANVAS 1 + +// wxRichTextCtrl allows editing of styled text. +// +// Default is 1. +// +// Recommended setting: 1, set to 0 if you want compile a +// smaller library. +#define wxUSE_RICHTEXT 1 + +// ---------------------------------------------------------------------------- +// Data transfer +// ---------------------------------------------------------------------------- + +// Use wxClipboard class for clipboard copy/paste. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_CLIPBOARD 1 + +// Use wxDataObject and related classes. Needed for clipboard and OLE drag and +// drop +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DATAOBJ 1 + +// Use wxDropTarget and wxDropSource classes for drag and drop (this is +// different from "built in" drag and drop in wxTreeCtrl which is always +// available). Requires wxUSE_DATAOBJ. +// +// Default is 1. +// +// Recommended setting: 1 +#define wxUSE_DRAG_AND_DROP 1 + +// Use wxAccessible for enhanced and customisable accessibility. +// Depends on wxUSE_OLE. +// +// Default is 0. +// +// Recommended setting (at present): 0 +#define wxUSE_ACCESSIBILITY 0 + +// ---------------------------------------------------------------------------- +// miscellaneous settings +// ---------------------------------------------------------------------------- + +// wxSingleInstanceChecker class allows to verify at startup if another program +// instance is running. +// +// Default is 1 +// +// Recommended setting: 1 (the class is tiny, disabling it won't save much +// space) +#define wxUSE_SNGLINST_CHECKER 1 + +#define wxUSE_DRAGIMAGE 1 + +#define wxUSE_IPC 1 + // 0 for no interprocess comms +#define wxUSE_HELP 1 + // 0 for no help facility + +// Should we use MS HTML help for wxHelpController? If disabled, neither +// wxCHMHelpController nor wxBestHelpController are available. +// +// Default is 1 under MSW, 0 is always used for the other platforms. +// +// Recommended setting: 1, only set to 0 if you have trouble compiling +// wxCHMHelpController (could be a problem with really ancient compilers) +#define wxUSE_MS_HTML_HELP 1 + + +// Use wxHTML-based help controller? +#define wxUSE_WXHTML_HELP 1 + +#define wxUSE_CONSTRAINTS 1 + // 0 for no window layout constraint system + +#define wxUSE_SPLINES 1 + // 0 for no splines + +#define wxUSE_MOUSEWHEEL 1 + // Include mouse wheel support + +// Compile wxUIActionSimulator class? +#define wxUSE_UIACTIONSIMULATOR 1 + +// ---------------------------------------------------------------------------- +// wxDC classes for various output formats +// ---------------------------------------------------------------------------- + +// Set to 1 for PostScript device context. +#define wxUSE_POSTSCRIPT 0 + +// Set to 1 to use font metric files in GetTextExtent +#define wxUSE_AFM_FOR_POSTSCRIPT 1 + +// Set to 1 to compile in support for wxSVGFileDC, a wxDC subclass which allows +// to create files in SVG (Scalable Vector Graphics) format. +#define wxUSE_SVG 1 + +// Should wxDC provide SetTransformMatrix() and related methods? +// +// Default is 1 but can be set to 0 if this functionality is not used. Notice +// that currently only wxMSW supports this so setting this to 0 doesn't change +// much for non-MSW platforms (although it will still save a few bytes +// probably). +// +// Recommended setting: 1. +#define wxUSE_DC_TRANSFORM_MATRIX 1 + +// ---------------------------------------------------------------------------- +// image format support +// ---------------------------------------------------------------------------- + +// 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 wxImage support (recommended). +#define wxUSE_IMAGE 1 + +// Set to 1 for PNG format support (requires libpng). Also requires wxUSE_ZLIB. +#define wxUSE_LIBPNG 1 + +// Set to 1 for JPEG format support (requires libjpeg) +#define wxUSE_LIBJPEG 1 + +// Set to 1 for TIFF format support (requires libtiff) +#define wxUSE_LIBTIFF 1 + +// Set to 1 for TGA format support (loading only) +#define wxUSE_TGA 1 + +// Set to 1 for GIF format support +#define wxUSE_GIF 1 + +// Set to 1 for PNM format support +#define wxUSE_PNM 1 + +// Set to 1 for PCX format support +#define wxUSE_PCX 1 + +// Set to 1 for IFF format support (Amiga format) +#define wxUSE_IFF 0 + +// Set to 1 for XPM format support +#define wxUSE_XPM 1 + +// Set to 1 for MS Icons and Cursors format support +#define wxUSE_ICO_CUR 1 + +// Set to 1 to compile in wxPalette class +#define wxUSE_PALETTE 1 + +// ---------------------------------------------------------------------------- +// wxUniversal-only options +// ---------------------------------------------------------------------------- + +// Set to 1 to enable compilation of all themes, this is the default +#define wxUSE_ALL_THEMES 1 + +// Set to 1 to enable the compilation of individual theme if wxUSE_ALL_THEMES +// is unset, if it is set these options are not used; notice that metal theme +// uses Win32 one +#define wxUSE_THEME_GTK 0 +#define wxUSE_THEME_METAL 0 +#define wxUSE_THEME_MONO 0 +#define wxUSE_THEME_WIN32 0 + + +/* --- end common options --- */ + +/* --- start MSW options --- */ +// ---------------------------------------------------------------------------- +// Windows-only settings +// ---------------------------------------------------------------------------- + +// Set wxUSE_UNICODE_MSLU to 1 if you're compiling wxWidgets in Unicode mode +// and want to run your programs under Windows 9x and not only NT/2000/XP. +// This setting enables use of unicows.dll from MSLU (MS Layer for Unicode, see +// http://www.microsoft.com/globaldev/handson/dev/mslu_announce.mspx). Note +// that you will have to modify the makefiles to include unicows.lib import +// library as the first library (see installation instructions in install.txt +// to learn how to do it when building the library or samples). +// +// If your compiler doesn't have unicows.lib, you can get a version of it at +// http://libunicows.sourceforge.net +// +// Default is 0 +// +// Recommended setting: 0 (1 if you want to deploy Unicode apps on 9x systems) +#ifndef wxUSE_UNICODE_MSLU + #define wxUSE_UNICODE_MSLU 0 +#endif + +// Set this to 1 if you want to use wxWidgets 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 + +// 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 enable wxAutomationObject class. +// +// Default is 1. +// +// Recommended setting: 1 if you need to control other applications via OLE +// Automation, can be safely set to 0 otherwise +#define wxUSE_OLE_AUTOMATION 1 + +// Set this to 1 to enable wxActiveXContainer class allowing to embed OLE +// controls in wx. +// +// Default is 1. +// +// Recommended setting: 1, required by wxMediaCtrl +#define wxUSE_ACTIVEX 1 + +// wxDC caching implementation +#define wxUSE_DC_CACHEING 1 + +// Set this to 1 to enable wxDIB class used internally for manipulating +// wxBitmap data. +// +// Default is 1, set it to 0 only if you don't use wxImage neither +// +// Recommended setting: 1 (without it conversion to/from wxImage won't work) +#define wxUSE_WXDIB 1 + +// Set to 0 to disable PostScript print/preview architecture code under Windows +// (just use Windows printing). +#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1 + +// Set this to 1 to compile in wxRegKey class. +// +// Default is 1 +// +// Recommended setting: 1, this is used internally by wx in a few places +#define wxUSE_REGKEY 1 + +// 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 +#define wxUSE_RICHEDIT 1 + +// Set this to 1 to use extra features of richedit v2 and later controls +// +// Default is 1 for compilers which support it +// +// Recommended setting: 1 +#define wxUSE_RICHEDIT2 1 + +// 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 + +// Set this to 1 to enable MSW-specific wxTaskBarIcon::ShowBalloon() method. It +// is required by native wxNotificationMessage implementation. +// +// Default is 1 but disabled in wx/msw/chkconf.h if SDK is too old to contain +// the necessary declarations. +// +// Recommended setting: 1, set to 0 for a tiny library size reduction +#define wxUSE_TASKBARICON_BALLOONS 1 + +// Set to 1 to compile MS Windows XP theme engine support +#define wxUSE_UXTHEME 1 + +// Set to 1 to use InkEdit control (Tablet PC), if available +#define wxUSE_INKEDIT 0 + +// Set to 1 to enable .INI files based wxConfig implementation (wxIniConfig) +// +// Default is 0. +// +// Recommended setting: 0, nobody uses .INI files any more +#define wxUSE_INICONF 0 + +// ---------------------------------------------------------------------------- +// Generic versions of native controls +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxDatePickerCtrlGeneric in addition to the +// native wxDatePickerCtrl +// +// Default is 0. +// +// Recommended setting: 0, this is mainly used for testing +#define wxUSE_DATEPICKCTRL_GENERIC 0 + +// Set this to 1 to be able to use wxTimePickerCtrlGeneric in addition to the +// native wxTimePickerCtrl for the platforms that have the latter (MSW). +// +// Default is 0. +// +// Recommended setting: 0, this is mainly used for testing +#define wxUSE_TIMEPICKCTRL_GENERIC 0 + +// ---------------------------------------------------------------------------- +// Crash debugging helpers +// ---------------------------------------------------------------------------- + +// Set this to 1 to be able to use wxCrashReport::Generate() to create mini +// dumps of your program when it crashes (or at any other moment) +// +// Default is 1 if supported by the compiler (VC++ and recent BC++ only). +// +// Recommended setting: 1, set to 0 if your programs never crash +#define wxUSE_CRASHREPORT 1 +/* --- end MSW options --- */ + +// GTK-specific options used when not using configure. As we can't test for the +// exact GTK version (without including GTK+ headers that we don't want to +// include from our own public headers), just assume a recent GTK 2.x. +#define __WXGTK20__ +#define __WXGTK210__ +#define __WXGTK218__ +//#define __WXGTK3__ + +#endif // _WX_SETUP_H_ diff --git a/Externals/wxWidgets3/include/wx/gtk/slider.h b/Externals/wxWidgets3/include/wx/gtk/slider.h index 01fc6136f0..f8833c4685 100644 --- a/Externals/wxWidgets3/include/wx/gtk/slider.h +++ b/Externals/wxWidgets3/include/wx/gtk/slider.h @@ -2,7 +2,6 @@ // Name: wx/gtk/slider.h // Purpose: // Author: Robert Roebling -// Id: $Id: slider.h 65680 2010-09-30 11:44:45Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -30,6 +29,7 @@ public: Create( parent, id, value, minValue, maxValue, pos, size, style, validator, name ); } + ~wxSlider(); bool Create(wxWindow *parent, wxWindowID id, diff --git a/Externals/wxWidgets3/include/wx/gtk/spinbutt.h b/Externals/wxWidgets3/include/wx/gtk/spinbutt.h index a38cd703c1..4a9d20461e 100644 --- a/Externals/wxWidgets3/include/wx/gtk/spinbutt.h +++ b/Externals/wxWidgets3/include/wx/gtk/spinbutt.h @@ -3,7 +3,6 @@ // Purpose: wxSpinButton class // Author: Robert Roebling // Modified by: -// RCS-ID: $Id: spinbutt.h 62785 2009-12-05 19:25:04Z PC $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/spinctrl.h b/Externals/wxWidgets3/include/wx/gtk/spinctrl.h index d0c4d35ebd..ef7b6edb7d 100644 --- a/Externals/wxWidgets3/include/wx/gtk/spinctrl.h +++ b/Externals/wxWidgets3/include/wx/gtk/spinctrl.h @@ -3,7 +3,6 @@ // Purpose: wxSpinCtrl class // Author: Robert Roebling // Modified by: -// RCS-ID: $Id: spinctrl.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -73,13 +72,15 @@ protected: void GtkEnableEvents() const; virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; // Widgets that use the style->base colour for the BG colour should // override this and return true. virtual bool UseGTKStyleBase() const { return true; } - DECLARE_DYNAMIC_CLASS(wxSpinCtrlGTKBase) + friend class wxSpinCtrlEventDisabler; + DECLARE_EVENT_TABLE() }; @@ -90,7 +91,7 @@ protected: class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinCtrlGTKBase { public: - wxSpinCtrl() {} + wxSpinCtrl() { Init(); } wxSpinCtrl(wxWindow *parent, wxWindowID id = wxID_ANY, const wxString& value = wxEmptyString, @@ -100,6 +101,8 @@ public: int min = 0, int max = 100, int initial = 0, const wxString& name = wxS("wxSpinCtrl")) { + Init(); + Create(parent, id, value, pos, size, style, min, max, initial, name); } @@ -128,6 +131,18 @@ public: void SetRange( int minVal, int maxVal ) { DoSetRange(minVal, maxVal); } void SetIncrement(int inc) { DoSetIncrement(inc); } + virtual int GetBase() const { return m_base; } + virtual bool SetBase(int base); + +private: + // Common part of all ctors. + void Init() + { + m_base = 10; + } + + int m_base; + DECLARE_DYNAMIC_CLASS(wxSpinCtrl) }; @@ -181,6 +196,9 @@ public: void SetIncrement(double inc) { DoSetIncrement(inc); } void SetDigits(unsigned digits); + virtual int GetBase() const { return 10; } + virtual bool SetBase(int WXUNUSED(base)) { return false; } + DECLARE_DYNAMIC_CLASS(wxSpinCtrlDouble) }; diff --git a/Externals/wxWidgets3/include/wx/gtk/statbmp.h b/Externals/wxWidgets3/include/wx/gtk/statbmp.h index 2c98b31496..b7bba950d0 100644 --- a/Externals/wxWidgets3/include/wx/gtk/statbmp.h +++ b/Externals/wxWidgets3/include/wx/gtk/statbmp.h @@ -2,7 +2,6 @@ // Name: wx/gtk/statbmp.h // Purpose: // Author: Robert Roebling -// Id: $Id: statbmp.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/statbox.h b/Externals/wxWidgets3/include/wx/gtk/statbox.h index 0d9ab6f624..80dbb7f594 100644 --- a/Externals/wxWidgets3/include/wx/gtk/statbox.h +++ b/Externals/wxWidgets3/include/wx/gtk/statbox.h @@ -2,7 +2,6 @@ // Name: wx/gtk/statbox.h // Purpose: // Author: Robert Roebling -// Id: $Id: statbox.h 70738 2012-02-28 17:06:56Z PC $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/statline.h b/Externals/wxWidgets3/include/wx/gtk/statline.h index 04f9e56822..aa4077671f 100644 --- a/Externals/wxWidgets3/include/wx/gtk/statline.h +++ b/Externals/wxWidgets3/include/wx/gtk/statline.h @@ -2,7 +2,6 @@ // Name: wx/gtk/statline.h // Purpose: // Author: Robert Roebling -// Id: $Id: statline.h 43874 2006-12-09 14:52:59Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/stattext.h b/Externals/wxWidgets3/include/wx/gtk/stattext.h index 7412e70449..f6d88cb83a 100644 --- a/Externals/wxWidgets3/include/wx/gtk/stattext.h +++ b/Externals/wxWidgets3/include/wx/gtk/stattext.h @@ -2,7 +2,6 @@ // Name: wx/gtk/stattext.h // Purpose: // Author: Robert Roebling -// Id: $Id: stattext.h 67062 2011-02-27 12:48:07Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -48,10 +47,6 @@ protected: virtual bool GTKWidgetNeedsMnemonic() const; virtual void GTKWidgetDoSetMnemonic(GtkWidget* w); - virtual void DoSetSize(int x, int y, - int width, int height, - int sizeFlags = wxSIZE_AUTO); - virtual wxSize DoGetBestSize() const; virtual wxString DoGetLabel() const; diff --git a/Externals/wxWidgets3/include/wx/gtk/taskbar.h b/Externals/wxWidgets3/include/wx/gtk/taskbar.h index ba47591d5f..03bd8daff0 100644 --- a/Externals/wxWidgets3/include/wx/gtk/taskbar.h +++ b/Externals/wxWidgets3/include/wx/gtk/taskbar.h @@ -3,7 +3,6 @@ // Purpose: wxTaskBarIcon class for GTK2 // Author: Paul Cornett // Created: 2009-02-08 -// RCS-ID: $Id: taskbar.h 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) 2009 Paul Cornett // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -14,7 +13,7 @@ class WXDLLIMPEXP_ADV wxTaskBarIcon: public wxTaskBarIconBase { public: - wxTaskBarIcon(); + wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE); ~wxTaskBarIcon(); virtual bool SetIcon(const wxIcon& icon, const wxString& tooltip = wxString()); virtual bool RemoveIcon(); diff --git a/Externals/wxWidgets3/include/wx/gtk/textctrl.h b/Externals/wxWidgets3/include/wx/gtk/textctrl.h index fb214dc5f9..9fefd91975 100644 --- a/Externals/wxWidgets3/include/wx/gtk/textctrl.h +++ b/Externals/wxWidgets3/include/wx/gtk/textctrl.h @@ -3,7 +3,6 @@ // Purpose: // Author: Robert Roebling // Created: 01/02/97 -// Id: $Id: textctrl.h 68450 2011-07-29 15:11:54Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -145,28 +144,26 @@ public: GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); protected: - // wxGTK-specific: called recursively by Enable, - // to give widgets an oppprtunity to correct their colours after they - // have been changed by Enable - virtual void OnEnabled(bool enable); - // overridden wxWindow virtual methods virtual wxSize DoGetBestSize() const; virtual void DoApplyWidgetStyle(GtkRcStyle *style); virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + virtual void DoFreeze(); virtual void DoThaw(); - // common part of all ctors - void Init(); - // Widgets that use the style->base colour for the BG colour should // override this and return true. virtual bool UseGTKStyleBase() const { return true; } virtual void DoSetValue(const wxString &value, int flags = 0); + // Override this to use either GtkEntry or GtkTextView IME depending on the + // kind of control we are. + virtual int GTKIMFilterKeypress(GdkEventKey* event) const; + virtual wxPoint DoPositionToCoords(long pos) const; // wrappers hiding the differences between functions doing the same thing @@ -179,6 +176,8 @@ protected: void GTKSetJustification(); private: + void Init(); + // overridden wxTextEntry virtual methods virtual GtkEditable *GetEditable() const; virtual GtkEntry *GetEntry() const; diff --git a/Externals/wxWidgets3/include/wx/gtk/textentry.h b/Externals/wxWidgets3/include/wx/gtk/textentry.h index c9084a53f4..5df686cf24 100644 --- a/Externals/wxWidgets3/include/wx/gtk/textentry.h +++ b/Externals/wxWidgets3/include/wx/gtk/textentry.h @@ -3,7 +3,6 @@ // Purpose: wxGTK-specific wxTextEntry implementation // Author: Vadim Zeitlin // Created: 2007-09-24 -// RCS-ID: $Id: textentry.h 67509 2011-04-16 17:27:04Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -11,6 +10,7 @@ #ifndef _WX_GTK_TEXTENTRY_H_ #define _WX_GTK_TEXTENTRY_H_ +typedef struct _GdkEventKey GdkEventKey; typedef struct _GtkEditable GtkEditable; typedef struct _GtkEntry GtkEntry; @@ -50,8 +50,18 @@ public: // implementation only from now on void SendMaxLenEvent(); + bool GTKEntryOnInsertText(const char* text); protected: + // This method must be called from the derived class Create() to connect + // the handlers for the clipboard (cut/copy/paste) events. + void GTKConnectClipboardSignals(GtkWidget* entry); + + // And this one to connect "insert-text" signal. + void GTKConnectInsertTextSignal(GtkEntry* entry); + + + virtual void DoSetValue(const wxString& value, int flags); virtual wxString DoGetValue() const; // margins functions @@ -60,6 +70,9 @@ protected: virtual bool DoAutoCompleteStrings(const wxArrayString& choices); + // Override the base class method to use GtkEntry IM context. + virtual int GTKIMFilterKeypress(GdkEventKey* event) const; + private: // implement this to return the associated GtkEntry or another widget // implementing GtkEditable diff --git a/Externals/wxWidgets3/include/wx/gtk/tglbtn.h b/Externals/wxWidgets3/include/wx/gtk/tglbtn.h index 514f5e4e7e..d6975311f4 100644 --- a/Externals/wxWidgets3/include/wx/gtk/tglbtn.h +++ b/Externals/wxWidgets3/include/wx/gtk/tglbtn.h @@ -5,7 +5,6 @@ // Author: John Norris, minor changes by Axel Schlueter // Modified by: // Created: 08.02.01 -// RCS-ID: $Id: tglbtn.h 67931 2011-06-14 13:00:42Z VZ $ // Copyright: (c) 2000 Johnny C. Norris II // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -15,13 +14,6 @@ #include "wx/bitmap.h" -//----------------------------------------------------------------------------- -// classes -//----------------------------------------------------------------------------- - -class WXDLLIMPEXP_FWD_CORE wxToggleButton; -class WXDLLIMPEXP_FWD_CORE wxToggleBitmapButton; - //----------------------------------------------------------------------------- // wxToggleButton //----------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/include/wx/gtk/toolbar.h b/Externals/wxWidgets3/include/wx/gtk/toolbar.h index ea71a5c91b..d504b6c2e8 100644 --- a/Externals/wxWidgets3/include/wx/gtk/toolbar.h +++ b/Externals/wxWidgets3/include/wx/gtk/toolbar.h @@ -2,7 +2,6 @@ // Name: wx/gtk/toolbar.h // Purpose: GTK toolbar // Author: Robert Roebling -// RCS-ID: $Id: toolbar.h 70854 2012-03-10 00:01:09Z RD $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -73,6 +72,9 @@ public: // -------------------------- protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_DEFAULT; } + virtual wxSize DoGetBestSize() const; virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; diff --git a/Externals/wxWidgets3/include/wx/gtk/tooltip.h b/Externals/wxWidgets3/include/wx/gtk/tooltip.h index e82880d638..25c682b428 100644 --- a/Externals/wxWidgets3/include/wx/gtk/tooltip.h +++ b/Externals/wxWidgets3/include/wx/gtk/tooltip.h @@ -2,7 +2,6 @@ // Name: wx/gtk/tooltip.h // Purpose: wxToolTip class // Author: Robert Roebling -// Id: $Id: tooltip.h 67298 2011-03-23 17:36:10Z PC $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/gtk/toplevel.h b/Externals/wxWidgets3/include/wx/gtk/toplevel.h index c17f62ed77..9f9374b06b 100644 --- a/Externals/wxWidgets3/include/wx/gtk/toplevel.h +++ b/Externals/wxWidgets3/include/wx/gtk/toplevel.h @@ -2,7 +2,6 @@ // Name: wx/gtk/toplevel.h // Purpose: // Author: Robert Roebling -// Id: $Id: toplevel.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) 1998 Robert Roebling, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -95,6 +94,8 @@ public: virtual void GTKHandleRealized(); + void GTKConfigureEvent(int x, int y); + // do *not* call this to iconize the frame, this is a private function! void SetIconizeState(bool iconic); @@ -109,7 +110,11 @@ public: m_gdkDecor; // size of WM decorations - wxSize m_decorSize; + struct DecorSize + { + int left, right, top, bottom; + }; + DecorSize m_decorSize; // private gtk_timeout_add result for mimicing wxUSER_ATTENTION_INFO and // wxUSER_ATTENTION_ERROR difference, -2 for no hint, -1 for ERROR hint, rest for GtkTimeout handle. @@ -120,7 +125,7 @@ public: // return the size of the window without WM decorations void GTKDoGetSize(int *width, int *height) const; - void GTKUpdateDecorSize(const wxSize& decorSize); + void GTKUpdateDecorSize(const DecorSize& decorSize); protected: // give hints to the Window Manager for how the size @@ -128,9 +133,6 @@ protected: virtual void DoSetSizeHints( int minW, int minH, int maxW, int maxH, int incW, int incH); - // common part of all ctors - void Init(); - // move the window to the specified location and resize it virtual void DoMoveWindow(int x, int y, int width, int height); @@ -148,7 +150,11 @@ protected: bool m_deferShow; private: - wxSize& GetCachedDecorSize(); + void Init(); + DecorSize& GetCachedDecorSize(); + + // size hint increments + int m_incWidth, m_incHeight; // is the frame currently iconized? bool m_isIconized; diff --git a/Externals/wxWidgets3/include/wx/gtk/webview_webkit.h b/Externals/wxWidgets3/include/wx/gtk/webview_webkit.h index cfb7e08aaa..e1a01bf811 100644 --- a/Externals/wxWidgets3/include/wx/gtk/webview_webkit.h +++ b/Externals/wxWidgets3/include/wx/gtk/webview_webkit.h @@ -2,7 +2,6 @@ // Name: include/gtk/wx/webview.h // Purpose: GTK webkit backend for web view component // Author: Robert Roebling, Marianne Gagnon -// Id: $Id: webview_webkit.h 70768 2012-03-01 16:44:31Z PC $ // Copyright: (c) 2010 Marianne Gagnon, 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -10,7 +9,7 @@ #ifndef _WX_GTK_WEBKITCTRL_H_ #define _WX_GTK_WEBKITCTRL_H_ -#include "wx/setup.h" +#include "wx/defs.h" #if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) @@ -26,7 +25,7 @@ typedef struct _WebKitWebView WebKitWebView; class WXDLLIMPEXP_WEBVIEW wxWebViewWebKit : public wxWebView { public: - wxWebViewWebKit() { Init(); } + wxWebViewWebKit(); wxWebViewWebKit(wxWindow *parent, wxWindowID id = wxID_ANY, @@ -35,8 +34,6 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxWebViewNameStr) { - Init(); - Create(parent, id, url, pos, size, style, name); } @@ -47,6 +44,8 @@ public: const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxWebViewNameStr); + virtual ~wxWebViewWebKit(); + virtual bool Enable( bool enable = true ); // implementation @@ -59,10 +58,11 @@ public: virtual void LoadURL(const wxString& url); virtual void GoBack(); virtual void GoForward(); - virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT); + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); virtual bool CanGoBack() const; virtual bool CanGoForward() const; virtual void ClearHistory(); + virtual void EnableContextMenu(bool enable = true); virtual void EnableHistory(bool enable = true); virtual wxVector > GetBackwardHistory(); virtual wxVector > GetForwardHistory(); @@ -71,9 +71,6 @@ public: virtual wxString GetCurrentTitle() const; virtual wxString GetPageSource() const; virtual wxString GetPageText() const; - //We do not want to hide the other overloads - using wxWebView::SetPage; - virtual void SetPage(const wxString& html, const wxString& baseUrl); virtual void Print(); virtual bool IsBusy() const; @@ -97,6 +94,9 @@ public: virtual void Undo(); virtual void Redo(); + //Find function + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT); + //Editing functions virtual void SetEditable(bool enable = true); virtual bool IsEditable() const; @@ -110,11 +110,13 @@ public: virtual void ClearSelection(); virtual void RunScript(const wxString& javascript); - + //Virtual Filesystem Support virtual void RegisterHandler(wxSharedPtr handler); virtual wxVector > GetHandlers() { return m_handlerList; } + virtual void* GetNativeBackend() const { return m_web_view; } + /** TODO: check if this can be made private * The native control has a getter to check for busy state, but except in * very recent versions of webkit this getter doesn't say everything we need @@ -128,8 +130,12 @@ public: //We use this flag to stop recursion when we load a page from the navigation //callback, mainly when loading a VFS page bool m_guard; + //This flag is use to indicate when a navigation event is the result of a + //create-web-view signal and so we need to send a new window event + bool m_creating; protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; @@ -140,6 +146,9 @@ private: void SetWebkitZoom(float level); float GetWebkitZoom() const; + //Find helper function + void FindClear(); + // focus event handler: calls GTKUpdateBitmap() void GTKOnFocus(wxFocusEvent& event); @@ -148,9 +157,30 @@ private: wxVector > m_handlerList; + //variables used for Find() + int m_findFlags; + wxString m_findText; + int m_findPosition; + int m_findCount; + wxDECLARE_DYNAMIC_CLASS(wxWebViewWebKit); }; +class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryWebKit : public wxWebViewFactory +{ +public: + virtual wxWebView* Create() { return new wxWebViewWebKit; } + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { return new wxWebViewWebKit(parent, id, url, pos, size, style, name); } +}; + + #endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && defined(__WXGTK__) #endif diff --git a/Externals/wxWidgets3/include/wx/gtk/webviewhistoryitem_webkit.h b/Externals/wxWidgets3/include/wx/gtk/webviewhistoryitem_webkit.h index cbadf4ef5f..a798efdda6 100644 --- a/Externals/wxWidgets3/include/wx/gtk/webviewhistoryitem_webkit.h +++ b/Externals/wxWidgets3/include/wx/gtk/webviewhistoryitem_webkit.h @@ -2,7 +2,6 @@ // Name: include/wx/gtk/webviewhistoryitem.h // Purpose: wxWebViewHistoryItem header for GTK // Author: Steven Lamerton -// Id: $Id: webviewhistoryitem_webkit.h 69770 2011-11-17 01:23:03Z RD $ // Copyright: (c) 2011 Steven Lamerton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,7 +16,7 @@ class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem { public: - wxWebViewHistoryItem(const wxString& url, const wxString& title) : + wxWebViewHistoryItem(const wxString& url, const wxString& title) : m_url(url), m_title(title) {} wxString GetUrl() { return m_url; } wxString GetTitle() { return m_title; } diff --git a/Externals/wxWidgets3/include/wx/gtk/window.h b/Externals/wxWidgets3/include/wx/gtk/window.h index 7238d6149b..6c36ce99c1 100644 --- a/Externals/wxWidgets3/include/wx/gtk/window.h +++ b/Externals/wxWidgets3/include/wx/gtk/window.h @@ -2,7 +2,6 @@ // Name: wx/gtk/window.h // Purpose: // Author: Robert Roebling -// Id: $Id: window.h 70569 2012-02-11 16:26:52Z VZ $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,9 +11,16 @@ #include "wx/dynarray.h" -// helper structure that holds class that holds GtkIMContext object and -// some additional data needed for key events processing -struct wxGtkIMData; +#ifdef __WXGTK3__ + typedef struct _cairo cairo_t; + typedef struct _GtkStyleProvider GtkStyleProvider; + #define WXUNUSED_IN_GTK3(x) +#else + #define WXUNUSED_IN_GTK3(x) x +#endif + +typedef struct _GdkEventKey GdkEventKey; +typedef struct _GtkIMContext GtkIMContext; WX_DEFINE_EXPORTED_ARRAY_PTR(GdkWindow *, wxArrayGdkWindows); @@ -52,8 +58,6 @@ public: // implement base class (pure) virtual methods // ------------------------------------------- - virtual bool Destroy(); - virtual void Raise(); virtual void Lower(); @@ -140,12 +144,13 @@ public: // Internal addition of child windows void DoAddChild(wxWindowGTK *child); - // This methods sends wxPaintEvents to the window. It reads the - // update region, breaks it up into rects and sends an event - // for each rect. It is also responsible for background erase - // events and NC paint events. It is called from "draw" and - // "expose" handlers as well as from ::Update() - void GtkSendPaintEvents(); + // This method sends wxPaintEvents to the window. + // It is also responsible for background erase events. +#ifdef __WXGTK3__ + void GTKSendPaintEvents(cairo_t* cr); +#else + void GTKSendPaintEvents(const GdkRegion* region); +#endif // The methods below are required because many native widgets // are composed of several subwidgets and setting a style for @@ -177,11 +182,6 @@ public: static wxLayoutDirection GTKGetLayout(GtkWidget *widget); static void GTKSetLayout(GtkWidget *widget, wxLayoutDirection dir); - // return true if this window must have a non-NULL parent, false if it can - // be created without parent (normally only top level windows but in wxGTK - // there is also the exception of wxMenuBar) - virtual bool GTKNeedsParent() const { return !IsTopLevel(); } - // This is called when capture is taken from the window. It will // fire off capture lost events. void GTKReleaseMouseAndNotify(); @@ -196,6 +196,7 @@ public: // Called when m_widget becomes realized. Derived classes must call the // base class method if they override it. virtual void GTKHandleRealized(); + void GTKHandleUnrealize(); protected: // for controls composed of multiple GTK widgets, return true to eliminate @@ -247,7 +248,11 @@ public: // position and size of the window int m_x, m_y; int m_width, m_height; - int m_oldClientWidth,m_oldClientHeight; + int m_clientWidth, m_clientHeight; + // Whether the client size variables above are known to be correct + // (because they have been validated by a size-allocate) and should + // be used to report client size + bool m_useCachedClientSize; // see the docs in src/gtk/window.cpp GtkWidget *m_widget; // mostly the widget seen by the rest of GTK @@ -265,7 +270,39 @@ public: void GTKDisableFocusOutEvent(); void GTKEnableFocusOutEvent(); - wxGtkIMData *m_imData; + + // Input method support + + // The IM context used for generic, i.e. non-native, windows. + // + // It might be a good idea to avoid allocating it unless key events from + // this window are really needed but currently we do it unconditionally. + // + // For native widgets (i.e. those for which IsOfStandardClass() returns + // true) it is NULL. + GtkIMContext* m_imContext; + + // Pointer to the event being currently processed by the IME or NULL if not + // inside key handling. + GdkEventKey* m_imKeyEvent; + + // This method generalizes gtk_im_context_filter_keypress(): for the + // generic windows it does just that but it's overridden by the classes + // wrapping native widgets that use IM themselves and so provide specific + // methods for accessing it such gtk_entry_im_context_filter_keypress(). + virtual int GTKIMFilterKeypress(GdkEventKey* event) const; + + // This method must be called from the derived classes "insert-text" signal + // handlers to check if the text is not being inserted by the IM and, if + // this is the case, generate appropriate wxEVT_CHAR events for it. + // + // Returns true if we did generate and process events corresponding to this + // text or false if we didn't handle it. + bool GTKOnInsertText(const char* text); + + // This is just a helper of GTKOnInsertText() which is also used by GTK+ + // "commit" signal handler. + bool GTKDoInsertTextFromIM(const char* text); // indices for the arrays below @@ -300,14 +337,11 @@ public: // extra (wxGTK-specific) flags bool m_noExpose:1; // wxGLCanvas has its own redrawing bool m_nativeSizeEvent:1; // wxGLCanvas sends wxSizeEvent upon "alloc_size" - bool m_hasVMT:1; // set after PostCreation() is called bool m_isScrolling:1; // dragging scrollbar thumb? bool m_clipPaintRegion:1; // true after ScrollWindow() wxRegion m_nativeUpdateRegion; // not transformed for RTL bool m_dirtyTabOrder:1; // tab order changed, GTK focus // chain needs update - bool m_needsStyleChange:1; // May not be able to change - // background style until OnIdle bool m_mouseButtonDown:1; bool m_showOnIdle:1; // postpone showing the window until idle @@ -344,13 +378,19 @@ protected: void GTKFreezeWidget(GtkWidget *w); void GTKThawWidget(GtkWidget *w); + void GTKDisconnect(void* instance); #if wxUSE_TOOLTIPS virtual void DoSetToolTip( wxToolTip *tip ); #endif // wxUSE_TOOLTIPS - // common part of all ctors (not virtual because called from ctor) - void Init(); + // Create a GtkScrolledWindow containing the given widget (usually + // m_wxwindow but not necessarily) and assigns it to m_widget. Also shows + // the widget passed to it. + // + // Can be only called if we have either wxHSCROLL or wxVSCROLL in our + // style. + void GTKCreateScrolledWindowWith(GtkWidget* view); virtual void DoMoveInTabOrder(wxWindow *win, WindowOrder move); virtual bool DoNavigateIn(int flags); @@ -359,20 +399,21 @@ protected: // Copies m_children tab order to GTK focus chain: void RealizeTabOrder(); +#ifndef __WXGTK3__ // Called by ApplyWidgetStyle (which is called by SetFont() and // SetXXXColour etc to apply style changed to native widgets) to create - // modified GTK style with non-standard attributes. If forceStyle=true, - // creates empty GtkRcStyle if there are no modifications, otherwise - // returns NULL in such case. - GtkRcStyle *GTKCreateWidgetStyle(bool forceStyle = false); + // modified GTK style with non-standard attributes. + GtkRcStyle* GTKCreateWidgetStyle(); +#endif - // Overridden in many GTK widgets who have to handle subwidgets - virtual void GTKApplyWidgetStyle(bool forceStyle = false); + void GTKApplyWidgetStyle(bool forceStyle = false); // helper function to ease native widgets wrapping, called by // ApplyWidgetStyle -- override this, not ApplyWidgetStyle virtual void DoApplyWidgetStyle(GtkRcStyle *style); + void GTKApplyStyle(GtkWidget* widget, GtkRcStyle* style); + // sets the border of a given GtkScrolledWindow from a wx style static void GTKScrolledWindowSetBorder(GtkWidget* w, int style); @@ -382,14 +423,16 @@ protected: // just as it does. unsigned long GTKConnectWidget(const char *signal, wxGTKCallback callback); - // Return true from here if PostCreation() should connect to size_request - // signal: this is done by default but doesn't work for some native - // controls which override this function to return false - virtual bool GTKShouldConnectSizeRequest() const { return !IsTopLevel(); } - void ConstrainSize(); private: + void Init(); + + // return true if this window must have a non-NULL parent, false if it can + // be created without parent (normally only top level windows but in wxGTK + // there is also the exception of wxMenuBar) + virtual bool GTKNeedsParent() const { return !IsTopLevel(); } + enum ScrollUnit { ScrollUnit_Line, ScrollUnit_Page, ScrollUnit_Max }; // common part of ScrollLines() and ScrollPages() and could be used, in the @@ -400,6 +443,19 @@ private: bool DoScrollByUnits(ScrollDir dir, ScrollUnit unit, int units); virtual void AddChildGTK(wxWindowGTK* child); +#ifdef __WXGTK3__ + // paint context is stashed here so wxPaintDC can use it + cairo_t* m_paintContext; + // style provider for "background-image" + GtkStyleProvider* m_styleProvider; + +public: + cairo_t* GTKPaintContext() const + { + return m_paintContext; + } +#endif + DECLARE_DYNAMIC_CLASS(wxWindowGTK) wxDECLARE_NO_COPY_CLASS(wxWindowGTK); }; diff --git a/Externals/wxWidgets3/include/wx/hash.h b/Externals/wxWidgets3/include/wx/hash.h index c30644fcfb..452040ba31 100644 --- a/Externals/wxWidgets3/include/wx/hash.h +++ b/Externals/wxWidgets3/include/wx/hash.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: VZ at 25.02.00: type safe hashes with WX_DECLARE_HASH() // Created: 01/02/97 -// RCS-ID: $Id: hash.h 67343 2011-03-30 14:16:04Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/hashmap.h b/Externals/wxWidgets3/include/wx/hashmap.h index f7288a6df0..ed26c35418 100644 --- a/Externals/wxWidgets3/include/wx/hashmap.h +++ b/Externals/wxWidgets3/include/wx/hashmap.h @@ -4,7 +4,6 @@ // Author: Mattia Barbon // Modified by: // Created: 29/01/2002 -// RCS-ID: $Id: hashmap.h 69568 2011-10-27 22:26:10Z VZ $ // Copyright: (c) Mattia Barbon // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -467,7 +466,7 @@ inline bool never_grow( size_t, size_t ) { return false; } inline bool never_shrink( size_t, size_t ) { return false; } inline bool grow_lf70( size_t buckets, size_t items ) { - return float(items)/float(buckets) >= 0.85; + return float(items)/float(buckets) >= 0.85f; } #endif // various hash map implementations @@ -483,8 +482,9 @@ inline bool grow_lf70( size_t buckets, size_t items ) #ifndef wxNEEDS_WX_HASH_MAP // integer types -class WXDLLIMPEXP_BASE wxIntegerHash +struct WXDLLIMPEXP_BASE wxIntegerHash { +private: WX_HASH_MAP_NAMESPACE::hash longHash; WX_HASH_MAP_NAMESPACE::hash ulongHash; WX_HASH_MAP_NAMESPACE::hash intHash; @@ -527,9 +527,8 @@ public: #else // wxNEEDS_WX_HASH_MAP // integer types -class WXDLLIMPEXP_BASE wxIntegerHash +struct WXDLLIMPEXP_BASE wxIntegerHash { -public: wxIntegerHash() { } unsigned long operator()( long x ) const { return (unsigned long)x; } unsigned long operator()( unsigned long x ) const { return x; } @@ -547,9 +546,8 @@ public: #endif // !wxNEEDS_WX_HASH_MAP/wxNEEDS_WX_HASH_MAP -class WXDLLIMPEXP_BASE wxIntegerEqual +struct WXDLLIMPEXP_BASE wxIntegerEqual { -public: wxIntegerEqual() { } bool operator()( long a, long b ) const { return a == b; } bool operator()( unsigned long a, unsigned long b ) const { return a == b; } @@ -566,9 +564,8 @@ public: }; // pointers -class WXDLLIMPEXP_BASE wxPointerHash +struct WXDLLIMPEXP_BASE wxPointerHash { -public: wxPointerHash() { } #ifdef wxNEEDS_WX_HASH_MAP @@ -580,9 +577,8 @@ public: wxPointerHash& operator=(const wxPointerHash&) { return *this; } }; -class WXDLLIMPEXP_BASE wxPointerEqual +struct WXDLLIMPEXP_BASE wxPointerEqual { -public: wxPointerEqual() { } bool operator()( const void* a, const void* b ) const { return a == b; } @@ -590,9 +586,8 @@ public: }; // wxString, char*, wchar_t* -class WXDLLIMPEXP_BASE wxStringHash +struct WXDLLIMPEXP_BASE wxStringHash { -public: wxStringHash() {} unsigned long operator()( const wxString& x ) const { return stringHash( x.wx_str() ); } @@ -616,9 +611,8 @@ public: wxStringHash& operator=(const wxStringHash&) { return *this; } }; -class WXDLLIMPEXP_BASE wxStringEqual +struct WXDLLIMPEXP_BASE wxStringEqual { -public: wxStringEqual() {} bool operator()( const wxString& a, const wxString& b ) const { return a == b; } @@ -689,8 +683,7 @@ public: \ /* count() == 0 | 1 */ \ size_type count( const const_key_type& key ) \ { \ - /* explicit cast needed to suppress CodeWarrior warnings */ \ - return (size_type)(GetNode( key ) ? 1 : 0); \ + return GetNode( key ) ? 1u : 0u; \ } \ } diff --git a/Externals/wxWidgets3/include/wx/hashset.h b/Externals/wxWidgets3/include/wx/hashset.h index e5f4d10eca..8cd1becf9b 100644 --- a/Externals/wxWidgets3/include/wx/hashset.h +++ b/Externals/wxWidgets3/include/wx/hashset.h @@ -4,7 +4,6 @@ // Author: Mattia Barbon // Modified by: // Created: 11/08/2003 -// RCS-ID: $Id: hashset.h 69568 2011-10-27 22:26:10Z VZ $ // Copyright: (c) Mattia Barbon // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -46,7 +45,7 @@ // we need to define the class declared by _WX_DECLARE_HASH_SET as a class and // not a typedef to allow forward declaring it -#define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, PTROP, CLASSNAME, CLASSEXP ) \ +#define _WX_DECLARE_HASH_SET_IMPL( KEY_T, HASH_T, KEY_EQ_T, PTROP, CLASSNAME, CLASSEXP ) \ CLASSEXP CLASSNAME \ : public WX_HASH_SET_BASE_TEMPLATE< KEY_T, HASH_T, KEY_EQ_T > \ { \ @@ -69,6 +68,31 @@ public: \ {} \ } +// In some standard library implementations (in particular, the libstdc++ that +// ships with g++ 4.7), std::unordered_set inherits privately from its hasher +// and comparator template arguments for purposes of empty base optimization. +// As a result, in the declaration of a class deriving from std::unordered_set +// the names of the hasher and comparator classes are interpreted as naming +// the base class which is inaccessible. +// The workaround is to prefix the class names with 'struct'; however, don't +// do this on MSVC because it causes a warning there if the class was +// declared as a 'class' rather than a 'struct' (and MSVC's std::unordered_set +// implementation does not suffer from the access problem). +#ifdef _MSC_VER +#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) STRUCTNAME +#else +#define WX_MAYBE_PREFIX_WITH_STRUCT(STRUCTNAME) struct STRUCTNAME +#endif + +#define _WX_DECLARE_HASH_SET( KEY_T, HASH_T, KEY_EQ_T, PTROP, CLASSNAME, CLASSEXP ) \ + _WX_DECLARE_HASH_SET_IMPL( \ + KEY_T, \ + WX_MAYBE_PREFIX_WITH_STRUCT(HASH_T), \ + WX_MAYBE_PREFIX_WITH_STRUCT(KEY_EQ_T), \ + PTROP, \ + CLASSNAME, \ + CLASSEXP) + #else // no appropriate STL class, use our own implementation // this is a complex way of defining an easily inlineable identity function... diff --git a/Externals/wxWidgets3/include/wx/headercol.h b/Externals/wxWidgets3/include/wx/headercol.h index 34231fe83e..1002c0f562 100644 --- a/Externals/wxWidgets3/include/wx/headercol.h +++ b/Externals/wxWidgets3/include/wx/headercol.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxHeaderColumn class // Author: Vadim Zeitlin // Created: 2008-12-02 -// RCS-ID: $Id: headercol.h 69174 2011-09-21 15:07:46Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/headerctrl.h b/Externals/wxWidgets3/include/wx/headerctrl.h index 5477ea568d..78d7117b9f 100644 --- a/Externals/wxWidgets3/include/wx/headerctrl.h +++ b/Externals/wxWidgets3/include/wx/headerctrl.h @@ -3,7 +3,6 @@ // Purpose: wxHeaderCtrlBase class: interface of wxHeaderCtrl // Author: Vadim Zeitlin // Created: 2008-12-01 -// RCS-ID: $Id: headerctrl.h 70338 2012-01-14 16:51:57Z VS $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -210,6 +209,10 @@ protected: // indices after the number of columns changed void DoResizeColumnIndices(wxArrayInt& colIndices, unsigned int count); +protected: + // this window doesn't look nice with the border so don't use it by default + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + private: // methods implementing our public API and defined in platform-specific // implementations @@ -222,8 +225,6 @@ private: virtual void DoSetColumnsOrder(const wxArrayInt& order) = 0; virtual wxArrayInt DoGetColumnsOrder() const = 0; - // this window doesn't look nice with the border so don't use it by default - virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } // event handlers void OnSeparatorDClick(wxHeaderCtrlEvent& event); @@ -352,7 +353,10 @@ private: void Init(); // bring the column count in sync with the number of columns we store - void UpdateColumnCount() { SetColumnCount(m_cols.size()); } + void UpdateColumnCount() + { + SetColumnCount(static_cast(m_cols.size())); + } // all our current columns @@ -418,24 +422,24 @@ private: }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_CLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_RIGHT_CLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_MIDDLE_CLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_CLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_RIGHT_CLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_MIDDLE_CLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_DCLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_RIGHT_DCLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_MIDDLE_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_RIGHT_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_MIDDLE_DCLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_SEPARATOR_DCLICK, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_BEGIN_RESIZE, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_RESIZING, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_END_RESIZE, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_BEGIN_RESIZE, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_RESIZING, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_END_RESIZE, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_BEGIN_REORDER, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_END_REORDER, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_BEGIN_REORDER, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_END_REORDER, wxHeaderCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED, wxHeaderCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_HEADER_DRAGGING_CANCELLED, wxHeaderCtrlEvent ); typedef void (wxEvtHandler::*wxHeaderCtrlEventFunction)(wxHeaderCtrlEvent&); @@ -443,7 +447,7 @@ typedef void (wxEvtHandler::*wxHeaderCtrlEventFunction)(wxHeaderCtrlEvent&); wxEVENT_HANDLER_CAST(wxHeaderCtrlEventFunction, func) #define wx__DECLARE_HEADER_EVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_HEADER_ ## evt, id, wxHeaderCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_HEADER_ ## evt, id, wxHeaderCtrlEventHandler(fn)) #define EVT_HEADER_CLICK(id, fn) wx__DECLARE_HEADER_EVT(CLICK, id, fn) #define EVT_HEADER_RIGHT_CLICK(id, fn) wx__DECLARE_HEADER_EVT(RIGHT_CLICK, id, fn) @@ -464,6 +468,21 @@ typedef void (wxEvtHandler::*wxHeaderCtrlEventFunction)(wxHeaderCtrlEvent&); #define EVT_HEADER_DRAGGING_CANCELLED(id, fn) wx__DECLARE_HEADER_EVT(DRAGGING_CANCELLED, id, fn) +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_HEADER_CLICK wxEVT_HEADER_CLICK +#define wxEVT_COMMAND_HEADER_RIGHT_CLICK wxEVT_HEADER_RIGHT_CLICK +#define wxEVT_COMMAND_HEADER_MIDDLE_CLICK wxEVT_HEADER_MIDDLE_CLICK +#define wxEVT_COMMAND_HEADER_DCLICK wxEVT_HEADER_DCLICK +#define wxEVT_COMMAND_HEADER_RIGHT_DCLICK wxEVT_HEADER_RIGHT_DCLICK +#define wxEVT_COMMAND_HEADER_MIDDLE_DCLICK wxEVT_HEADER_MIDDLE_DCLICK +#define wxEVT_COMMAND_HEADER_SEPARATOR_DCLICK wxEVT_HEADER_SEPARATOR_DCLICK +#define wxEVT_COMMAND_HEADER_BEGIN_RESIZE wxEVT_HEADER_BEGIN_RESIZE +#define wxEVT_COMMAND_HEADER_RESIZING wxEVT_HEADER_RESIZING +#define wxEVT_COMMAND_HEADER_END_RESIZE wxEVT_HEADER_END_RESIZE +#define wxEVT_COMMAND_HEADER_BEGIN_REORDER wxEVT_HEADER_BEGIN_REORDER +#define wxEVT_COMMAND_HEADER_END_REORDER wxEVT_HEADER_END_REORDER +#define wxEVT_COMMAND_HEADER_DRAGGING_CANCELLED wxEVT_HEADER_DRAGGING_CANCELLED + #endif // wxUSE_HEADERCTRL #endif // _WX_HEADERCTRL_H_ diff --git a/Externals/wxWidgets3/include/wx/help.h b/Externals/wxWidgets3/include/wx/help.h index e76d713189..17539c1b32 100644 --- a/Externals/wxWidgets3/include/wx/help.h +++ b/Externals/wxWidgets3/include/wx/help.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: help.h 70345 2012-01-15 01:05:28Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/helpbase.h b/Externals/wxWidgets3/include/wx/helpbase.h index e133370528..9a924fd38e 100644 --- a/Externals/wxWidgets3/include/wx/helpbase.h +++ b/Externals/wxWidgets3/include/wx/helpbase.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: helpbase.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/helphtml.h b/Externals/wxWidgets3/include/wx/helphtml.h index 15d9bfe19b..87bc81dfbd 100644 --- a/Externals/wxWidgets3/include/wx/helphtml.h +++ b/Externals/wxWidgets3/include/wx/helphtml.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 2003-05-24 -// RCS-ID: $Id: helphtml.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/helpwin.h b/Externals/wxWidgets3/include/wx/helpwin.h index f519067623..b73a62ebaf 100644 --- a/Externals/wxWidgets3/include/wx/helpwin.h +++ b/Externals/wxWidgets3/include/wx/helpwin.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: helpwin.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/htmllbox.h b/Externals/wxWidgets3/include/wx/htmllbox.h index 8e051b371f..27c3a36c30 100644 --- a/Externals/wxWidgets3/include/wx/htmllbox.h +++ b/Externals/wxWidgets3/include/wx/htmllbox.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 31.05.03 -// RCS-ID: $Id: htmllbox.h 68460 2011-07-30 11:30:08Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/hyperlink.h b/Externals/wxWidgets3/include/wx/hyperlink.h index 5d0decb63a..db183d5a2e 100644 --- a/Externals/wxWidgets3/include/wx/hyperlink.h +++ b/Externals/wxWidgets3/include/wx/hyperlink.h @@ -4,7 +4,6 @@ // Author: David Norris , Otto Wyss // Modified by: Ryan Norton, Francesco Montorsi // Created: 04/02/2005 -// RCS-ID: $Id: hyperlink.h 66696 2011-01-16 23:24:21Z VZ $ // Copyright: (c) 2005 David Norris // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -88,7 +87,7 @@ public: class WXDLLIMPEXP_FWD_ADV wxHyperlinkEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_COMMAND_HYPERLINK, wxHyperlinkEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, wxEVT_HYPERLINK, wxHyperlinkEvent ); // // An event fired when the user clicks on the label in a hyperlink control. @@ -99,7 +98,7 @@ class WXDLLIMPEXP_ADV wxHyperlinkEvent : public wxCommandEvent public: wxHyperlinkEvent() {} wxHyperlinkEvent(wxObject *generator, wxWindowID id, const wxString& url) - : wxCommandEvent(wxEVT_COMMAND_HYPERLINK, id), + : wxCommandEvent(wxEVT_HYPERLINK, id), m_url(url) { SetEventObject(generator); @@ -132,7 +131,7 @@ typedef void (wxEvtHandler::*wxHyperlinkEventFunction)(wxHyperlinkEvent&); wxEVENT_HANDLER_CAST(wxHyperlinkEventFunction, func) #define EVT_HYPERLINK(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_HYPERLINK, id, wxHyperlinkEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_HYPERLINK, id, wxHyperlinkEventHandler(fn)) #if defined(__WXGTK210__) && !defined(__WXUNIVERSAL__) @@ -166,6 +165,8 @@ typedef void (wxEvtHandler::*wxHyperlinkEventFunction)(wxHyperlinkEvent&); }; #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_HYPERLINK wxEVT_HYPERLINK #endif // wxUSE_HYPERLINKCTRL diff --git a/Externals/wxWidgets3/include/wx/icon.h b/Externals/wxWidgets3/include/wx/icon.h index 421f7c5ba6..27bb3e6921 100644 --- a/Externals/wxWidgets3/include/wx/icon.h +++ b/Externals/wxWidgets3/include/wx/icon.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: icon.h 70353 2012-01-15 14:46:41Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -30,7 +29,11 @@ #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM #include "wx/motif/icon.h" #elif defined(__WXGTK20__) - #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #ifdef __WINDOWS__ + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_ICO_RESOURCE + #else + #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM + #endif #include "wx/generic/icon.h" #elif defined(__WXGTK__) #define wxICON_DEFAULT_TYPE wxBITMAP_TYPE_XPM diff --git a/Externals/wxWidgets3/include/wx/iconbndl.h b/Externals/wxWidgets3/include/wx/iconbndl.h index f0bbb403d9..50ad64261d 100644 --- a/Externals/wxWidgets3/include/wx/iconbndl.h +++ b/Externals/wxWidgets3/include/wx/iconbndl.h @@ -4,7 +4,6 @@ // Author: Mattia barbon // Modified by: // Created: 23.03.02 -// RCS-ID: $Id: iconbndl.h 70455 2012-01-24 22:17:47Z VZ $ // Copyright: (c) Mattia Barbon // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/iconloc.h b/Externals/wxWidgets3/include/wx/iconloc.h index c2c6ef5485..9baaaa5297 100644 --- a/Externals/wxWidgets3/include/wx/iconloc.h +++ b/Externals/wxWidgets3/include/wx/iconloc.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 21.06.2003 -// RCS-ID: $Id: iconloc.h 70808 2012-03-04 20:31:42Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/imagbmp.h b/Externals/wxWidgets3/include/wx/imagbmp.h index 123c2176e3..262373a70e 100644 --- a/Externals/wxWidgets3/include/wx/imagbmp.h +++ b/Externals/wxWidgets3/include/wx/imagbmp.h @@ -2,7 +2,6 @@ // Name: wx/imagbmp.h // Purpose: wxImage BMP, ICO, CUR and ANI handlers // Author: Robert Roebling, Chris Elliott -// RCS-ID: $Id: imagbmp.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) Robert Roebling, Chris Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/image.h b/Externals/wxWidgets3/include/wx/image.h index 70167b104c..3e7f39eb0d 100644 --- a/Externals/wxWidgets3/include/wx/image.h +++ b/Externals/wxWidgets3/include/wx/image.h @@ -2,7 +2,6 @@ // Name: wx/image.h // Purpose: wxImage class // Author: Robert Roebling -// RCS-ID: $Id: image.h 69760 2011-11-14 13:35:52Z VZ $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -71,7 +70,7 @@ enum wxImageResizeQuality wxIMAGE_QUALITY_NORMAL = wxIMAGE_QUALITY_NEAREST, // highest (but best) quality - wxIMAGE_QUALITY_HIGH + wxIMAGE_QUALITY_HIGH = 4 }; // alpha channel values: fully transparent, default threshold separating diff --git a/Externals/wxWidgets3/include/wx/imaggif.h b/Externals/wxWidgets3/include/wx/imaggif.h index 1650e6ead1..1d76a632c8 100644 --- a/Externals/wxWidgets3/include/wx/imaggif.h +++ b/Externals/wxWidgets3/include/wx/imaggif.h @@ -2,7 +2,6 @@ // Name: wx/imaggif.h // Purpose: wxImage GIF handler // Author: Vaclav Slavik, Guillermo Rodriguez Garcia, Gershon Elber, Troels K -// RCS-ID: $Id: imaggif.h 66800 2011-01-28 07:27:34Z DS $ // Copyright: (c) 1999-2011 Vaclav Slavik, Guillermo Rodriguez Garcia, Gershon Elber, Troels K // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/imagiff.h b/Externals/wxWidgets3/include/wx/imagiff.h index 6778722cd6..f7307ba5e1 100644 --- a/Externals/wxWidgets3/include/wx/imagiff.h +++ b/Externals/wxWidgets3/include/wx/imagiff.h @@ -2,7 +2,6 @@ // Name: wx/imagiff.h // Purpose: wxImage handler for Amiga IFF images // Author: Steffen Gutmann -// RCS-ID: $Id: imagiff.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Steffen Gutmann, 2002 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/imagjpeg.h b/Externals/wxWidgets3/include/wx/imagjpeg.h index 0c2161bab3..53f6e06170 100644 --- a/Externals/wxWidgets3/include/wx/imagjpeg.h +++ b/Externals/wxWidgets3/include/wx/imagjpeg.h @@ -2,7 +2,6 @@ // Name: wx/imagjpeg.h // Purpose: wxImage JPEG handler // Author: Vaclav Slavik -// RCS-ID: $Id: imagjpeg.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/imaglist.h b/Externals/wxWidgets3/include/wx/imaglist.h index 9e5719a145..72255ac710 100644 --- a/Externals/wxWidgets3/include/wx/imaglist.h +++ b/Externals/wxWidgets3/include/wx/imaglist.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: imaglist.h 70345 2012-01-15 01:05:28Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/imagpcx.h b/Externals/wxWidgets3/include/wx/imagpcx.h index 2321d4e0b0..cc9d54fa8a 100644 --- a/Externals/wxWidgets3/include/wx/imagpcx.h +++ b/Externals/wxWidgets3/include/wx/imagpcx.h @@ -2,7 +2,6 @@ // Name: wx/imagpcx.h // Purpose: wxImage PCX handler // Author: Guillermo Rodriguez Garcia -// RCS-ID: $Id: imagpcx.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1999 Guillermo Rodriguez Garcia // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/imagpng.h b/Externals/wxWidgets3/include/wx/imagpng.h index ad19bf3e92..55adcd5f97 100644 --- a/Externals/wxWidgets3/include/wx/imagpng.h +++ b/Externals/wxWidgets3/include/wx/imagpng.h @@ -2,7 +2,6 @@ // Name: wx/imagpng.h // Purpose: wxImage PNG handler // Author: Robert Roebling -// RCS-ID: $Id: imagpng.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/imagpnm.h b/Externals/wxWidgets3/include/wx/imagpnm.h index 439cfd30a0..aab7c76faa 100644 --- a/Externals/wxWidgets3/include/wx/imagpnm.h +++ b/Externals/wxWidgets3/include/wx/imagpnm.h @@ -2,7 +2,6 @@ // Name: wx/imagpnm.h // Purpose: wxImage PNM handler // Author: Sylvain Bougnoux -// RCS-ID: $Id: imagpnm.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Sylvain Bougnoux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/imagtga.h b/Externals/wxWidgets3/include/wx/imagtga.h index 54d5ef0e09..d11083785f 100644 --- a/Externals/wxWidgets3/include/wx/imagtga.h +++ b/Externals/wxWidgets3/include/wx/imagtga.h @@ -2,7 +2,6 @@ // Name: wx/imagtga.h // Purpose: wxImage TGA handler // Author: Seth Jackson -// RCS-ID: $Id: imagtga.h 59461 2009-03-09 23:13:34Z VZ $ // Copyright: (c) 2005 Seth Jackson // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/imagtiff.h b/Externals/wxWidgets3/include/wx/imagtiff.h index e9b00aa989..9182e67173 100644 --- a/Externals/wxWidgets3/include/wx/imagtiff.h +++ b/Externals/wxWidgets3/include/wx/imagtiff.h @@ -2,7 +2,6 @@ // Name: wx/imagtiff.h // Purpose: wxImage TIFF handler // Author: Robert Roebling -// RCS-ID: $Id: imagtiff.h 68785 2011-08-19 03:47:40Z DS $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/imagxpm.h b/Externals/wxWidgets3/include/wx/imagxpm.h index a128b7ebac..16477b2d57 100644 --- a/Externals/wxWidgets3/include/wx/imagxpm.h +++ b/Externals/wxWidgets3/include/wx/imagxpm.h @@ -2,7 +2,6 @@ // Name: wx/imagxpm.h // Purpose: wxImage XPM handler // Author: Vaclav Slavik -// RCS-ID: $Id: imagxpm.h 59460 2009-03-09 23:08:36Z VZ $ // Copyright: (c) 2001 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/infobar.h b/Externals/wxWidgets3/include/wx/infobar.h index eca08e3260..be390a856e 100644 --- a/Externals/wxWidgets3/include/wx/infobar.h +++ b/Externals/wxWidgets3/include/wx/infobar.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxInfoBarBase defining common API of wxInfoBar // Author: Vadim Zeitlin // Created: 2009-07-28 -// RCS-ID: $Id: infobar.h 64213 2010-05-05 12:20:08Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/init.h b/Externals/wxWidgets3/include/wx/init.h index 2070d84319..6ce8e82876 100644 --- a/Externals/wxWidgets3/include/wx/init.h +++ b/Externals/wxWidgets3/include/wx/init.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29.06.2003 -// RCS-ID: $Id: init.h 64531 2010-06-09 13:23:13Z FM $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -53,6 +52,12 @@ extern int WXDLLIMPEXP_BASE wxEntry(int& argc, char **argv); #endif// wxUSE_UNICODE +// Under Windows we define additional wxEntry() overloads with signature +// compatible with WinMain() and not the traditional main(). +#if wxUSE_GUI && defined(__WINDOWS__) + #include "wx/msw/init.h" +#endif + // ---------------------------------------------------------------------------- // Using the library without (explicit) application object: you may avoid using // wxDECLARE_APP and wxIMPLEMENT_APP macros and call the functions below instead at diff --git a/Externals/wxWidgets3/include/wx/intl.h b/Externals/wxWidgets3/include/wx/intl.h index a2785fd97f..fea4d2d65b 100644 --- a/Externals/wxWidgets3/include/wx/intl.h +++ b/Externals/wxWidgets3/include/wx/intl.h @@ -5,7 +5,6 @@ // Modified by: Michael N. Filippov // (2003/09/30 - plural forms support) // Created: 29/01/98 -// RCS-ID: $Id: intl.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -308,12 +307,6 @@ public: return wxGetTranslation(origString, origString2, n, domain); } - // this is hack to work around a problem with wxGetTranslation() which - // returns const wxString& and not wxString, so when it returns untranslated - // string, it needs to have a copy of it somewhere - static const wxString& GetUntranslatedString(const wxString& str) - { return wxTranslations::GetUntranslatedString(str); } - // Returns the current short name for the locale const wxString& GetName() const { return m_strShort; } diff --git a/Externals/wxWidgets3/include/wx/iosfwrap.h b/Externals/wxWidgets3/include/wx/iosfwrap.h index 020d45882d..13fb1f7f89 100644 --- a/Externals/wxWidgets3/include/wx/iosfwrap.h +++ b/Externals/wxWidgets3/include/wx/iosfwrap.h @@ -4,7 +4,6 @@ // Author: Jan van Dijk // Modified by: // Created: 18.12.2002 -// RCS-ID: $Id: iosfwrap.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/ioswrap.h b/Externals/wxWidgets3/include/wx/ioswrap.h index 50ba04a1dc..5805588ead 100644 --- a/Externals/wxWidgets3/include/wx/ioswrap.h +++ b/Externals/wxWidgets3/include/wx/ioswrap.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 03.02.99 -// RCS-ID: $Id: ioswrap.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/ipc.h b/Externals/wxWidgets3/include/wx/ipc.h index 14650aea1d..36542e5f09 100644 --- a/Externals/wxWidgets3/include/wx/ipc.h +++ b/Externals/wxWidgets3/include/wx/ipc.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 15.04.02 -// RCS-ID: $Id: ipc.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2002 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/ipcbase.h b/Externals/wxWidgets3/include/wx/ipcbase.h index 87d7bcdca3..4d69958e4c 100644 --- a/Externals/wxWidgets3/include/wx/ipcbase.h +++ b/Externals/wxWidgets3/include/wx/ipcbase.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 4/1/98 -// RCS-ID: $Id: ipcbase.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/itemid.h b/Externals/wxWidgets3/include/wx/itemid.h index ff867ef3ec..99897e9c17 100644 --- a/Externals/wxWidgets3/include/wx/itemid.h +++ b/Externals/wxWidgets3/include/wx/itemid.h @@ -3,7 +3,6 @@ // Purpose: wxItemId class declaration. // Author: Vadim Zeitlin // Created: 2011-08-17 -// RCS-ID: $Id: itemid.h 68916 2011-08-27 14:11:03Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/joystick.h b/Externals/wxWidgets3/include/wx/joystick.h index ba36f5e956..733ad7de8a 100644 --- a/Externals/wxWidgets3/include/wx/joystick.h +++ b/Externals/wxWidgets3/include/wx/joystick.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) wxWidgets Team -// RCS-ID: $Id: joystick.h 70808 2012-03-04 20:31:42Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/kbdstate.h b/Externals/wxWidgets3/include/wx/kbdstate.h index d3f927f77a..ab0df32d1c 100644 --- a/Externals/wxWidgets3/include/wx/kbdstate.h +++ b/Externals/wxWidgets3/include/wx/kbdstate.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxKeyboardState class // Author: Vadim Zeitlin // Created: 2008-09-19 -// RCS-ID: $Id: kbdstate.h 70579 2012-02-13 15:23:33Z SC $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -55,7 +54,14 @@ public: } // returns true if any modifiers at all are pressed - bool HasModifiers() const { return GetModifiers() != wxMOD_NONE; } + bool HasAnyModifiers() const { return GetModifiers() != wxMOD_NONE; } + + // returns true if any modifiers changing the usual key interpretation are + // pressed, notably excluding Shift + bool HasModifiers() const + { + return ControlDown() || RawControlDown() || AltDown(); + } // accessors for individual modifier keys bool ControlDown() const { return m_controlDown; } diff --git a/Externals/wxWidgets3/include/wx/language.h b/Externals/wxWidgets3/include/wx/language.h index d37f1da48c..2d196b6639 100644 --- a/Externals/wxWidgets3/include/wx/language.h +++ b/Externals/wxWidgets3/include/wx/language.h @@ -3,7 +3,6 @@ // Purpose: wxLanguage enum // Author: Vadim Zeitlin // Created: 2010-04-23 -// RCS-ID: $Id: language.h 64225 2010-05-06 12:40:11Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/layout.h b/Externals/wxWidgets3/include/wx/layout.h index a94ed4f759..30d46c2490 100644 --- a/Externals/wxWidgets3/include/wx/layout.h +++ b/Externals/wxWidgets3/include/wx/layout.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: layout.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 1998 Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/laywin.h b/Externals/wxWidgets3/include/wx/laywin.h index c27d1e7dbe..e3f6b6eeea 100644 --- a/Externals/wxWidgets3/include/wx/laywin.h +++ b/Externals/wxWidgets3/include/wx/laywin.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: laywin.h 33948 2005-05-04 18:57:50Z JS $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/link.h b/Externals/wxWidgets3/include/wx/link.h index 394f2422ea..c422fc17af 100644 --- a/Externals/wxWidgets3/include/wx/link.h +++ b/Externals/wxWidgets3/include/wx/link.h @@ -3,7 +3,6 @@ // Purpose: macros to force linking modules which might otherwise be // discarded by the linker // Author: Vaclav Slavik -// RCS-ID: $Id: link.h 35722 2005-09-26 12:29:25Z VZ $ // Copyright: (c) Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/list.h b/Externals/wxWidgets3/include/wx/list.h index a74a8fc7b8..160b3b8ba4 100644 --- a/Externals/wxWidgets3/include/wx/list.h +++ b/Externals/wxWidgets3/include/wx/list.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: VZ at 16/11/98: WX_DECLARE_LIST() and typesafe lists added // Created: 29/01/98 -// RCS-ID: $Id: list.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) 1998 Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -32,6 +31,7 @@ #include "wx/defs.h" #include "wx/object.h" #include "wx/string.h" +#include "wx/vector.h" #if wxUSE_STD_CONTAINERS #include "wx/beforestd.h" @@ -148,21 +148,22 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str) decl _WX_LIST_HELPER_##liT \ { \ typedef elT _WX_LIST_ITEM_TYPE_##liT; \ + typedef std::list BaseListType; \ public: \ + static BaseListType EmptyList; \ static void DeleteFunction( _WX_LIST_ITEM_TYPE_##liT X ); \ }; \ \ WX_LIST_VC6_WORKAROUND(elT, liT, decl) \ - decl liT : public std::list \ + class liT : public std::list \ { \ private: \ typedef std::list BaseListType; \ - static BaseListType EmptyList; \ \ bool m_destroy; \ \ public: \ - decl compatibility_iterator \ + class compatibility_iterator \ { \ private: \ /* Workaround for broken VC6 nested class name resolution */ \ @@ -174,7 +175,7 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str) \ public: \ compatibility_iterator() \ - : m_iter(EmptyList.end()), m_list( NULL ) {} \ + : m_iter(_WX_LIST_HELPER_##liT::EmptyList.end()), m_list( NULL ) {} \ compatibility_iterator( liT* li, iterator i ) \ : m_iter( i ), m_list( li ) {} \ compatibility_iterator( const liT* li, iterator i ) \ @@ -216,7 +217,7 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str) } \ int IndexOf() const \ { \ - return *this ? std::distance( m_list->begin(), m_iter ) \ + return *this ? (int)std::distance( m_list->begin(), m_iter ) \ : wxNOT_FOUND; \ } \ }; \ @@ -1214,6 +1215,23 @@ public: // compatibility methods void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); } #endif // !wxUSE_STD_CONTAINERS + +#ifndef __VISUALC6__ + template + wxVector AsVector() const + { + wxVector vector(size()); + size_t i = 0; + + for ( const_iterator it = begin(); it != end(); ++it ) + { + vector[i++] = static_cast(*it); + } + + return vector; + } +#endif // !__VISUALC6__ + }; #if !wxUSE_STD_CONTAINERS diff --git a/Externals/wxWidgets3/include/wx/listbase.h b/Externals/wxWidgets3/include/wx/listbase.h index b28b9f64a3..80f65f2a33 100644 --- a/Externals/wxWidgets3/include/wx/listbase.h +++ b/Externals/wxWidgets3/include/wx/listbase.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 04.12.99 -// RCS-ID: $Id: listbase.h 70286 2012-01-07 16:11:10Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -415,7 +414,7 @@ public: // // Returns the index of the newly inserted column or -1 on error. long AppendColumn(const wxString& heading, - int format = wxLIST_FORMAT_LEFT, + wxListColumnFormat format = wxLIST_FORMAT_LEFT, int width = -1); // Add a new column to the control at the position "col". @@ -446,6 +445,8 @@ public: virtual int GetColumnWidth(int col) const = 0; virtual bool SetColumnWidth(int col, int width) = 0; + // return the attribute for the item (may return NULL if none) + virtual wxListItemAttr *OnGetItemAttr(long item) const; // Other miscellaneous accessors. // ------------------------------ @@ -454,12 +455,23 @@ public: bool InReportView() const { return HasFlag(wxLC_REPORT); } bool IsVirtual() const { return HasFlag(wxLC_VIRTUAL); } + // Enable or disable beep when incremental match doesn't find any item. + // Only implemented in the generic version currently. + virtual void EnableBellOnNoMatch(bool WXUNUSED(on) = true) { } + + void EnableAlternateRowColours(bool enable = true); + void SetAlternateRowColour(const wxColour& colour); + protected: // Real implementations methods to which our public forwards. virtual long DoInsertColumn(long col, const wxListItem& info) = 0; // Overridden methods of the base class. virtual wxSize DoGetBestClientSize() const; + +private: + // user defined color to draw row lines, may be invalid + wxListItemAttr m_alternateRowColour; }; // ---------------------------------------------------------------------------- @@ -502,11 +514,11 @@ public: long GetMask() const { return m_item.m_mask; } const wxListItem& GetItem() const { return m_item; } - // for wxEVT_COMMAND_LIST_CACHE_HINT only + // for wxEVT_LIST_CACHE_HINT only long GetCacheFrom() const { return m_oldItemIndex; } long GetCacheTo() const { return m_itemIndex; } - // was label editing canceled? (for wxEVT_COMMAND_LIST_END_LABEL_EDIT only) + // was label editing canceled? (for wxEVT_LIST_END_LABEL_EDIT only) bool IsEditCancelled() const { return m_editCancelled; } void SetEditCanceled(bool editCancelled) { m_editCancelled = editCancelled; } @@ -514,7 +526,7 @@ public: //protected: -- not for backwards compatibility int m_code; - long m_oldItemIndex; // only for wxEVT_COMMAND_LIST_CACHE_HINT + long m_oldItemIndex; // only for wxEVT_LIST_CACHE_HINT long m_itemIndex; int m_col; wxPoint m_pointDrag; @@ -532,27 +544,27 @@ private: // wxListCtrl event macros // ---------------------------------------------------------------------------- -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_BEGIN_DRAG, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_BEGIN_RDRAG, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_END_LABEL_EDIT, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_DELETE_ITEM, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_BEGIN_DRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_BEGIN_RDRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_BEGIN_LABEL_EDIT, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_END_LABEL_EDIT, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_DELETE_ITEM, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_DELETE_ALL_ITEMS, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_KEY_DOWN, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_INSERT_ITEM, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_COL_CLICK, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_CACHE_HINT, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_COL_RIGHT_CLICK, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_COL_BEGIN_DRAG, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_COL_DRAGGING, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_COL_END_DRAG, wxListEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LIST_ITEM_FOCUSED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_SELECTED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_DESELECTED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_KEY_DOWN, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_INSERT_ITEM, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_RIGHT_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_MIDDLE_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_ACTIVATED, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_CACHE_HINT, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_RIGHT_CLICK, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_BEGIN_DRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_DRAGGING, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_COL_END_DRAG, wxListEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LIST_ITEM_FOCUSED, wxListEvent ); typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); @@ -560,7 +572,7 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); wxEVENT_HANDLER_CAST(wxListEventFunction, func) #define wx__DECLARE_LISTEVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_LIST_ ## evt, id, wxListEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_LIST_ ## evt, id, wxListEventHandler(fn)) #define EVT_LIST_BEGIN_DRAG(id, fn) wx__DECLARE_LISTEVT(BEGIN_DRAG, id, fn) #define EVT_LIST_BEGIN_RDRAG(id, fn) wx__DECLARE_LISTEVT(BEGIN_RDRAG, id, fn) @@ -586,6 +598,28 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&); #define EVT_LIST_CACHE_HINT(id, fn) wx__DECLARE_LISTEVT(CACHE_HINT, id, fn) +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_LIST_BEGIN_DRAG wxEVT_LIST_BEGIN_DRAG +#define wxEVT_COMMAND_LIST_BEGIN_RDRAG wxEVT_LIST_BEGIN_RDRAG +#define wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT wxEVT_LIST_BEGIN_LABEL_EDIT +#define wxEVT_COMMAND_LIST_END_LABEL_EDIT wxEVT_LIST_END_LABEL_EDIT +#define wxEVT_COMMAND_LIST_DELETE_ITEM wxEVT_LIST_DELETE_ITEM +#define wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS wxEVT_LIST_DELETE_ALL_ITEMS +#define wxEVT_COMMAND_LIST_ITEM_SELECTED wxEVT_LIST_ITEM_SELECTED +#define wxEVT_COMMAND_LIST_ITEM_DESELECTED wxEVT_LIST_ITEM_DESELECTED +#define wxEVT_COMMAND_LIST_KEY_DOWN wxEVT_LIST_KEY_DOWN +#define wxEVT_COMMAND_LIST_INSERT_ITEM wxEVT_LIST_INSERT_ITEM +#define wxEVT_COMMAND_LIST_COL_CLICK wxEVT_LIST_COL_CLICK +#define wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK wxEVT_LIST_ITEM_RIGHT_CLICK +#define wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK wxEVT_LIST_ITEM_MIDDLE_CLICK +#define wxEVT_COMMAND_LIST_ITEM_ACTIVATED wxEVT_LIST_ITEM_ACTIVATED +#define wxEVT_COMMAND_LIST_CACHE_HINT wxEVT_LIST_CACHE_HINT +#define wxEVT_COMMAND_LIST_COL_RIGHT_CLICK wxEVT_LIST_COL_RIGHT_CLICK +#define wxEVT_COMMAND_LIST_COL_BEGIN_DRAG wxEVT_LIST_COL_BEGIN_DRAG +#define wxEVT_COMMAND_LIST_COL_DRAGGING wxEVT_LIST_COL_DRAGGING +#define wxEVT_COMMAND_LIST_COL_END_DRAG wxEVT_LIST_COL_END_DRAG +#define wxEVT_COMMAND_LIST_ITEM_FOCUSED wxEVT_LIST_ITEM_FOCUSED + #endif // _WX_LISTCTRL_H_BASE_ diff --git a/Externals/wxWidgets3/include/wx/listbook.h b/Externals/wxWidgets3/include/wx/listbook.h index f7e4bfc389..1c7cdbd923 100644 --- a/Externals/wxWidgets3/include/wx/listbook.h +++ b/Externals/wxWidgets3/include/wx/listbook.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.08.03 -// RCS-ID: $Id: listbook.h 68810 2011-08-21 14:08:49Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -17,12 +16,13 @@ #if wxUSE_LISTBOOK #include "wx/bookctrl.h" +#include "wx/containr.h" class WXDLLIMPEXP_FWD_CORE wxListView; class WXDLLIMPEXP_FWD_CORE wxListEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LISTBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_LISTBOOK_PAGE_CHANGING, wxBookCtrlEvent ); // wxListbook flags #define wxLB_DEFAULT wxBK_DEFAULT @@ -36,7 +36,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING // wxListbook // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxListbook : public wxBookCtrlBase +class WXDLLIMPEXP_CORE wxListbook : public wxNavigationEnabled { public: wxListbook() { } @@ -87,9 +87,8 @@ protected: wxBookCtrlEvent* CreatePageChangingEvent() const; void MakeChangedEvent(wxBookCtrlEvent &event); - // get flags for different list control modes - long GetListCtrlIconViewFlags() const; - long GetListCtrlReportViewFlags() const; + // Get the correct wxListCtrl flags to use depending on our own flags. + long GetListCtrlFlags() const; // event handlers void OnListSelected(wxListEvent& event); @@ -116,10 +115,14 @@ typedef wxBookCtrlEventFunction wxListbookEventFunction; #define wxListbookEventHandler(func) wxBookCtrlEventHandler(func) #define EVT_LISTBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_LISTBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) #define EVT_LISTBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_LISTBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_LISTBOOK_PAGE_CHANGED wxEVT_LISTBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_LISTBOOK_PAGE_CHANGING wxEVT_LISTBOOK_PAGE_CHANGING #endif // wxUSE_LISTBOOK diff --git a/Externals/wxWidgets3/include/wx/listbox.h b/Externals/wxWidgets3/include/wx/listbox.h index ee900dce9d..afb0220036 100644 --- a/Externals/wxWidgets3/include/wx/listbox.h +++ b/Externals/wxWidgets3/include/wx/listbox.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 22.10.99 -// RCS-ID: $Id: listbox.h 65935 2010-10-27 23:21:55Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/listctrl.h b/Externals/wxWidgets3/include/wx/listctrl.h index 5f17cfde7d..51aca4a1b1 100644 --- a/Externals/wxWidgets3/include/wx/listctrl.h +++ b/Externals/wxWidgets3/include/wx/listctrl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 04.12.99 -// RCS-ID: $Id: listctrl.h 70808 2012-03-04 20:31:42Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/listimpl.cpp b/Externals/wxWidgets3/include/wx/listimpl.cpp index 771b41dcc2..f3a4a1bdfe 100644 --- a/Externals/wxWidgets3/include/wx/listimpl.cpp +++ b/Externals/wxWidgets3/include/wx/listimpl.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 16/11/98 -// RCS-ID: $Id: listimpl.cpp 67343 2011-03-30 14:16:04Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,7 +16,7 @@ { \ delete X; \ } \ - name::BaseListType name::EmptyList; + _WX_LIST_HELPER_##name::BaseListType _WX_LIST_HELPER_##name::EmptyList; #else // !wxUSE_STD_CONTAINERS #undef WX_DEFINE_LIST_2 diff --git a/Externals/wxWidgets3/include/wx/log.h b/Externals/wxWidgets3/include/wx/log.h index 8f0679b243..be0a245a49 100644 --- a/Externals/wxWidgets3/include/wx/log.h +++ b/Externals/wxWidgets3/include/wx/log.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: log.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -13,6 +12,7 @@ #define _WX_LOG_H_ #include "wx/defs.h" +#include "wx/cpp.h" // ---------------------------------------------------------------------------- // types @@ -1330,28 +1330,42 @@ WXDLLIMPEXP_BASE const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0); // following arguments are not even evaluated which is good as it avoids // unnecessary overhead) // -// Note: the strange if/else construct is needed to make the following code +// Note: the strange (because executing at most once) for() loop because we +// must arrange for wxDO_LOG() to be at the end of the macro and using a +// more natural "if (IsLevelEnabled()) wxDO_LOG()" would result in wrong +// behaviour for the following code ("else" would bind to the wrong "if"): // // if ( cond ) // wxLogError("!!!"); // else // ... // -// work as expected, without it the second "else" would match the "if" -// inside wxLogError(). Unfortunately code like +// See also #11829 for the problems with other simpler approaches, +// notably the need for two macros due to buggy __LINE__ in MSVC. // -// if ( cond ) -// wxLogError("!!!"); -// -// now provokes "suggest explicit braces to avoid ambiguous 'else'" -// warnings from g++ 4.3 and later with -Wparentheses on but they can be -// easily fixed by adding curly braces around wxLogError() and at least -// the code still does do the right thing. +// Note 2: Unfortunately we can't use the same solution for all compilers +// because the loop-based one results in problems with MSVC6 due to its +// wrong (pre-C++98) rules for the scope of the variables declared +// inside the loop, as this prevents us from using wxLogXXX() in switch +// statement clauses ("initialization of loopvar skipped by case"). So +// for now, i.e. while we still support VC6, use the previous solution +// for it (FIXME-VC6). +#ifdef __VISUALC6__ #define wxDO_LOG_IF_ENABLED(level) \ if ( !wxLog::IsLevelEnabled(wxLOG_##level, wxLOG_COMPONENT) ) \ {} \ else \ wxDO_LOG(level) +#else +#define wxDO_LOG_IF_ENABLED_HELPER(level, loopvar) \ + for ( bool loopvar = false; \ + !loopvar && wxLog::IsLevelEnabled(wxLOG_##level, wxLOG_COMPONENT); \ + loopvar = true ) \ + wxDO_LOG(level) + +#define wxDO_LOG_IF_ENABLED(level) \ + wxDO_LOG_IF_ENABLED_HELPER(level, wxMAKE_UNIQUE_NAME(wxlogcheck)) +#endif // wxLogFatalError() is special as it can't be disabled #define wxLogFatalError wxDO_LOG(FatalError) @@ -1437,7 +1451,7 @@ WXDLLIMPEXP_BASE const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0); else \ wxMAKE_LOGGER(Status).MaybeStore(wxLOG_KEY_FRAME).Log - #define wxVLogStatus(format, argptr) \ + #define wxVLogStatus \ wxMAKE_LOGGER(Status).MaybeStore(wxLOG_KEY_FRAME).LogV #endif // wxUSE_GUI diff --git a/Externals/wxWidgets3/include/wx/longlong.h b/Externals/wxWidgets3/include/wx/longlong.h index e190ec804b..8a2848c54a 100644 --- a/Externals/wxWidgets3/include/wx/longlong.h +++ b/Externals/wxWidgets3/include/wx/longlong.h @@ -5,7 +5,6 @@ // Author: Jeffrey C. Ollie , Vadim Zeitlin // Modified by: // Created: 10.02.99 -// RCS-ID: $Id: longlong.h 68472 2011-07-31 13:25:33Z VS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -1067,7 +1066,7 @@ inline wxULongLong operator+(unsigned long l, const wxULongLong& ull) { return u inline wxLongLong operator-(unsigned long l, const wxULongLong& ull) { wxULongLong ret = wxULongLong(l) - ull; - return wxLongLong((long)ret.GetHi(),ret.GetLo()); + return wxLongLong((wxInt32)ret.GetHi(),ret.GetLo()); } #if wxUSE_LONGLONG_NATIVE && wxUSE_STREAMS diff --git a/Externals/wxWidgets3/include/wx/math.h b/Externals/wxWidgets3/include/wx/math.h index 0978a84dcc..2787163f78 100644 --- a/Externals/wxWidgets3/include/wx/math.h +++ b/Externals/wxWidgets3/include/wx/math.h @@ -4,7 +4,6 @@ * Author: John Labenski and others * Modified by: * Created: 02/02/03 -* RCS-ID: $Id: math.h 70796 2012-03-04 00:29:31Z VZ $ * Copyright: (c) John Labenski * Licence: wxWindows licence */ @@ -52,20 +51,29 @@ #endif -/* unknown __VISAGECC__, __SYMANTECCC__ */ +#ifdef __cplusplus -#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__) +/* Any C++11 compiler should provide isfinite() */ +#if __cplusplus >= 201103 + #include + #define wxFinite(x) std::isfinite(x) +#elif defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__) #include #define wxFinite(x) _finite(x) -#elif defined(__MINGW64__) +#elif defined(__MINGW64__) || defined(__clang__) /* add more compilers with C99 support here: using C99 isfinite() is preferable to using BSD-ish finite() */ - #define wxFinite(x) isfinite(x) + #if defined(_GLIBCXX_CMATH) || defined(_LIBCPP_CMATH) + // these headers #undef isfinite + #define wxFinite(x) std::isfinite(x) + #else + #define wxFinite(x) isfinite(x) + #endif #elif ( defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \ defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \ - defined(__HPUX__)||defined(__MWERKS__) ) && ( !defined(wxOSX_USE_IPHONE) || wxOSX_USE_IPHONE == 0 ) + defined(__HPUX__) ) && ( !defined(wxOSX_USE_IPHONE) || wxOSX_USE_IPHONE == 0 ) #ifdef __SOLARIS__ #include #endif @@ -79,52 +87,52 @@ #define wxIsNaN(x) _isnan(x) #elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \ defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \ - defined(__HPUX__)||defined(__MWERKS__) + defined(__HPUX__) #define wxIsNaN(x) isnan(x) #else #define wxIsNaN(x) ((x) != (x)) #endif -#ifdef __cplusplus +#ifdef __INTELC__ - #ifdef __INTELC__ - - inline bool wxIsSameDouble(double x, double y) - { - // VZ: this warning, given for operators==() and !=() is not wrong, as == - // shouldn't be used with doubles, but we get too many of them and - // removing these operators is probably not a good idea - // - // Maybe we should always compare doubles up to some "epsilon" precision - #pragma warning(push) - - // floating-point equality and inequality comparisons are unreliable - #pragma warning(disable: 1572) - - return x == y; - - #pragma warning(pop) - } - - #else /* !__INTELC__ */ - - inline bool wxIsSameDouble(double x, double y) { return x == y; } - - #endif /* __INTELC__/!__INTELC__ */ - - inline bool wxIsNullDouble(double x) { return wxIsSameDouble(x, 0.); } - - inline int wxRound(double x) + inline bool wxIsSameDouble(double x, double y) { - wxASSERT_MSG( x > INT_MIN - 0.5 && x < INT_MAX + 0.5, - wxT("argument out of supported range") ); + // VZ: this warning, given for operators==() and !=() is not wrong, as == + // shouldn't be used with doubles, but we get too many of them and + // removing these operators is probably not a good idea + // + // Maybe we should always compare doubles up to some "epsilon" precision + #pragma warning(push) - #if defined(HAVE_ROUND) - return int(round(x)); - #else - return (int)(x < 0 ? x - 0.5 : x + 0.5); - #endif + // floating-point equality and inequality comparisons are unreliable + #pragma warning(disable: 1572) + + return x == y; + + #pragma warning(pop) } + +#else /* !__INTELC__ */ + wxGCC_WARNING_SUPPRESS(float-equal) + inline bool wxIsSameDouble(double x, double y) { return x == y; } + wxGCC_WARNING_RESTORE(float-equal) + +#endif /* __INTELC__/!__INTELC__ */ + +inline bool wxIsNullDouble(double x) { return wxIsSameDouble(x, 0.); } + +inline int wxRound(double x) +{ + wxASSERT_MSG( x > INT_MIN - 0.5 && x < INT_MAX + 0.5, + wxT("argument out of supported range") ); + + #if defined(HAVE_ROUND) + return int(round(x)); + #else + return (int)(x < 0 ? x - 0.5 : x + 0.5); + #endif +} + #endif /* __cplusplus */ diff --git a/Externals/wxWidgets3/include/wx/matrix.h b/Externals/wxWidgets3/include/wx/matrix.h index b23ff530fc..859c2a28d1 100644 --- a/Externals/wxWidgets3/include/wx/matrix.h +++ b/Externals/wxWidgets3/include/wx/matrix.h @@ -4,7 +4,6 @@ // Author: Chris Breeze, Julian Smart // Modified by: Klaas Holwerda // Created: 01/02/97 -// RCS-ID: $Id: matrix.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart, Chris Breeze // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/mdi.h b/Externals/wxWidgets3/include/wx/mdi.h index df6283eb2a..837c132822 100644 --- a/Externals/wxWidgets3/include/wx/mdi.h +++ b/Externals/wxWidgets3/include/wx/mdi.h @@ -5,7 +5,6 @@ // Vadim Zeitlin (base MDI classes refactoring) // Copyright: (c) 1998 Julian Smart // (c) 2008 Vadim Zeitlin -// RCS-ID: $Id: mdi.h 70790 2012-03-04 00:29:03Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -123,6 +122,10 @@ public: virtual wxMDIClientWindow *OnCreateClient(); protected: + // Override to pass menu/toolbar events to the active child first. + virtual bool TryBefore(wxEvent& event); + + // This is wxMDIClientWindow for all the native implementations but not for // the generic MDI version which has its own wxGenericMDIClientWindow and // so we store it as just a base class pointer because we don't need its @@ -369,6 +372,31 @@ inline wxMDIClientWindow *wxMDIParentFrameBase::OnCreateClient() return new wxMDIClientWindow; } +inline bool wxMDIParentFrameBase::TryBefore(wxEvent& event) +{ + // Menu (and toolbar) events should be sent to the active child frame + // first, if any. + if ( event.GetEventType() == wxEVT_MENU || + event.GetEventType() == wxEVT_UPDATE_UI ) + { + wxMDIChildFrame * const child = GetActiveChild(); + if ( child ) + { + // However avoid sending the event back to the child if it's + // currently being propagated to us from it. + wxWindow* const + from = static_cast(event.GetPropagatedFrom()); + if ( !from || !from->IsDescendant(child) ) + { + if ( child->ProcessWindowEventLocally(event) ) + return true; + } + } + } + + return wxFrame::TryBefore(event); +} + #endif // wxUSE_MDI #endif // _WX_MDI_H_BASE_ diff --git a/Externals/wxWidgets3/include/wx/mediactrl.h b/Externals/wxWidgets3/include/wx/mediactrl.h index 2757cf7641..4d0fd7b0f1 100644 --- a/Externals/wxWidgets3/include/wx/mediactrl.h +++ b/Externals/wxWidgets3/include/wx/mediactrl.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 11/07/04 -// RCS-ID: $Id: mediactrl.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -242,7 +241,7 @@ protected: // for wxMediaCtrl. Backends are searched alphabetically - // the one with the earliest letter is tried first. // -// Note that this is currently not API or ABI compatable - +// Note that this is currently not API or ABI compatible - // so statically link or make the client compile on-site. // // ---------------------------------------------------------------------------- @@ -392,7 +391,7 @@ protected: }; // ---------------------------------------------------------------------------- -// End compilation gaurd +// End compilation guard // ---------------------------------------------------------------------------- #endif // wxUSE_MEDIACTRL diff --git a/Externals/wxWidgets3/include/wx/memconf.h b/Externals/wxWidgets3/include/wx/memconf.h index 392abba040..3dbec634e1 100644 --- a/Externals/wxWidgets3/include/wx/memconf.h +++ b/Externals/wxWidgets3/include/wx/memconf.h @@ -6,7 +6,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 22.01.00 -// RCS-ID: $Id: memconf.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2000 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/memory.h b/Externals/wxWidgets3/include/wx/memory.h index 17f1149b7b..834ae4efd6 100644 --- a/Externals/wxWidgets3/include/wx/memory.h +++ b/Externals/wxWidgets3/include/wx/memory.h @@ -4,7 +4,6 @@ // Author: Arthur Seaton, Julian Smart // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: memory.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1998 Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -43,14 +42,14 @@ WXDLLIMPEXP_BASE void wxDebugFree(void * buf, bool isVect = false); #if defined(__SUNCC__) #define wxUSE_ARRAY_MEMORY_OPERATORS 0 -#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) || defined( __MWERKS__) +#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) #define wxUSE_ARRAY_MEMORY_OPERATORS 1 #elif defined (__SGI_CC_) // only supported by -n32 compilers #ifndef __EDG_ABI_COMPATIBILITY_VERSION #define wxUSE_ARRAY_MEMORY_OPERATORS 0 #endif -#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) || defined( __MWERKS__) +#elif !( defined (__VISUALC__) && (__VISUALC__ <= 1020) ) #define wxUSE_ARRAY_MEMORY_OPERATORS 1 #else // ::operator new[] is a recent C++ feature, so assume it's not supported @@ -110,8 +109,8 @@ void operator delete[] (void * buf); #endif // wxUSE_ARRAY_MEMORY_OPERATORS #endif // defined(__WINDOWS__) && (defined(WXUSINGDLL) || defined(WXMAKINGDLL_BASE)) -// VC++ 6.0 and MWERKS -#if ( defined(__VISUALC__) && (__VISUALC__ >= 1200) ) || defined(__MWERKS__) +// VC++ 6.0 +#if ( defined(__VISUALC__) && (__VISUALC__ >= 1200) ) inline void operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */) { wxDebugFree(pData, false); diff --git a/Externals/wxWidgets3/include/wx/menu.h b/Externals/wxWidgets3/include/wx/menu.h index 552ca8b286..e4dedcf2dd 100644 --- a/Externals/wxWidgets3/include/wx/menu.h +++ b/Externals/wxWidgets3/include/wx/menu.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 26.10.99 -// RCS-ID: $Id: menu.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/menuitem.h b/Externals/wxWidgets3/include/wx/menuitem.h index 3c0fdfc41b..4eb80b7b5b 100644 --- a/Externals/wxWidgets3/include/wx/menuitem.h +++ b/Externals/wxWidgets3/include/wx/menuitem.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 25.10.99 -// RCS-ID: $Id: menuitem.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -82,7 +81,13 @@ public: void SetKind(wxItemKind kind) { m_kind = kind; } bool IsSeparator() const { return m_kind == wxITEM_SEPARATOR; } - virtual void SetCheckable(bool checkable) { m_kind = checkable ? wxITEM_CHECK : wxITEM_NORMAL; } + bool IsCheck() const { return m_kind == wxITEM_CHECK; } + bool IsRadio() const { return m_kind == wxITEM_RADIO; } + + virtual void SetCheckable(bool checkable) + { m_kind = checkable ? wxITEM_CHECK : wxITEM_NORMAL; } + + // Notice that this doesn't quite match SetCheckable(). bool IsCheckable() const { return m_kind == wxITEM_CHECK || m_kind == wxITEM_RADIO; } diff --git a/Externals/wxWidgets3/include/wx/meta/convertible.h b/Externals/wxWidgets3/include/wx/meta/convertible.h index 84dba133c5..4599937821 100644 --- a/Externals/wxWidgets3/include/wx/meta/convertible.h +++ b/Externals/wxWidgets3/include/wx/meta/convertible.h @@ -3,7 +3,6 @@ // Purpose: Test if types are convertible // Author: Arne Steinarson // Created: 2008-01-10 -// RCS-ID: $Id: convertible.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 2008 Arne Steinarson // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/meta/if.h b/Externals/wxWidgets3/include/wx/meta/if.h index 02df945708..f6f3672fc7 100644 --- a/Externals/wxWidgets3/include/wx/meta/if.h +++ b/Externals/wxWidgets3/include/wx/meta/if.h @@ -3,7 +3,6 @@ // Purpose: declares wxIf<> metaprogramming construct // Author: Vaclav Slavik // Created: 2008-01-22 -// RCS-ID: $Id: if.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 2008 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/meta/implicitconversion.h b/Externals/wxWidgets3/include/wx/meta/implicitconversion.h index 2057ec89c4..d596a6b248 100644 --- a/Externals/wxWidgets3/include/wx/meta/implicitconversion.h +++ b/Externals/wxWidgets3/include/wx/meta/implicitconversion.h @@ -3,7 +3,6 @@ // Purpose: Determine resulting type from implicit conversion // Author: Vaclav Slavik // Created: 2010-10-22 -// RCS-ID: $Id: implicitconversion.h 66054 2010-11-07 13:16:20Z VZ $ // Copyright: (c) 2010 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/meta/int2type.h b/Externals/wxWidgets3/include/wx/meta/int2type.h index 53a1c4ea0a..7b8d5dc02c 100644 --- a/Externals/wxWidgets3/include/wx/meta/int2type.h +++ b/Externals/wxWidgets3/include/wx/meta/int2type.h @@ -3,7 +3,6 @@ // Purpose: Generate a unique type from a constant integer // Author: Arne Steinarson // Created: 2008-01-10 -// RCS-ID: $Id: int2type.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 2008 Arne Steinarson // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/meta/movable.h b/Externals/wxWidgets3/include/wx/meta/movable.h index 0217a121c7..e3a9f9e96c 100644 --- a/Externals/wxWidgets3/include/wx/meta/movable.h +++ b/Externals/wxWidgets3/include/wx/meta/movable.h @@ -3,7 +3,6 @@ // Purpose: Test if a type is movable using memmove() etc. // Author: Vaclav Slavik // Created: 2008-01-21 -// RCS-ID: $Id: movable.h 67343 2011-03-30 14:16:04Z VZ $ // Copyright: (c) 2008 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/meta/pod.h b/Externals/wxWidgets3/include/wx/meta/pod.h index ad9b42de14..b9dde13d65 100644 --- a/Externals/wxWidgets3/include/wx/meta/pod.h +++ b/Externals/wxWidgets3/include/wx/meta/pod.h @@ -3,7 +3,6 @@ // Purpose: Test if a type is POD // Author: Vaclav Slavik, Jaakko Salli // Created: 2010-06-14 -// RCS-ID: $Id: pod.h 64589 2010-06-14 15:12:37Z JMS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/meta/removeref.h b/Externals/wxWidgets3/include/wx/meta/removeref.h new file mode 100644 index 0000000000..e199d033f7 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/meta/removeref.h @@ -0,0 +1,36 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/meta/removeref.h +// Purpose: Allows to remove a reference from a type. +// Author: Vadim Zeitlin +// Created: 2012-10-21 +// Copyright: (c) 2012 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_META_REMOVEREF_H_ +#define _WX_META_REMOVEREF_H_ + +// wxRemoveRef<> is similar to C++11 std::remove_reference<> but works with all +// compilers (but, to compensate for this, doesn't work with rvalue references). + +// Except that it doesn't work with VC++ 6 as there doesn't seem to be any way +// to partially specialize a template for references with it. +#ifndef __VISUALC6__ + +template +struct wxRemoveRef +{ + typedef T type; +}; + +template +struct wxRemoveRef +{ + typedef T type; +}; + +#define wxHAS_REMOVEREF + +#endif // !__VISUALC6__ + +#endif // _WX_META_REMOVEREF_H_ diff --git a/Externals/wxWidgets3/include/wx/metafile.h b/Externals/wxWidgets3/include/wx/metafile.h index feaac82e7f..c34d8acef3 100644 --- a/Externals/wxWidgets3/include/wx/metafile.h +++ b/Externals/wxWidgets3/include/wx/metafile.h @@ -4,7 +4,6 @@ // Author: wxWidgets team // Modified by: // Created: 13.01.00 -// RCS-ID: $Id: metafile.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/mimetype.h b/Externals/wxWidgets3/include/wx/mimetype.h index a7933cd989..b3ae6b77b0 100644 --- a/Externals/wxWidgets3/include/wx/mimetype.h +++ b/Externals/wxWidgets3/include/wx/mimetype.h @@ -5,7 +5,6 @@ // Modified by: // Chris Elliott (biol75@york.ac.uk) 5 Dec 00: write support for Win32 // Created: 23.09.98 -// RCS-ID: $Id: mimetype.h 67384 2011-04-03 20:31:32Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence (part of wxExtra library) ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/minifram.h b/Externals/wxWidgets3/include/wx/minifram.h index 8907b69ba4..f769c5a691 100644 --- a/Externals/wxWidgets3/include/wx/minifram.h +++ b/Externals/wxWidgets3/include/wx/minifram.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: minifram.h 70345 2012-01-15 01:05:28Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/modalhook.h b/Externals/wxWidgets3/include/wx/modalhook.h new file mode 100644 index 0000000000..55341f9bd9 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/modalhook.h @@ -0,0 +1,104 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/modalhook.h +// Purpose: Allows to hook into showing modal dialogs. +// Author: Vadim Zeitlin +// Created: 2013-05-19 +// Copyright: (c) 2013 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MODALHOOK_H_ +#define _WX_MODALHOOK_H_ + +#include "wx/vector.h" + +class WXDLLIMPEXP_FWD_CORE wxDialog; + +// ---------------------------------------------------------------------------- +// Class allowing to be notified about any modal dialog calls. +// ---------------------------------------------------------------------------- + +// To be notified about entering and exiting modal dialogs and possibly to +// replace them with something else (e.g. just return a predefined value for +// testing), define an object of this class, override its Enter() and +// possibly Exit() methods and call Register() on it. +class WXDLLIMPEXP_CORE wxModalDialogHook +{ +public: + // Default ctor doesn't do anything, call Register() to activate the hook. + wxModalDialogHook() { } + + // Dtor unregisters the hook if it had been registered. + virtual ~wxModalDialogHook() { DoUnregister(); } + + // Register this hook as being active, i.e. its Enter() and Exit() methods + // will be called. + // + // Notice that the order of registration matters: the last hook registered + // is called first, and if its Enter() returns something != wxID_NONE, the + // subsequent hooks are skipped. + void Register(); + + // Unregister this hook. Notice that is done automatically from the dtor. + void Unregister(); + + // Called from wxWidgets code before showing any modal dialogs and calls + // Enter() for every registered hook. + static int CallEnter(wxDialog* dialog); + + // Called from wxWidgets code after dismissing the dialog and calls Exit() + // for every registered hook. + static void CallExit(wxDialog* dialog); + +protected: + // Called by wxWidgets before showing any modal dialogs, override this to + // be notified about this and return anything but wxID_NONE to skip showing + // the modal dialog entirely and just return the specified result. + virtual int Enter(wxDialog* dialog) = 0; + + // Called by wxWidgets after dismissing the modal dialog. Notice that it + // won't be called if Enter() hadn't been. + virtual void Exit(wxDialog* WXUNUSED(dialog)) { } + +private: + // Unregister the given hook, return true if it was done or false if the + // hook wasn't found. + bool DoUnregister(); + + // All the hooks in reverse registration order (i.e. in call order). + typedef wxVector Hooks; + static Hooks ms_hooks; + + wxDECLARE_NO_COPY_CLASS(wxModalDialogHook); +}; + +// Helper object used by WX_MODAL_DIALOG_HOOK below to ensure that CallExit() +// is called on scope exit. +class wxModalDialogHookExitGuard +{ +public: + wxEXPLICIT wxModalDialogHookExitGuard(wxDialog* dialog) + : m_dialog(dialog) + { + } + + ~wxModalDialogHookExitGuard() + { + wxModalDialogHook::CallExit(m_dialog); + } + +private: + wxDialog* const m_dialog; + + wxDECLARE_NO_COPY_CLASS(wxModalDialogHookExitGuard); +}; + +// This macro needs to be used at the top of every implementation of +// ShowModal() in order for wxModalDialogHook to work. +#define WX_HOOK_MODAL_DIALOG() \ + const int modalDialogHookRC = wxModalDialogHook::CallEnter(this); \ + if ( modalDialogHookRC != wxID_NONE ) \ + return modalDialogHookRC; \ + wxModalDialogHookExitGuard modalDialogHookExit(this) + +#endif // _WX_MODALHOOK_H_ diff --git a/Externals/wxWidgets3/include/wx/module.h b/Externals/wxWidgets3/include/wx/module.h index 7076830254..96600b76ca 100644 --- a/Externals/wxWidgets3/include/wx/module.h +++ b/Externals/wxWidgets3/include/wx/module.h @@ -4,7 +4,6 @@ // Author: Wolfram Gloger/adapted by Guilhem Lavaux // Modified by: // Created: 04/11/98 -// RCS-ID: $Id: module.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) Wolfram Gloger and Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/mousemanager.h b/Externals/wxWidgets3/include/wx/mousemanager.h index e9f88713a7..caa2abeaec 100644 --- a/Externals/wxWidgets3/include/wx/mousemanager.h +++ b/Externals/wxWidgets3/include/wx/mousemanager.h @@ -3,7 +3,6 @@ // Purpose: wxMouseEventsManager class declaration // Author: Vadim Zeitlin // Created: 2009-04-20 -// RCS-ID: $Id: mousemanager.h 60839 2009-05-31 14:43:01Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/mousestate.h b/Externals/wxWidgets3/include/wx/mousestate.h index 334b13fb15..2ea1cc5bf1 100644 --- a/Externals/wxWidgets3/include/wx/mousestate.h +++ b/Externals/wxWidgets3/include/wx/mousestate.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxMouseState class // Author: Vadim Zeitlin // Created: 2008-09-19 (extracted from wx/utils.h) -// RCS-ID: $Id: mousestate.h 70098 2011-12-23 05:59:59Z PC $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -100,13 +99,11 @@ public: case wxMOUSE_BTN_NONE: case wxMOUSE_BTN_MAX: - wxFAIL_MSG(wxS("invalid parameter")); - return false; - - default: - wxFAIL_MSG(wxS("unknown parameter")); - return false; + break; } + + wxFAIL_MSG(wxS("invalid parameter")); + return false; } diff --git a/Externals/wxWidgets3/include/wx/msgdlg.h b/Externals/wxWidgets3/include/wx/msgdlg.h index 6da9e0cd7f..8a234ac48f 100644 --- a/Externals/wxWidgets3/include/wx/msgdlg.h +++ b/Externals/wxWidgets3/include/wx/msgdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: msgdlg.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -125,8 +124,12 @@ public: wxASSERT_MSG( !(style & wxYES) || !(style & wxOK), "wxOK and wxYES/wxNO can't be used together" ); - wxASSERT_MSG( (style & wxYES) || (style & wxOK), - "one of wxOK and wxYES/wxNO must be used" ); + // It is common to specify just the icon, without wxOK, in the existing + // code, especially one written by Windows programmers as MB_OK is 0 + // and so they're used to omitting wxOK. Don't complain about it but + // just add wxOK implicitly for compatibility. + if ( !(style & wxYES) && !(style & wxOK) ) + style |= wxOK; wxASSERT_MSG( (style & wxID_OK) != wxID_OK, "wxMessageBox: Did you mean wxOK (and not wxID_OK)?" ); @@ -205,8 +208,9 @@ public: { return m_help.empty() ? GetDefaultHelpLabel() : m_help; } // based on message dialog style, returns exactly one of: wxICON_NONE, - // wxICON_ERROR, wxICON_WARNING, wxICON_QUESTION, wxICON_INFORMATION - long GetEffectiveIcon() const + // wxICON_ERROR, wxICON_WARNING, wxICON_QUESTION, wxICON_INFORMATION, + // wxICON_AUTH_NEEDED + virtual long GetEffectiveIcon() const { if ( m_dialogStyle & wxICON_NONE ) return wxICON_NONE; diff --git a/Externals/wxWidgets3/include/wx/msgout.h b/Externals/wxWidgets3/include/wx/msgout.h index aca920bd0d..63b39b92c2 100644 --- a/Externals/wxWidgets3/include/wx/msgout.h +++ b/Externals/wxWidgets3/include/wx/msgout.h @@ -4,7 +4,6 @@ // Author: Mattia Barbon // Modified by: // Created: 17.07.02 -// RCS-ID: $Id: msgout.h 61459 2009-07-18 23:22:51Z VZ $ // Copyright: (c) Mattia Barbon // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msgqueue.h b/Externals/wxWidgets3/include/wx/msgqueue.h index 479de02b20..8b8da87d18 100644 --- a/Externals/wxWidgets3/include/wx/msgqueue.h +++ b/Externals/wxWidgets3/include/wx/msgqueue.h @@ -3,7 +3,6 @@ // Purpose: Message queues for inter-thread communication // Author: Evgeniy Tarassov // Created: 2007-10-31 -// RCS-ID: $Id: msgqueue.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (C) 2007 TT-Solutions SARL // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/mstream.h b/Externals/wxWidgets3/include/wx/mstream.h index 7755376691..435aebdfb8 100644 --- a/Externals/wxWidgets3/include/wx/mstream.h +++ b/Externals/wxWidgets3/include/wx/mstream.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: // Created: 11/07/98 -// RCS-ID: $Id: mstream.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/accel.h b/Externals/wxWidgets3/include/wx/msw/accel.h index b4dece3ddf..182662c209 100644 --- a/Externals/wxWidgets3/include/wx/msw/accel.h +++ b/Externals/wxWidgets3/include/wx/msw/accel.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 31/7/98 -// RCS-ID: $Id: accel.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/anybutton.h b/Externals/wxWidgets3/include/wx/msw/anybutton.h index cda386e798..e8226d51c3 100644 --- a/Externals/wxWidgets3/include/wx/msw/anybutton.h +++ b/Externals/wxWidgets3/include/wx/msw/anybutton.h @@ -3,7 +3,6 @@ // Purpose: wxAnyButton class // Author: Julian Smart // Created: 1997-02-01 (extracted from button.h) -// RCS-ID: $Id: anybutton.h 67931 2011-06-14 13:00:42Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/app.h b/Externals/wxWidgets3/include/wx/msw/app.h index 9020ffd48c..b1b65da13e 100644 --- a/Externals/wxWidgets3/include/wx/msw/app.h +++ b/Externals/wxWidgets3/include/wx/msw/app.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: app.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -126,81 +125,5 @@ inline int wxApp::GetShell32Version() #endif // __WXWINCE__ -// ---------------------------------------------------------------------------- -// MSW-specific wxEntry() overload and wxIMPLEMENT_WXWIN_MAIN definition -// ---------------------------------------------------------------------------- - -// we need HINSTANCE declaration to define WinMain() -#include "wx/msw/wrapwin.h" - -#ifndef SW_SHOWNORMAL - #define SW_SHOWNORMAL 1 -#endif - -// WinMain() is always ANSI, even in Unicode build, under normal Windows -// but is always Unicode under CE -#ifdef __WXWINCE__ - typedef wchar_t *wxCmdLineArgType; -#else - typedef char *wxCmdLineArgType; -#endif - -// wxMSW-only overloads of wxEntry() and wxEntryStart() which take the -// parameters passed to WinMain() instead of those passed to main() -extern WXDLLIMPEXP_CORE bool - wxEntryStart(HINSTANCE hInstance, - HINSTANCE hPrevInstance = NULL, - wxCmdLineArgType pCmdLine = NULL, - int nCmdShow = SW_SHOWNORMAL); - -extern WXDLLIMPEXP_CORE int - wxEntry(HINSTANCE hInstance, - HINSTANCE hPrevInstance = NULL, - wxCmdLineArgType pCmdLine = NULL, - int nCmdShow = SW_SHOWNORMAL); - -#if defined(__BORLANDC__) && wxUSE_UNICODE - // Borland C++ has the following nonstandard behaviour: when the -WU - // command line flag is used, the linker expects to find wWinMain instead - // of WinMain. This flag causes the compiler to define _UNICODE and - // UNICODE symbols and there's no way to detect its use, so we have to - // define both WinMain and wWinMain so that wxIMPLEMENT_WXWIN_MAIN works - // for both code compiled with and without -WU. - // See http://sourceforge.net/tracker/?func=detail&atid=309863&aid=1935997&group_id=9863 - // for more details. - #define wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD \ - extern "C" int WINAPI wWinMain(HINSTANCE hInstance, \ - HINSTANCE hPrevInstance, \ - wchar_t * WXUNUSED(lpCmdLine), \ - int nCmdShow) \ - { \ - wxDISABLE_DEBUG_SUPPORT(); \ - \ - /* NB: wxEntry expects lpCmdLine argument to be char*, not */ \ - /* wchar_t*, but fortunately it's not used anywhere */ \ - /* and we can simply pass NULL in: */ \ - return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \ - } -#else - #define wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD -#endif // defined(__BORLANDC__) && wxUSE_UNICODE - -#define wxIMPLEMENT_WXWIN_MAIN \ - extern "C" int WINAPI WinMain(HINSTANCE hInstance, \ - HINSTANCE hPrevInstance, \ - wxCmdLineArgType WXUNUSED(lpCmdLine), \ - int nCmdShow) \ - { \ - wxDISABLE_DEBUG_SUPPORT(); \ - \ - /* NB: We pass NULL in place of lpCmdLine to behave the same as */ \ - /* Borland-specific wWinMain() above. If it becomes needed */ \ - /* to pass lpCmdLine to wxEntry() here, you'll have to fix */ \ - /* wWinMain() above too. */ \ - return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \ - } \ - wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD - - #endif // _WX_APP_H_ diff --git a/Externals/wxWidgets3/include/wx/msw/apptbase.h b/Externals/wxWidgets3/include/wx/msw/apptbase.h index 42548e4369..65a1b5bff3 100644 --- a/Externals/wxWidgets3/include/wx/msw/apptbase.h +++ b/Externals/wxWidgets3/include/wx/msw/apptbase.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 22.06.2003 -// RCS-ID: $Id: apptbase.h 67288 2011-03-22 17:15:56Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/apptrait.h b/Externals/wxWidgets3/include/wx/msw/apptrait.h index 2ef84e7cc1..f190da6dab 100644 --- a/Externals/wxWidgets3/include/wx/msw/apptrait.h +++ b/Externals/wxWidgets3/include/wx/msw/apptrait.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 21.06.2003 -// RCS-ID: $Id: apptrait.h 67288 2011-03-22 17:15:56Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -37,6 +36,8 @@ public: #if wxUSE_GUI +#if defined(__WXMSW__) + class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase { public: @@ -58,6 +59,38 @@ public: #endif // !__WXWINCE__ }; +#elif defined(__WXGTK__) + +class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase +{ +public: + virtual wxEventLoopBase *CreateEventLoop(); + virtual void *BeforeChildWaitLoop() { return NULL; } + virtual void AfterChildWaitLoop(void *WXUNUSED(data)) { } +#if wxUSE_TIMER + virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); +#endif + +#if wxUSE_THREADS && defined(__WXGTK20__) + virtual void MutexGuiEnter(); + virtual void MutexGuiLeave(); +#endif + +#if wxUSE_THREADS + virtual bool DoMessageFromThreadWait() { return true; } + virtual WXDWORD WaitForThread(WXHANDLE hThread, int WXUNUSED(flags)) + { return DoSimpleWaitForThread(hThread); } +#endif // wxUSE_THREADS + virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const; + +#ifndef __WXWINCE__ + virtual bool CanUseStderr() { return false; } + virtual bool WriteToStderr(const wxString& WXUNUSED(text)) { return false; } +#endif // !__WXWINCE__ +}; + +#endif + #endif // wxUSE_GUI #endif // _WX_MSW_APPTRAIT_H_ diff --git a/Externals/wxWidgets3/include/wx/msw/bitmap.h b/Externals/wxWidgets3/include/wx/msw/bitmap.h index 37cd4dabdb..ef07317b1d 100644 --- a/Externals/wxWidgets3/include/wx/msw/bitmap.h +++ b/Externals/wxWidgets3/include/wx/msw/bitmap.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: bitmap.h 66086 2010-11-10 13:51:51Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -13,6 +12,7 @@ #define _WX_BITMAP_H_ #include "wx/msw/gdiimage.h" +#include "wx/math.h" #include "wx/palette.h" class WXDLLIMPEXP_FWD_CORE wxBitmap; @@ -43,7 +43,8 @@ enum wxBitmapTransparency // NOTE: for wxMSW we don't use the wxBitmapBase base class declared in bitmap.h! // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxBitmap : public wxGDIImage +class WXDLLIMPEXP_CORE wxBitmap : public wxGDIImage, + public wxBitmapHelpers { public: // default ctor creates an invalid bitmap, you must Create() it later @@ -143,6 +144,9 @@ public: virtual bool Create(int width, int height, const wxDC& dc); virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1); + virtual bool CreateScaled(int w, int h, int d, double logicalScale) + { return Create(wxRound(w*logicalScale), wxRound(h*logicalScale), d); } + virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); virtual bool SaveFile(const wxString& name, wxBitmapType type, const wxPalette *cmap = NULL) const; @@ -159,7 +163,6 @@ public: #endif // wxUSE_PALETTE wxMask *GetMask() const; - wxBitmap GetMaskBitmap() const; void SetMask(wxMask *mask); // these functions are internal and shouldn't be used, they risk to @@ -167,6 +170,13 @@ public: bool HasAlpha() const; void UseAlpha(); + // support for scaled bitmaps + virtual double GetScaleFactor() const { return 1.0; } + virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); } + virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); } + virtual wxSize GetScaledSize() const + { return wxSize(wxRound(GetScaledWidth()), wxRound(GetScaledHeight())); } + // implementation only from now on // ------------------------------- @@ -237,6 +247,8 @@ public: bool Create(const wxBitmap& bitmap, int paletteIndex); bool Create(const wxBitmap& bitmap); + wxBitmap GetBitmap() const; + // Implementation WXHBITMAP GetMaskBitmap() const { return m_maskBitmap; } void SetMaskBitmap(WXHBITMAP bmp) { m_maskBitmap = bmp; } diff --git a/Externals/wxWidgets3/include/wx/msw/bmpbuttn.h b/Externals/wxWidgets3/include/wx/msw/bmpbuttn.h index 894260f4a0..e435673c2b 100644 --- a/Externals/wxWidgets3/include/wx/msw/bmpbuttn.h +++ b/Externals/wxWidgets3/include/wx/msw/bmpbuttn.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: bmpbuttn.h 67931 2011-06-14 13:00:42Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/bmpcbox.h b/Externals/wxWidgets3/include/wx/msw/bmpcbox.h index 33a7eb1bef..0462c46217 100644 --- a/Externals/wxWidgets3/include/wx/msw/bmpcbox.h +++ b/Externals/wxWidgets3/include/wx/msw/bmpcbox.h @@ -3,7 +3,6 @@ // Purpose: wxBitmapComboBox // Author: Jaakko Salli // Created: 2008-04-06 -// RCS-ID: $Id: bmpcbox.h 65091 2010-07-25 07:39:17Z JMS $ // Copyright: (c) 2008 Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/brush.h b/Externals/wxWidgets3/include/wx/msw/brush.h index 21b8ce5fce..9665fd1133 100644 --- a/Externals/wxWidgets3/include/wx/msw/brush.h +++ b/Externals/wxWidgets3/include/wx/msw/brush.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: brush.h 54273 2008-06-17 17:28:26Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/button.h b/Externals/wxWidgets3/include/wx/msw/button.h index ac3545b6eb..26979a8939 100644 --- a/Externals/wxWidgets3/include/wx/msw/button.h +++ b/Externals/wxWidgets3/include/wx/msw/button.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: button.h 69984 2011-12-11 17:03:56Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/calctrl.h b/Externals/wxWidgets3/include/wx/msw/calctrl.h index e4a4932659..c5c51d9fde 100644 --- a/Externals/wxWidgets3/include/wx/msw/calctrl.h +++ b/Externals/wxWidgets3/include/wx/msw/calctrl.h @@ -2,7 +2,6 @@ // Name: wx/msw/calctrl.h // Purpose: wxCalendarCtrl control implementation for MSW // Author: Vadim Zeitlin -// RCS-ID: $Id: calctrl.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (C) 2008 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/caret.h b/Externals/wxWidgets3/include/wx/msw/caret.h index ed0e6cacaa..c179032d08 100644 --- a/Externals/wxWidgets3/include/wx/msw/caret.h +++ b/Externals/wxWidgets3/include/wx/msw/caret.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 23.05.99 -// RCS-ID: $Id: caret.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/checkbox.h b/Externals/wxWidgets3/include/wx/msw/checkbox.h index 9eebea0ae5..c1f0eff868 100644 --- a/Externals/wxWidgets3/include/wx/msw/checkbox.h +++ b/Externals/wxWidgets3/include/wx/msw/checkbox.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: checkbox.h 54008 2008-06-07 01:54:44Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -52,15 +51,18 @@ public: // returns true if the platform should explicitly apply a theme border virtual bool CanApplyThemeBorder() const { return false; } + // make the checkbox owner drawn or reset it to normal style + void MSWMakeOwnerDrawn(bool ownerDrawn); + + // implementation only from now on + virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const; + protected: - virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetBestClientSize() const; virtual void DoSet3StateValue(wxCheckBoxState value); virtual wxCheckBoxState DoGet3StateValue() const; - // make the checkbox owner drawn or reset it to normal style - void MakeOwnerDrawn(bool ownerDrawn); - // return true if this checkbox is owner drawn bool IsOwnerDrawn() const; diff --git a/Externals/wxWidgets3/include/wx/msw/checklst.h b/Externals/wxWidgets3/include/wx/msw/checklst.h index 4814b0cce7..21b8651ac0 100644 --- a/Externals/wxWidgets3/include/wx/msw/checklst.h +++ b/Externals/wxWidgets3/include/wx/msw/checklst.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 16.11.97 -// RCS-ID: $Id: checklst.h 63226 2010-01-23 13:22:00Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -73,7 +72,7 @@ protected: // send an "item checked" event void SendEvent(unsigned int uiIndex) { - wxCommandEvent event(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, GetId()); + wxCommandEvent event(wxEVT_CHECKLISTBOX, GetId()); event.SetInt(uiIndex); event.SetEventObject(this); event.SetString(GetString(uiIndex)); diff --git a/Externals/wxWidgets3/include/wx/msw/chkconf.h b/Externals/wxWidgets3/include/wx/msw/chkconf.h index 637155d5f8..367f9e411e 100644 --- a/Externals/wxWidgets3/include/wx/msw/chkconf.h +++ b/Externals/wxWidgets3/include/wx/msw/chkconf.h @@ -4,7 +4,6 @@ * Author: Julian Smart * Modified by: * Created: 01/02/97 - * RCS-ID: $Id: chkconf.h 69845 2011-11-27 19:52:13Z VZ $ * Copyright: (c) Julian Smart * Licence: wxWindows licence */ @@ -155,12 +154,6 @@ # define wxUSE_STACKWALKER 0 #endif /* compiler doesn't support SEH */ -/* wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior */ -#if defined(__MWERKS__) -# undef wxUSE_DEBUG_NEW_ALWAYS -# define wxUSE_DEBUG_NEW_ALWAYS 0 -#endif - #if defined(__GNUWIN32__) /* These don't work as expected for mingw32 and cygwin32 */ # undef wxUSE_MEMORY_TRACING diff --git a/Externals/wxWidgets3/include/wx/msw/choice.h b/Externals/wxWidgets3/include/wx/msw/choice.h index e63382568c..a6c5703efc 100644 --- a/Externals/wxWidgets3/include/wx/msw/choice.h +++ b/Externals/wxWidgets3/include/wx/msw/choice.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Vadim Zeitlin to derive from wxChoiceBase // Created: 01/02/97 -// RCS-ID: $Id: choice.h 62960 2009-12-21 15:20:37Z JMS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,6 +11,8 @@ #ifndef _WX_CHOICE_H_ #define _WX_CHOICE_H_ +struct tagCOMBOBOXINFO; + // ---------------------------------------------------------------------------- // Choice item // ---------------------------------------------------------------------------- @@ -66,6 +67,8 @@ public: const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr); + virtual bool Show(bool show = true); + virtual void SetLabel(const wxString& label); virtual unsigned int GetCount() const; @@ -102,7 +105,8 @@ protected: // common part of all ctors void Init() { - m_lastAcceptedSelection = wxID_NONE; + m_lastAcceptedSelection = + m_pendingSelection = wxID_NONE; m_heightOwn = wxDefaultCoord; } @@ -123,6 +127,10 @@ protected: virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; + + // Show or hide the popup part of the control. + void MSWDoPopupOrDismiss(bool show); // update the height of the drop down list to fit the number of items we // have (without changing the visible height) @@ -131,6 +139,10 @@ protected: // set the height of the visible part of the control to m_heightOwn void MSWUpdateVisibleHeight(); + // Call GetComboBoxInfo() and return false if it's not supported by this + // system. Notice that the caller must initialize info.cbSize. + bool MSWGetComboBoxInfo(tagCOMBOBOXINFO* info) const; + // create and initialize the control bool CreateAndInit(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -150,10 +162,13 @@ protected: virtual void MSWEndDeferWindowPos(); #endif // wxUSE_DEFERRED_SIZING - // last "completed" selection, i.e. not the transient one while the user is - // browsing the popup list: this is only used when != wxID_NONE which is - // the case while the drop down is opened - int m_lastAcceptedSelection; + // These variables are only used while the drop down is opened. + // + // The first one contains the item that had been originally selected before + // the drop down was opened and the second one the item we should select + // when the drop down is closed again. + int m_lastAcceptedSelection, + m_pendingSelection; // the height of the control itself if it was set explicitly or // wxDefaultCoord if it hadn't diff --git a/Externals/wxWidgets3/include/wx/msw/clipbrd.h b/Externals/wxWidgets3/include/wx/msw/clipbrd.h index 729f2324fb..53e8a169f9 100644 --- a/Externals/wxWidgets3/include/wx/msw/clipbrd.h +++ b/Externals/wxWidgets3/include/wx/msw/clipbrd.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: clipbrd.h 61485 2009-07-20 23:54:08Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/colordlg.h b/Externals/wxWidgets3/include/wx/msw/colordlg.h index d4ff522142..76c7a37c74 100644 --- a/Externals/wxWidgets3/include/wx/msw/colordlg.h +++ b/Externals/wxWidgets3/include/wx/msw/colordlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: colordlg.h 66615 2011-01-07 05:26:57Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/colour.h b/Externals/wxWidgets3/include/wx/msw/colour.h index ec68a14c98..4b359fb370 100644 --- a/Externals/wxWidgets3/include/wx/msw/colour.h +++ b/Externals/wxWidgets3/include/wx/msw/colour.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: colour.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/combo.h b/Externals/wxWidgets3/include/wx/msw/combo.h index 05724ea602..50dc6eba4f 100644 --- a/Externals/wxWidgets3/include/wx/msw/combo.h +++ b/Externals/wxWidgets3/include/wx/msw/combo.h @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: Apr-30-2006 -// RCS-ID: $Id: combo.h 67276 2011-03-22 09:56:40Z JMS $ // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/combobox.h b/Externals/wxWidgets3/include/wx/msw/combobox.h index 5b7c63d67a..8649187c09 100644 --- a/Externals/wxWidgets3/include/wx/msw/combobox.h +++ b/Externals/wxWidgets3/include/wx/msw/combobox.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: combobox.h 68808 2011-08-21 12:06:16Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -92,6 +91,7 @@ public: virtual void SetSelection(long from, long to) { wxTextEntry::SetSelection(from, to); } virtual int GetSelection() const { return wxChoice::GetSelection(); } + virtual bool ContainsHWND(WXHWND hWnd) const; virtual void GetSelection(long *from, long *to) const; virtual bool IsEditable() const; @@ -130,7 +130,8 @@ protected: #if wxUSE_TOOLTIPS virtual void DoSetToolTip(wxToolTip *tip); #endif - void MSWDoPopupOrDismiss(bool show); + + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; // this is the implementation of GetEditHWND() which can also be used when // we don't have the edit control, it simply returns NULL then diff --git a/Externals/wxWidgets3/include/wx/msw/commandlinkbutton.h b/Externals/wxWidgets3/include/wx/msw/commandlinkbutton.h index ea674840f1..bc4d4804d0 100644 --- a/Externals/wxWidgets3/include/wx/msw/commandlinkbutton.h +++ b/Externals/wxWidgets3/include/wx/msw/commandlinkbutton.h @@ -3,7 +3,6 @@ // Purpose: wxCommandLinkButton class // Author: Rickard Westerlund // Created: 2010-06-11 -// RCS-ID: $Id: commandlinkbutton.h 65327 2010-08-17 14:48:50Z VZ $ // Copyright: (c) 2010 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/control.h b/Externals/wxWidgets3/include/wx/msw/control.h index cfcf22f9fc..29897ad9c3 100644 --- a/Externals/wxWidgets3/include/wx/msw/control.h +++ b/Externals/wxWidgets3/include/wx/msw/control.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: control.h 62151 2009-09-26 16:43:06Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/crashrpt.h b/Externals/wxWidgets3/include/wx/msw/crashrpt.h index 613b39a693..f354b482c2 100644 --- a/Externals/wxWidgets3/include/wx/msw/crashrpt.h +++ b/Externals/wxWidgets3/include/wx/msw/crashrpt.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 13.07.2003 -// RCS-ID: $Id: crashrpt.h 53816 2008-05-29 13:28:05Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/ctrlsub.h b/Externals/wxWidgets3/include/wx/msw/ctrlsub.h index a8a71384ba..068be29e58 100644 --- a/Externals/wxWidgets3/include/wx/msw/ctrlsub.h +++ b/Externals/wxWidgets3/include/wx/msw/ctrlsub.h @@ -3,7 +3,6 @@ // Purpose: common functionality of wxItemContainer-derived controls // Author: Vadim Zeitlin // Created: 2007-07-25 -// RCS-ID: $Id: ctrlsub.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/cursor.h b/Externals/wxWidgets3/include/wx/msw/cursor.h index 28702c0400..aef2e2a516 100644 --- a/Externals/wxWidgets3/include/wx/msw/cursor.h +++ b/Externals/wxWidgets3/include/wx/msw/cursor.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: cursor.h 55884 2008-09-25 17:56:07Z FM $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/custombgwin.h b/Externals/wxWidgets3/include/wx/msw/custombgwin.h index fe5481f710..ca8d8bfc42 100644 --- a/Externals/wxWidgets3/include/wx/msw/custombgwin.h +++ b/Externals/wxWidgets3/include/wx/msw/custombgwin.h @@ -3,7 +3,6 @@ // Purpose: wxMSW implementation of wxCustomBackgroundWindow // Author: Vadim Zeitlin // Created: 2011-10-10 -// RCS-ID: $Id: custombgwin.h 69378 2011-10-11 17:07:43Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/datectrl.h b/Externals/wxWidgets3/include/wx/msw/datectrl.h index 7015019f53..e3f95e880e 100644 --- a/Externals/wxWidgets3/include/wx/msw/datectrl.h +++ b/Externals/wxWidgets3/include/wx/msw/datectrl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-09 -// RCS-ID: $Id: datectrl.h 69222 2011-09-29 13:43:02Z VZ $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/datetimectrl.h b/Externals/wxWidgets3/include/wx/msw/datetimectrl.h index 0c783511c2..eb93f26ae1 100644 --- a/Externals/wxWidgets3/include/wx/msw/datetimectrl.h +++ b/Externals/wxWidgets3/include/wx/msw/datetimectrl.h @@ -3,7 +3,6 @@ // Purpose: wxDateTimePickerCtrl for Windows. // Author: Vadim Zeitlin // Created: 2011-09-22 (extracted from wx/msw/datectrl.h). -// RCS-ID: $Id: datetimectrl.h 69489 2011-10-20 16:45:48Z VZ $ // Copyright: (c) 2005-2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/dc.h b/Externals/wxWidgets3/include/wx/msw/dc.h index 48fa925c24..8ec5a94729 100644 --- a/Externals/wxWidgets3/include/wx/msw/dc.h +++ b/Externals/wxWidgets3/include/wx/msw/dc.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: dc.h 67588 2011-04-23 16:03:10Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -126,6 +125,8 @@ public: m_clipX2 = 0; } + void* GetHandle() const { return (void*)GetHDC(); } + const wxBitmap& GetSelectedBitmap() const { return m_selectedBitmap; } wxBitmap& GetSelectedBitmap() { return m_selectedBitmap; } @@ -247,12 +248,12 @@ public: virtual void DoGetSizeMM(int* width, int* height) const; - virtual void DoDrawLines(int n, wxPoint points[], + virtual void DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset); - virtual void DoDrawPolygon(int n, wxPoint points[], + virtual void DoDrawPolygon(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); - virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[], + virtual void DoDrawPolyPolygon(int n, const int count[], const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle = wxODDEVEN_RULE); virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const diff --git a/Externals/wxWidgets3/include/wx/msw/dcclient.h b/Externals/wxWidgets3/include/wx/msw/dcclient.h index 22ec737e30..9399e5c4be 100644 --- a/Externals/wxWidgets3/include/wx/msw/dcclient.h +++ b/Externals/wxWidgets3/include/wx/msw/dcclient.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: dcclient.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,16 +18,8 @@ #include "wx/dc.h" #include "wx/msw/dc.h" #include "wx/dcclient.h" -#include "wx/dynarray.h" -// ---------------------------------------------------------------------------- -// array types -// ---------------------------------------------------------------------------- - -// this one if used by wxPaintDC only -struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo; - -WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo); +class wxPaintDCInfo; // ---------------------------------------------------------------------------- // DC classes @@ -86,11 +77,13 @@ public: // find the entry for this DC in the cache (keyed by the window) static WXHDC FindDCInCache(wxWindow* win); -protected: - static wxArrayDCInfo ms_cache; + // This must be called by the code handling WM_PAINT to remove the DC + // cached for this window for the duration of this message processing. + static void EndPaint(wxWindow *win); - // find the entry for this DC in the cache (keyed by the window) - wxPaintDCInfo *FindInCache(size_t *index = NULL) const; +protected: + // Find the DC for this window in the cache, return NULL if not found. + static wxPaintDCInfo *FindInCache(wxWindow* win); DECLARE_CLASS(wxPaintDCImpl) wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl); diff --git a/Externals/wxWidgets3/include/wx/msw/dcmemory.h b/Externals/wxWidgets3/include/wx/msw/dcmemory.h index 8f5c6b39f8..59fdbc11b9 100644 --- a/Externals/wxWidgets3/include/wx/msw/dcmemory.h +++ b/Externals/wxWidgets3/include/wx/msw/dcmemory.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: dcmemory.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/dcprint.h b/Externals/wxWidgets3/include/wx/msw/dcprint.h index a6a876067d..85a60246dd 100644 --- a/Externals/wxWidgets3/include/wx/msw/dcprint.h +++ b/Externals/wxWidgets3/include/wx/msw/dcprint.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: dcprint.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/dcscreen.h b/Externals/wxWidgets3/include/wx/msw/dcscreen.h index aef59cbb0a..f85bbe2ff3 100644 --- a/Externals/wxWidgets3/include/wx/msw/dcscreen.h +++ b/Externals/wxWidgets3/include/wx/msw/dcscreen.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: dcscreen.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/dde.h b/Externals/wxWidgets3/include/wx/msw/dde.h index d3f024deee..558f66c40e 100644 --- a/Externals/wxWidgets3/include/wx/msw/dde.h +++ b/Externals/wxWidgets3/include/wx/msw/dde.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: dde.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/debughlp.h b/Externals/wxWidgets3/include/wx/msw/debughlp.h index f5c34ec2b3..715814d0ae 100644 --- a/Externals/wxWidgets3/include/wx/msw/debughlp.h +++ b/Externals/wxWidgets3/include/wx/msw/debughlp.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-08 (extracted from msw/crashrpt.cpp) -// RCS-ID: $Id: debughlp.h 69845 2011-11-27 19:52:13Z VZ $ // Copyright: (c) 2003-2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -20,18 +19,21 @@ #endif // __WXWINCE__ #include "wx/msw/private.h" -// we need to determine whether we have the declarations for the function in -// debughlp.dll version 5.81 (at least) and we check for DBHLPAPI to test this -// -// reasons: -// - VC6 version of imagehlp.h doesn't define it -// - VC7 one does -// - testing for compiler version doesn't work as you can install and use -// the new SDK headers with VC6 -// -// in any case, the user may override by defining wxUSE_DBGHELP himself +// All known versions of imagehlp.h define API_VERSION_NUMBER but it's not +// documented, so deal with the possibility that it's not defined just in case. +#ifndef API_VERSION_NUMBER + #define API_VERSION_NUMBER 0 +#endif + +// wxUSE_DBGHELP is a bit special as it is not defined in wx/setup.h and we try +// to auto-detect whether we should be using debug help API or not ourselves +// below. However if the auto-detection fails, you can always predefine it as 0 +// to avoid even trying. #ifndef wxUSE_DBGHELP - #ifdef DBHLPAPI + // The version of imagehlp.h from VC6 (7) is too old and is missing some + // required symbols while the version from VC7 (9) is good enough. As we + // don't know anything about version 8, don't use it unless we can test it. + #if API_VERSION_NUMBER >= 9 #define wxUSE_DBGHELP 1 #else #define wxUSE_DBGHELP 0 diff --git a/Externals/wxWidgets3/include/wx/msw/dialog.h b/Externals/wxWidgets3/include/wx/msw/dialog.h index ad192925e1..5e6157426a 100644 --- a/Externals/wxWidgets3/include/wx/msw/dialog.h +++ b/Externals/wxWidgets3/include/wx/msw/dialog.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: dialog.h 70511 2012-02-05 14:18:22Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/dib.h b/Externals/wxWidgets3/include/wx/msw/dib.h index f996d0de70..28663c35fa 100644 --- a/Externals/wxWidgets3/include/wx/msw/dib.h +++ b/Externals/wxWidgets3/include/wx/msw/dib.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 03.03.03 (replaces the old file with the same name) -// RCS-ID: $Id: dib.h 65959 2010-10-30 23:50:50Z VZ $ // Copyright: (c) 1997-2003 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,13 +11,16 @@ #ifndef _WX_MSW_DIB_H_ #define _WX_MSW_DIB_H_ -class WXDLLIMPEXP_FWD_CORE wxBitmap; class WXDLLIMPEXP_FWD_CORE wxPalette; #include "wx/msw/private.h" #if wxUSE_WXDIB +#ifdef __WXMSW__ + #include "wx/bitmap.h" +#endif // __WXMSW__ + // ---------------------------------------------------------------------------- // wxDIB: represents a DIB section // ---------------------------------------------------------------------------- @@ -37,9 +39,11 @@ public: wxDIB(int width, int height, int depth) { Init(); (void)Create(width, height, depth); } +#ifdef __WXMSW__ // create a DIB from the DDB wxDIB(const wxBitmap& bmp) { Init(); (void)Create(bmp); } +#endif // __WXMSW__ // create a DIB from the Windows DDB wxDIB(HBITMAP hbmp) @@ -53,7 +57,9 @@ public: // same as the corresponding ctors but with return value bool Create(int width, int height, int depth); +#ifdef __WXMSW__ bool Create(const wxBitmap& bmp) { return Create(GetHbitmapOf(bmp)); } +#endif bool Create(HBITMAP hbmp); bool Load(const wxString& filename); diff --git a/Externals/wxWidgets3/include/wx/msw/dirdlg.h b/Externals/wxWidgets3/include/wx/msw/dirdlg.h index 5e570c2274..b6939581ee 100644 --- a/Externals/wxWidgets3/include/wx/msw/dirdlg.h +++ b/Externals/wxWidgets3/include/wx/msw/dirdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: dirdlg.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -28,6 +27,11 @@ public: virtual int ShowModal(); private: + // The real implementations of ShowModal(), used for Windows versions + // before and since Vista. + int ShowSHBrowseForFolder(WXHWND owner); + int ShowIFileDialog(WXHWND owner); + DECLARE_DYNAMIC_CLASS_NO_COPY(wxDirDialog) }; diff --git a/Externals/wxWidgets3/include/wx/msw/dragimag.h b/Externals/wxWidgets3/include/wx/msw/dragimag.h index 5118833235..e08723511a 100644 --- a/Externals/wxWidgets3/include/wx/msw/dragimag.h +++ b/Externals/wxWidgets3/include/wx/msw/dragimag.h @@ -5,7 +5,6 @@ // Author: Julian Smart // Modified by: // Created: 08/04/99 -// RCS-ID: $Id: dragimag.h 70584 2012-02-15 00:35:25Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/enhmeta.h b/Externals/wxWidgets3/include/wx/msw/enhmeta.h index e1168ec707..3951bd7f5a 100644 --- a/Externals/wxWidgets3/include/wx/msw/enhmeta.h +++ b/Externals/wxWidgets3/include/wx/msw/enhmeta.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 13.01.00 -// RCS-ID: $Id: enhmeta.h 68317 2011-07-21 13:49:59Z VZ $ // Copyright: (c) 2000 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/evtloop.h b/Externals/wxWidgets3/include/wx/msw/evtloop.h index 2d9b2e3e12..dee2c03db3 100644 --- a/Externals/wxWidgets3/include/wx/msw/evtloop.h +++ b/Externals/wxWidgets3/include/wx/msw/evtloop.h @@ -1,10 +1,9 @@ /////////////////////////////////////////////////////////////////////////////// // Name: wx/msw/evtloop.h -// Purpose: wxEventLoop class for MSW +// Purpose: wxEventLoop class for wxMSW port // Author: Vadim Zeitlin // Modified by: // Created: 2004-07-31 -// RCS-ID: $Id: evtloop.h 59161 2009-02-26 14:15:20Z VZ $ // Copyright: (c) 2003-2004 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -12,36 +11,15 @@ #ifndef _WX_MSW_EVTLOOP_H_ #define _WX_MSW_EVTLOOP_H_ -#if wxUSE_GUI #include "wx/dynarray.h" #include "wx/msw/wrapwin.h" #include "wx/window.h" -#endif +#include "wx/msw/evtloopconsole.h" // for wxMSWEventLoopBase // ---------------------------------------------------------------------------- // wxEventLoop // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_BASE wxMSWEventLoopBase : public wxEventLoopManual -{ -public: - wxMSWEventLoopBase(); - - // implement base class pure virtuals - virtual bool Pending() const; - -protected: - // get the next message from queue and return true or return false if we - // got WM_QUIT or an error occurred - bool GetNextMessage(WXMSG *msg); - - // same as above but with a timeout and return value can be -1 meaning that - // time out expired in addition to - int GetNextMessageTimeout(WXMSG *msg, unsigned long timeout); -}; - -#if wxUSE_GUI - WX_DECLARE_EXPORTED_OBJARRAY(MSG, wxMSGArray); class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxMSWEventLoopBase @@ -93,27 +71,4 @@ private: static wxWindowMSW *ms_winCritical; }; -#else // !wxUSE_GUI - -#if wxUSE_CONSOLE_EVENTLOOP - -class WXDLLIMPEXP_BASE wxConsoleEventLoop : public wxMSWEventLoopBase -{ -public: - wxConsoleEventLoop() { } - - // override/implement base class virtuals - virtual bool Dispatch(); - virtual int DispatchTimeout(unsigned long timeout); - virtual void WakeUp(); - virtual bool YieldFor(long WXUNUSED(eventsToProcess)) { return true; } - - // MSW-specific function to process a single message - virtual void ProcessMessage(WXMSG *msg); -}; - -#endif // wxUSE_CONSOLE_EVENTLOOP - -#endif // wxUSE_GUI/!wxUSE_GUI - #endif // _WX_MSW_EVTLOOP_H_ diff --git a/Externals/wxWidgets3/include/wx/msw/evtloopconsole.h b/Externals/wxWidgets3/include/wx/msw/evtloopconsole.h new file mode 100644 index 0000000000..36da6f640a --- /dev/null +++ b/Externals/wxWidgets3/include/wx/msw/evtloopconsole.h @@ -0,0 +1,51 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/evtloopconsole.h +// Purpose: wxConsoleEventLoop class for Windows +// Author: Vadim Zeitlin +// Modified by: +// Created: 2004-07-31 +// Copyright: (c) 2003-2004 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_EVTLOOPCONSOLE_H_ +#define _WX_MSW_EVTLOOPCONSOLE_H_ + +class WXDLLIMPEXP_BASE wxMSWEventLoopBase : public wxEventLoopManual +{ +public: + wxMSWEventLoopBase(); + + // implement base class pure virtuals + virtual bool Pending() const; + +protected: + // get the next message from queue and return true or return false if we + // got WM_QUIT or an error occurred + bool GetNextMessage(WXMSG *msg); + + // same as above but with a timeout and return value can be -1 meaning that + // time out expired in addition to + int GetNextMessageTimeout(WXMSG *msg, unsigned long timeout); +}; + +#if wxUSE_CONSOLE_EVENTLOOP + +class WXDLLIMPEXP_BASE wxConsoleEventLoop : public wxMSWEventLoopBase +{ +public: + wxConsoleEventLoop() { } + + // override/implement base class virtuals + virtual bool Dispatch(); + virtual int DispatchTimeout(unsigned long timeout); + virtual void WakeUp(); + virtual bool YieldFor(long WXUNUSED(eventsToProcess)) { return true; } + + // Windows-specific function to process a single message + virtual void ProcessMessage(WXMSG *msg); +}; + +#endif // wxUSE_CONSOLE_EVENTLOOP + +#endif // _WX_MSW_EVTLOOPCONSOLE_H_ diff --git a/Externals/wxWidgets3/include/wx/msw/fdrepdlg.h b/Externals/wxWidgets3/include/wx/msw/fdrepdlg.h index 7b86e7f014..af4de0d207 100644 --- a/Externals/wxWidgets3/include/wx/msw/fdrepdlg.h +++ b/Externals/wxWidgets3/include/wx/msw/fdrepdlg.h @@ -4,7 +4,6 @@ // Author: Markus Greither // Modified by: 31.07.01: VZ: integrated into wxWidgets // Created: 23/03/2001 -// RCS-ID: $Id: fdrepdlg.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Markus Greither // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/filedlg.h b/Externals/wxWidgets3/include/wx/msw/filedlg.h index 54a5c6c5c4..a1958bace7 100644 --- a/Externals/wxWidgets3/include/wx/msw/filedlg.h +++ b/Externals/wxWidgets3/include/wx/msw/filedlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: filedlg.h 62722 2009-11-26 16:17:00Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -44,6 +43,9 @@ public: // called from the hook procedure on CDN_INITDONE reception virtual void MSWOnInitDone(WXHWND hDlg); + // called from the hook procedure on CDN_SELCHANGE. + void MSWOnSelChange(WXHWND hDlg); + protected: #if !(defined(__SMARTPHONE__) && defined(__WXWINCE__)) diff --git a/Externals/wxWidgets3/include/wx/msw/font.h b/Externals/wxWidgets3/include/wx/msw/font.h index 8c29e0e6dd..275c6d9962 100644 --- a/Externals/wxWidgets3/include/wx/msw/font.h +++ b/Externals/wxWidgets3/include/wx/msw/font.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: font.h 70446 2012-01-23 11:28:28Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -24,6 +23,8 @@ public: // ctors and such wxFont() { } + wxFont(const wxFontInfo& info); + #if FUTURE_WXWIN_COMPATIBILITY_3_0 wxFont(int size, int family, @@ -91,12 +92,6 @@ public: Create(info, hFont); } - wxFont(int pointSize, - wxFontFamily family, - int flags = wxFONTFLAG_DEFAULT, - const wxString& face = wxEmptyString, - wxFontEncoding encoding = wxFONTENCODING_DEFAULT); - wxFont(const wxString& fontDesc); diff --git a/Externals/wxWidgets3/include/wx/msw/fontdlg.h b/Externals/wxWidgets3/include/wx/msw/fontdlg.h index 69ebb06f6d..ea7e7ef7e8 100644 --- a/Externals/wxWidgets3/include/wx/msw/fontdlg.h +++ b/Externals/wxWidgets3/include/wx/msw/fontdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: fontdlg.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/frame.h b/Externals/wxWidgets3/include/wx/msw/frame.h index 7483e1c992..54ad3beec4 100644 --- a/Externals/wxWidgets3/include/wx/msw/frame.h +++ b/Externals/wxWidgets3/include/wx/msw/frame.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: frame.h 70511 2012-02-05 14:18:22Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -77,7 +76,6 @@ public: // event handlers bool HandleSize(int x, int y, WXUINT flag); bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control); - bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu); // tooltip management #if wxUSE_TOOLTIPS @@ -105,6 +103,9 @@ public: // get the currently active menu: this is the same as the frame menu for // normal frames but is overridden by wxMDIParentFrame virtual WXHMENU MSWGetActiveMenu() const { return m_hMenu; } + + // Look up the menu in the menu bar. + virtual wxMenu* MSWFindMenuFromHMENU(WXHMENU hMenu); #endif // wxUSE_MENUS protected: @@ -131,18 +132,6 @@ protected: // wxMDIChildFrame bool MSWDoTranslateMessage(wxFrame *frame, WXMSG *msg); -#if wxUSE_MENUS - // handle WM_EXITMENULOOP message for Win95 only - bool HandleExitMenuLoop(WXWORD isPopup); - - // handle WM_(UN)INITMENUPOPUP message to generate wxEVT_MENU_OPEN/CLOSE - bool HandleMenuPopup(wxEventType evtType, WXHMENU hMenu); - - // Command part of HandleMenuPopup() and HandleExitMenuLoop(). - bool DoSendMenuOpenCloseEvent(wxEventType evtType, wxMenu* menu, bool popup); -#endif // wxUSE_MENUS - - virtual bool IsMDIChild() const { return false; } // get default (wxWidgets) icon for the frame diff --git a/Externals/wxWidgets3/include/wx/msw/fswatcher.h b/Externals/wxWidgets3/include/wx/msw/fswatcher.h index ea7ca41379..b73ee66188 100644 --- a/Externals/wxWidgets3/include/wx/msw/fswatcher.h +++ b/Externals/wxWidgets3/include/wx/msw/fswatcher.h @@ -3,7 +3,6 @@ // Purpose: wxMSWFileSystemWatcher // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id: fswatcher.h 67693 2011-05-03 23:31:39Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/gauge.h b/Externals/wxWidgets3/include/wx/msw/gauge.h index a8632310c2..ac820e99b7 100644 --- a/Externals/wxWidgets3/include/wx/msw/gauge.h +++ b/Externals/wxWidgets3/include/wx/msw/gauge.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: gauge.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/gccpriv.h b/Externals/wxWidgets3/include/wx/msw/gccpriv.h index db4c72a84d..31453015b2 100644 --- a/Externals/wxWidgets3/include/wx/msw/gccpriv.h +++ b/Externals/wxWidgets3/include/wx/msw/gccpriv.h @@ -4,7 +4,6 @@ Author: Vadim Zeitlin Modified by: Created: - RCS-ID: $Id: gccpriv.h 36155 2005-11-10 16:16:05Z ABX $ Copyright: (c) Vadim Zeitlin Licence: wxWindows Licence */ @@ -74,15 +73,6 @@ #define __CYGWIN10__ #endif -/* Check for Mingw runtime version: */ -#if defined(__MINGW32_MAJOR_VERSION) && defined(__MINGW32_MINOR_VERSION) - #define wxCHECK_MINGW32_VERSION( major, minor ) \ - ( ( ( __MINGW32_MAJOR_VERSION > (major) ) \ - || ( __MINGW32_MAJOR_VERSION == (major) && __MINGW32_MINOR_VERSION >= (minor) ) ) ) -#else - #define wxCHECK_MINGW32_VERSION( major, minor ) (0) -#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 ) \ diff --git a/Externals/wxWidgets3/include/wx/msw/gdiimage.h b/Externals/wxWidgets3/include/wx/msw/gdiimage.h index ab5145938e..d085e50a4a 100644 --- a/Externals/wxWidgets3/include/wx/msw/gdiimage.h +++ b/Externals/wxWidgets3/include/wx/msw/gdiimage.h @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 20.11.99 -// RCS-ID: $Id: gdiimage.h 66374 2010-12-14 18:43:49Z VZ $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/genrcdefs.h b/Externals/wxWidgets3/include/wx/msw/genrcdefs.h index ee8bb676a8..8bab95b077 100644 --- a/Externals/wxWidgets3/include/wx/msw/genrcdefs.h +++ b/Externals/wxWidgets3/include/wx/msw/genrcdefs.h @@ -2,7 +2,6 @@ * Name: wx/msw/genrcdefs.h * Purpose: Emit preprocessor symbols into rcdefs.h for resource compiler * Author: Mike Wetherell - * RCS-ID: $Id: genrcdefs.h 46936 2007-06-25 14:04:34Z VS $ * Copyright: (c) 2005 Mike Wetherell * Licence: wxWindows licence */ @@ -13,7 +12,11 @@ EMIT(#ifndef _WX_RCDEFS_H) EMIT(#define _WX_RCDEFS_H) #ifdef _MSC_FULL_VER -EMIT(#define WX_MSC_FULL_VER _MSC_FULL_VER) +#if _MSC_FULL_VER < 140040130 +EMIT(#define wxUSE_RC_MANIFEST 1) +#endif +#else +EMIT(#define wxUSE_RC_MANIFEST 1) #endif #ifdef _M_AMD64 diff --git a/Externals/wxWidgets3/include/wx/msw/glcanvas.h b/Externals/wxWidgets3/include/wx/msw/glcanvas.h index 10566677ac..52b82f42a0 100644 --- a/Externals/wxWidgets3/include/wx/msw/glcanvas.h +++ b/Externals/wxWidgets3/include/wx/msw/glcanvas.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: glcanvas.h 54202 2008-06-14 01:44:13Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/headerctrl.h b/Externals/wxWidgets3/include/wx/msw/headerctrl.h index 7ddf38241a..db702c5a19 100644 --- a/Externals/wxWidgets3/include/wx/msw/headerctrl.h +++ b/Externals/wxWidgets3/include/wx/msw/headerctrl.h @@ -3,7 +3,6 @@ // Purpose: wxMSW native wxHeaderCtrl // Author: Vadim Zeitlin // Created: 2008-12-01 -// RCS-ID: $Id: headerctrl.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -46,7 +45,14 @@ public: virtual ~wxHeaderCtrl(); - + +protected: + // override wxWindow methods which must be implemented by a new control + virtual wxSize DoGetBestSize() const; + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + private: // implement base class pure virtuals virtual void DoSetCount(unsigned int count); @@ -58,12 +64,6 @@ private: virtual void DoSetColumnsOrder(const wxArrayInt& order); virtual wxArrayInt DoGetColumnsOrder() const; - // override wxWindow methods which must be implemented by a new control - virtual wxSize DoGetBestSize() const; - virtual void DoSetSize(int x, int y, - int width, int height, - int sizeFlags = wxSIZE_AUTO); - // override MSW-specific methods needed for new control virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result); @@ -126,6 +126,9 @@ private: // the offset of the window used to emulate scrolling it int m_scrollOffset; + // actual column we are dragging or -1 if not dragging anything + int m_colBeingDragged; + wxDECLARE_NO_COPY_CLASS(wxHeaderCtrl); }; diff --git a/Externals/wxWidgets3/include/wx/msw/helpbest.h b/Externals/wxWidgets3/include/wx/msw/helpbest.h index 88eba1dc3f..4deffa4adb 100644 --- a/Externals/wxWidgets3/include/wx/msw/helpbest.h +++ b/Externals/wxWidgets3/include/wx/msw/helpbest.h @@ -4,7 +4,6 @@ // Author: Mattia Barbon // Modified by: // Created: 02/04/2001 -// RCS-ID: $Id: helpbest.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Mattia Barbon // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/helpchm.h b/Externals/wxWidgets3/include/wx/msw/helpchm.h index d3fdc9272b..17cda8ce00 100644 --- a/Externals/wxWidgets3/include/wx/msw/helpchm.h +++ b/Externals/wxWidgets3/include/wx/msw/helpchm.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 16/04/2000 -// RCS-ID: $Id: helpchm.h 67880 2011-06-07 14:28:55Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -63,7 +62,7 @@ protected: // the first 2 HtmlHelp() parameters bool CallHtmlHelp(unsigned cmd, WXWPARAM param) { - return CallHtmlHelp(GetParentWindow(), GetValidFilename().wx_str(), + return CallHtmlHelp(GetParentWindow(), GetValidFilename().t_str(), cmd, param); } diff --git a/Externals/wxWidgets3/include/wx/msw/helpwin.h b/Externals/wxWidgets3/include/wx/msw/helpwin.h index 828d2b6b4f..7cc5545435 100644 --- a/Externals/wxWidgets3/include/wx/msw/helpwin.h +++ b/Externals/wxWidgets3/include/wx/msw/helpwin.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: helpwin.h 67882 2011-06-07 16:48:36Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/hyperlink.h b/Externals/wxWidgets3/include/wx/msw/hyperlink.h index a12bae3f9b..847695b273 100644 --- a/Externals/wxWidgets3/include/wx/msw/hyperlink.h +++ b/Externals/wxWidgets3/include/wx/msw/hyperlink.h @@ -3,7 +3,6 @@ // Purpose: Hyperlink control // Author: Rickard Westerlund // Created: 2010-08-04 -// RCS-ID: $Id: hyperlink.h 65334 2010-08-17 16:55:32Z VZ $ // Copyright: (c) 2010 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/icon.h b/Externals/wxWidgets3/include/wx/msw/icon.h index a94556179a..4737e449a4 100644 --- a/Externals/wxWidgets3/include/wx/msw/icon.h +++ b/Externals/wxWidgets3/include/wx/msw/icon.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: icon.h 56644 2008-11-02 02:39:52Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -65,6 +64,8 @@ public: wxBitmapType type = wxICON_DEFAULT_TYPE, int desiredWidth = -1, int desiredHeight = -1); + bool CreateFromHICON(WXHICON icon); + // implementation only from now on wxIconRefData *GetIconData() const { return (wxIconRefData *)m_refData; } diff --git a/Externals/wxWidgets3/include/wx/msw/imaglist.h b/Externals/wxWidgets3/include/wx/msw/imaglist.h index e0086f91b9..3f831f1832 100644 --- a/Externals/wxWidgets3/include/wx/msw/imaglist.h +++ b/Externals/wxWidgets3/include/wx/msw/imaglist.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: imaglist.h 59036 2009-02-19 20:26:00Z RR $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/iniconf.h b/Externals/wxWidgets3/include/wx/msw/iniconf.h index e22bc7d38c..63ebd00141 100644 --- a/Externals/wxWidgets3/include/wx/msw/iniconf.h +++ b/Externals/wxWidgets3/include/wx/msw/iniconf.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 27.07.98 -// RCS-ID: $Id: iniconf.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/init.h b/Externals/wxWidgets3/include/wx/msw/init.h new file mode 100644 index 0000000000..014dedbd09 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/msw/init.h @@ -0,0 +1,90 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/init.h +// Purpose: Windows-specific wxEntry() overload +// Author: Julian Smart +// Modified by: +// Created: 01/02/97 +// Copyright: (c) Julian Smart +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_INIT_H_ +#define _WX_MSW_INIT_H_ + +// ---------------------------------------------------------------------------- +// Windows-specific wxEntry() overload and wxIMPLEMENT_WXWIN_MAIN definition +// ---------------------------------------------------------------------------- + +// we need HINSTANCE declaration to define WinMain() +#include "wx/msw/wrapwin.h" + +#ifndef SW_SHOWNORMAL + #define SW_SHOWNORMAL 1 +#endif + +// WinMain() is always ANSI, even in Unicode build, under normal Windows +// but is always Unicode under CE +#ifdef __WXWINCE__ + typedef wchar_t *wxCmdLineArgType; +#else + typedef char *wxCmdLineArgType; +#endif + +// Windows-only overloads of wxEntry() and wxEntryStart() which take the +// parameters passed to WinMain() instead of those passed to main() +extern WXDLLIMPEXP_CORE bool + wxEntryStart(HINSTANCE hInstance, + HINSTANCE hPrevInstance = NULL, + wxCmdLineArgType pCmdLine = NULL, + int nCmdShow = SW_SHOWNORMAL); + +extern WXDLLIMPEXP_CORE int + wxEntry(HINSTANCE hInstance, + HINSTANCE hPrevInstance = NULL, + wxCmdLineArgType pCmdLine = NULL, + int nCmdShow = SW_SHOWNORMAL); + +#if defined(__BORLANDC__) && wxUSE_UNICODE + // Borland C++ has the following nonstandard behaviour: when the -WU + // command line flag is used, the linker expects to find wWinMain instead + // of WinMain. This flag causes the compiler to define _UNICODE and + // UNICODE symbols and there's no way to detect its use, so we have to + // define both WinMain and wWinMain so that wxIMPLEMENT_WXWIN_MAIN works + // for both code compiled with and without -WU. + // See http://sourceforge.net/tracker/?func=detail&atid=309863&aid=1935997&group_id=9863 + // for more details. + #define wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD \ + extern "C" int WINAPI wWinMain(HINSTANCE hInstance, \ + HINSTANCE hPrevInstance, \ + wchar_t * WXUNUSED(lpCmdLine), \ + int nCmdShow) \ + { \ + wxDISABLE_DEBUG_SUPPORT(); \ + \ + /* NB: wxEntry expects lpCmdLine argument to be char*, not */ \ + /* wchar_t*, but fortunately it's not used anywhere */ \ + /* and we can simply pass NULL in: */ \ + return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \ + } +#else + #define wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD +#endif // defined(__BORLANDC__) && wxUSE_UNICODE + +#define wxIMPLEMENT_WXWIN_MAIN \ + extern "C" int WINAPI WinMain(HINSTANCE hInstance, \ + HINSTANCE hPrevInstance, \ + wxCmdLineArgType WXUNUSED(lpCmdLine), \ + int nCmdShow) \ + { \ + wxDISABLE_DEBUG_SUPPORT(); \ + \ + /* NB: We pass NULL in place of lpCmdLine to behave the same as */ \ + /* Borland-specific wWinMain() above. If it becomes needed */ \ + /* to pass lpCmdLine to wxEntry() here, you'll have to fix */ \ + /* wWinMain() above too. */ \ + return wxEntry(hInstance, hPrevInstance, NULL, nCmdShow); \ + } \ + wxIMPLEMENT_WXWIN_MAIN_BORLAND_NONSTANDARD + + +#endif // _WX_MSW_INIT_H_ diff --git a/Externals/wxWidgets3/include/wx/msw/joystick.h b/Externals/wxWidgets3/include/wx/msw/joystick.h index eeb5d9a3d6..b3f5e57105 100644 --- a/Externals/wxWidgets3/include/wx/msw/joystick.h +++ b/Externals/wxWidgets3/include/wx/msw/joystick.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: joystick.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/libraries.h b/Externals/wxWidgets3/include/wx/msw/libraries.h index 09ff8996d9..86e47195d1 100644 --- a/Externals/wxWidgets3/include/wx/msw/libraries.h +++ b/Externals/wxWidgets3/include/wx/msw/libraries.h @@ -3,7 +3,6 @@ * Purpose: Pragmas for linking libs conditionally * Author: Michael Wetherell * Modified by: - * RCS-ID: $Id: libraries.h 37045 2006-01-21 22:50:46Z MW $ * Copyright: (c) 2005 Michael Wetherell * Licence: wxWindows licence */ diff --git a/Externals/wxWidgets3/include/wx/msw/listbox.h b/Externals/wxWidgets3/include/wx/msw/listbox.h index 77080b3664..8d8bd01a87 100644 --- a/Externals/wxWidgets3/include/wx/msw/listbox.h +++ b/Externals/wxWidgets3/include/wx/msw/listbox.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: listbox.h 64548 2010-06-10 10:40:21Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -151,8 +150,6 @@ public: virtual void OnInternalIdle(); - virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); - protected: virtual wxSize DoGetBestClientSize() const; @@ -194,10 +191,6 @@ private: // i.e. if we need to call SetHorizontalExtent() from OnInternalIdle() bool m_updateHorizontalExtent; - // flag set to true when we get a keyboard event and reset to false when we - // get a mouse one: this is used to find the correct item for the selection - // event - bool m_selectedByKeyboard; DECLARE_DYNAMIC_CLASS_NO_COPY(wxListBox) }; diff --git a/Externals/wxWidgets3/include/wx/msw/listctrl.h b/Externals/wxWidgets3/include/wx/msw/listctrl.h index ff49f754bb..e3f0a7d1df 100644 --- a/Externals/wxWidgets3/include/wx/msw/listctrl.h +++ b/Externals/wxWidgets3/include/wx/msw/listctrl.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Agron Selimaj // Created: 01/02/97 -// RCS-ID: $Id: listctrl.h 70282 2012-01-07 15:09:43Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -384,6 +383,14 @@ protected: // common part of all ctors void Init(); + // Implement constrained best size calculation. + virtual int DoGetBestClientHeight(int width) const + { return MSWGetBestViewRect(width, -1).y; } + virtual int DoGetBestClientWidth(int height) const + { return MSWGetBestViewRect(-1, height).x; } + + wxSize MSWGetBestViewRect(int x, int y) const; + // Implement base class pure virtual methods. long DoInsertColumn(long col, const wxListItem& info); @@ -431,9 +438,6 @@ protected: // return the icon for the given item and column. virtual int OnGetItemColumnImage(long item, long column) const; - // return the attribute for the item (may return NULL if none) - virtual wxListItemAttr *OnGetItemAttr(long item) const; - // return the attribute for the given item and column (may return NULL if none) virtual wxListItemAttr *OnGetItemColumnAttr(long item, long WXUNUSED(column)) const { diff --git a/Externals/wxWidgets3/include/wx/msw/mdi.h b/Externals/wxWidgets3/include/wx/msw/mdi.h index 7fc574568a..a699a3125c 100644 --- a/Externals/wxWidgets3/include/wx/msw/mdi.h +++ b/Externals/wxWidgets3/include/wx/msw/mdi.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes // Created: 01/02/97 -// RCS-ID: $Id: mdi.h 61986 2009-09-21 08:44:42Z VZ $ // Copyright: (c) 1997 Julian Smart // (c) 2008 Vadim Zeitlin // Licence: wxWindows licence @@ -110,9 +109,6 @@ public: #endif // wxUSE_MENUS protected: - // override to pass menu/toolbar events to the active child first - virtual bool TryBefore(wxEvent& event); - #if wxUSE_MENUS_NATIVE virtual void InternalSetMenuBar(); #endif // wxUSE_MENUS_NATIVE diff --git a/Externals/wxWidgets3/include/wx/msw/menu.h b/Externals/wxWidgets3/include/wx/msw/menu.h index 53bea80f91..5f4c9f1853 100644 --- a/Externals/wxWidgets3/include/wx/msw/menu.h +++ b/Externals/wxWidgets3/include/wx/msw/menu.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Vadim Zeitlin (wxMenuItem is now in separate file) // Created: 01/02/97 -// RCS-ID: $Id: menu.h 70350 2012-01-15 13:41:17Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/menuitem.h b/Externals/wxWidgets3/include/wx/msw/menuitem.h index 1ccc75bdea..d76bd11950 100644 --- a/Externals/wxWidgets3/include/wx/msw/menuitem.h +++ b/Externals/wxWidgets3/include/wx/msw/menuitem.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 11.11.97 -// RCS-ID: $Id: menuitem.h 70801 2012-03-04 00:29:55Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/metafile.h b/Externals/wxWidgets3/include/wx/msw/metafile.h index c1d022225e..8991f58c91 100644 --- a/Externals/wxWidgets3/include/wx/msw/metafile.h +++ b/Externals/wxWidgets3/include/wx/msw/metafile.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: VZ 07.01.00: implemented wxMetaFileDataObject // Created: 01/02/97 -// RCS-ID: $Id: metafile.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/microwin.h b/Externals/wxWidgets3/include/wx/msw/microwin.h index 29940abfaa..bb9861ab10 100644 --- a/Externals/wxWidgets3/include/wx/msw/microwin.h +++ b/Externals/wxWidgets3/include/wx/msw/microwin.h @@ -4,7 +4,6 @@ // Purpose: Extra implementation for MicroWindows // Author: Julian Smart // Created: 2001-05-31 -// RCS-ID: $Id: microwin.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/mimetype.h b/Externals/wxWidgets3/include/wx/msw/mimetype.h index d3a7bef054..90a7013b6f 100644 --- a/Externals/wxWidgets3/include/wx/msw/mimetype.h +++ b/Externals/wxWidgets3/include/wx/msw/mimetype.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 23.09.98 -// RCS-ID: $Id: mimetype.h 54434 2008-06-30 11:58:41Z RR $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence (part of wxExtra library) ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/minifram.h b/Externals/wxWidgets3/include/wx/msw/minifram.h index d798228293..5e12562ebc 100644 --- a/Externals/wxWidgets3/include/wx/msw/minifram.h +++ b/Externals/wxWidgets3/include/wx/msw/minifram.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: minifram.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/missing.h b/Externals/wxWidgets3/include/wx/msw/missing.h index 34184c596d..d2782ef5d5 100644 --- a/Externals/wxWidgets3/include/wx/msw/missing.h +++ b/Externals/wxWidgets3/include/wx/msw/missing.h @@ -3,7 +3,6 @@ // Purpose: Declarations for parts of the Win32 SDK that are missing in // the versions that come with some compilers // Created: 2002/04/23 -// RCS-ID: $Id: missing.h 69844 2011-11-27 19:50:53Z VZ $ // Copyright: (c) 2002 Mattia Barbon // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -77,12 +76,18 @@ #ifndef WM_MOUSEWHEEL #define WM_MOUSEWHEEL 0x020A #endif + #ifndef WM_MOUSEHWHEEL + #define WM_MOUSEHWHEEL 0x020E + #endif #ifndef WHEEL_DELTA #define WHEEL_DELTA 120 #endif #ifndef SPI_GETWHEELSCROLLLINES #define SPI_GETWHEELSCROLLLINES 104 #endif + #ifndef SPI_GETWHEELSCROLLCHARS + #define SPI_GETWHEELSCROLLCHARS 108 + #endif #endif // wxUSE_MOUSEWHEEL // Needed by window.cpp @@ -648,6 +653,10 @@ typedef struct #define INET_E_CODE_INSTALL_SUPPRESSED 0x800C0400L #endif +#ifndef MUI_LANGUAGE_NAME +#define MUI_LANGUAGE_NAME 0x8 +#endif + //We need to check if we are using MinGW or mingw-w64 as their //definitions are different diff --git a/Externals/wxWidgets3/include/wx/msw/msgdlg.h b/Externals/wxWidgets3/include/wx/msw/msgdlg.h index 68358de1c1..3562a362c3 100644 --- a/Externals/wxWidgets3/include/wx/msw/msgdlg.h +++ b/Externals/wxWidgets3/include/wx/msw/msgdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: msgdlg.h 66237 2010-11-22 12:49:07Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -27,6 +26,8 @@ public: virtual int ShowModal(); + virtual long GetEffectiveIcon() const; + // implementation-specific // return the font used for the text in the message box diff --git a/Externals/wxWidgets3/include/wx/msw/mslu.h b/Externals/wxWidgets3/include/wx/msw/mslu.h index eccf13a26d..d8b9441b38 100644 --- a/Externals/wxWidgets3/include/wx/msw/mslu.h +++ b/Externals/wxWidgets3/include/wx/msw/mslu.h @@ -5,7 +5,6 @@ // Modified by: Vadim Zeitlin to move out various functions to other files // to fix header inter-dependencies // Created: 2002/02/17 -// RCS-ID: $Id: mslu.h 42462 2006-10-26 19:06:51Z VZ $ // Copyright: (c) 2002 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/msvcrt.h b/Externals/wxWidgets3/include/wx/msw/msvcrt.h index 317c41b24c..692f19ef35 100644 --- a/Externals/wxWidgets3/include/wx/msw/msvcrt.h +++ b/Externals/wxWidgets3/include/wx/msw/msvcrt.h @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 31.01.1999 -// RCS-ID: $Id: msvcrt.h 59725 2009-03-22 12:53:48Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/nonownedwnd.h b/Externals/wxWidgets3/include/wx/msw/nonownedwnd.h index 789a836aea..72e3e6b072 100644 --- a/Externals/wxWidgets3/include/wx/msw/nonownedwnd.h +++ b/Externals/wxWidgets3/include/wx/msw/nonownedwnd.h @@ -3,7 +3,6 @@ // Purpose: wxNonOwnedWindow declaration for wxMSW. // Author: Vadim Zeitlin // Created: 2011-10-09 -// RCS-ID: $Id: nonownedwnd.h 69462 2011-10-18 21:56:52Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/notebook.h b/Externals/wxWidgets3/include/wx/msw/notebook.h index bfed8f9794..ceda97127a 100644 --- a/Externals/wxWidgets3/include/wx/msw/notebook.h +++ b/Externals/wxWidgets3/include/wx/msw/notebook.h @@ -3,7 +3,6 @@ // Purpose: MSW/GTK compatible notebook (a.k.a. property sheet) // Author: Robert Roebling // Modified by: Vadim Zeitlin for Windows version -// RCS-ID: $Id: notebook.h 69793 2011-11-22 13:18:45Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/notifmsg.h b/Externals/wxWidgets3/include/wx/msw/notifmsg.h index f995230bd3..b7e0e0e867 100644 --- a/Externals/wxWidgets3/include/wx/msw/notifmsg.h +++ b/Externals/wxWidgets3/include/wx/msw/notifmsg.h @@ -3,7 +3,6 @@ // Purpose: implementation of wxNotificationMessage for Windows // Author: Vadim Zeitlin // Created: 2007-12-01 -// RCS-ID: $Id: notifmsg.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -23,8 +22,9 @@ public: wxNotificationMessage() { Init(); } wxNotificationMessage(const wxString& title, const wxString& message = wxString(), - wxWindow *parent = NULL) - : wxNotificationMessageBase(title, message, parent) + wxWindow *parent = NULL, + int flags = wxICON_INFORMATION) + : wxNotificationMessageBase(title, message, parent, flags) { Init(); } diff --git a/Externals/wxWidgets3/include/wx/msw/ole/access.h b/Externals/wxWidgets3/include/wx/msw/ole/access.h index 0dd88bb4da..980943edb8 100644 --- a/Externals/wxWidgets3/include/wx/msw/ole/access.h +++ b/Externals/wxWidgets3/include/wx/msw/ole/access.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 2003-02-12 -// RCS-ID: $Id: access.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2003 Julian Smart // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/ole/activex.h b/Externals/wxWidgets3/include/wx/msw/ole/activex.h index 2acd893ace..76dca3c36e 100644 --- a/Externals/wxWidgets3/include/wx/msw/ole/activex.h +++ b/Externals/wxWidgets3/include/wx/msw/ole/activex.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 8/18/05 -// RCS-ID: $Id: activex.h 70361 2012-01-15 19:05:34Z SJL $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/ole/automtn.h b/Externals/wxWidgets3/include/wx/msw/ole/automtn.h index 3687aab7d7..a7c5f62a6b 100644 --- a/Externals/wxWidgets3/include/wx/msw/ole/automtn.h +++ b/Externals/wxWidgets3/include/wx/msw/ole/automtn.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 11/6/98 -// RCS-ID: $Id: automtn.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998, Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -21,6 +20,7 @@ typedef void WXIDISPATCH; typedef unsigned short* WXBSTR; +typedef unsigned long WXLCID; #ifdef GetObject #undef GetObject @@ -106,9 +106,21 @@ public: bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs = 0, wxVariant args[] = NULL) const; bool GetObject(wxAutomationObject& obj, const wxString& property, int noArgs, const wxVariant **args) const; -public: + // Returns the locale identifier used in automation calls. The default is + // LOCALE_SYSTEM_DEFAULT. Objects obtained by GetObject() inherit the + // locale identifier from the one that created them. + WXLCID GetLCID() const; + + // Sets the locale identifier to be used in automation calls performed by + // this object. The default is LOCALE_SYSTEM_DEFAULT. + void SetLCID(WXLCID lcid); + +public: // public for compatibility only, don't use m_dispatchPtr directly. WXIDISPATCH* m_dispatchPtr; +private: + WXLCID m_lcid; + wxDECLARE_NO_COPY_CLASS(wxAutomationObject); }; diff --git a/Externals/wxWidgets3/include/wx/msw/ole/dataform.h b/Externals/wxWidgets3/include/wx/msw/ole/dataform.h index 45e0e5e6d0..8ad64542d2 100644 --- a/Externals/wxWidgets3/include/wx/msw/ole/dataform.h +++ b/Externals/wxWidgets3/include/wx/msw/ole/dataform.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.10.99 (extracted from msw/ole/dataobj.h) -// RCS-ID: $Id: dataform.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/ole/dataobj.h b/Externals/wxWidgets3/include/wx/msw/ole/dataobj.h index 4bbd1c1b36..cc1002766a 100644 --- a/Externals/wxWidgets3/include/wx/msw/ole/dataobj.h +++ b/Externals/wxWidgets3/include/wx/msw/ole/dataobj.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 10.05.98 -// RCS-ID: $Id: dataobj.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/ole/dataobj2.h b/Externals/wxWidgets3/include/wx/msw/ole/dataobj2.h index 34ca81437f..9b97e9fb0a 100644 --- a/Externals/wxWidgets3/include/wx/msw/ole/dataobj2.h +++ b/Externals/wxWidgets3/include/wx/msw/ole/dataobj2.h @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 21.10.99 -// RCS-ID: $Id: dataobj2.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/ole/dropsrc.h b/Externals/wxWidgets3/include/wx/msw/ole/dropsrc.h index cf8fcf4fac..1c5f692702 100644 --- a/Externals/wxWidgets3/include/wx/msw/ole/dropsrc.h +++ b/Externals/wxWidgets3/include/wx/msw/ole/dropsrc.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 06.03.98 -// RCS-ID: $Id: dropsrc.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/ole/droptgt.h b/Externals/wxWidgets3/include/wx/msw/ole/droptgt.h index 9f815330cb..4cb9d3907d 100644 --- a/Externals/wxWidgets3/include/wx/msw/ole/droptgt.h +++ b/Externals/wxWidgets3/include/wx/msw/ole/droptgt.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 06.03.98 -// RCS-ID: $Id: droptgt.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -19,6 +18,7 @@ // ---------------------------------------------------------------------------- class wxIDropTarget; +struct wxIDropTargetHelper; struct IDataObject; // ---------------------------------------------------------------------------- @@ -60,12 +60,26 @@ public: // GetData() when it's called from inside OnData() void MSWSetDataSource(IDataObject *pIDataSource); + // These functions take care of all things necessary to support native drag + // images. + // + // {Init,End}DragImageSupport() are called during Register/Revoke, + // UpdateDragImageOnXXX() functions are called on the corresponding drop + // target events. + void MSWInitDragImageSupport(); + void MSWEndDragImageSupport(); + void MSWUpdateDragImageOnData(wxCoord x, wxCoord y, wxDragResult res); + void MSWUpdateDragImageOnDragOver(wxCoord x, wxCoord y, wxDragResult res); + void MSWUpdateDragImageOnEnter(wxCoord x, wxCoord y, wxDragResult res); + void MSWUpdateDragImageOnLeave(); + private: // helper used by IsAcceptedData() and GetData() wxDataFormat MSWGetSupportedFormat(IDataObject *pIDataSource) const; - wxIDropTarget *m_pIDropTarget; // the pointer to our COM interface - IDataObject *m_pIDataSource; // the pointer to the source data object + wxIDropTarget *m_pIDropTarget; // the pointer to our COM interface + IDataObject *m_pIDataSource; // the pointer to the source data object + wxIDropTargetHelper *m_dropTargetHelper; // the drop target helper wxDECLARE_NO_COPY_CLASS(wxDropTarget); }; diff --git a/Externals/wxWidgets3/include/wx/msw/ole/oleutils.h b/Externals/wxWidgets3/include/wx/msw/ole/oleutils.h index dffb3b266e..1c25d36926 100644 --- a/Externals/wxWidgets3/include/wx/msw/ole/oleutils.h +++ b/Externals/wxWidgets3/include/wx/msw/ole/oleutils.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.02.1998 -// RCS-ID: $Id: oleutils.h 70162 2011-12-29 11:26:05Z SN $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -50,7 +49,7 @@ inline bool wxOleInitialize() // needs non-default mode. if ( hr != RPC_E_CHANGED_MODE && FAILED(hr) ) { - wxLogError(_("Cannot initialize OLE")); + wxLogError(wxGetTranslation("Cannot initialize OLE")); return false; } @@ -192,7 +191,7 @@ private: // VZ: I don't know it's not done for compilers other than VC++ but I leave it // as is. Please note, though, that tracing OLE interface calls may be // incredibly useful when debugging OLE programs. -#if defined(__WXDEBUG__) && ( ( defined(__VISUALC__) && (__VISUALC__ >= 1000) ) || defined(__MWERKS__) ) +#if defined(__WXDEBUG__) && (( defined(__VISUALC__) && (__VISUALC__ >= 1000) )) // ---------------------------------------------------------------------------- // All OLE specific log functions have DebugTrace level (as LogTrace) // ---------------------------------------------------------------------------- @@ -237,6 +236,87 @@ private: // Convert variants class WXDLLIMPEXP_FWD_BASE wxVariant; +// wrapper for CURRENCY type used in VARIANT (VARIANT.vt == VT_CY) +class WXDLLIMPEXP_CORE wxVariantDataCurrency : public wxVariantData +{ +public: + wxVariantDataCurrency() { VarCyFromR8(0.0, &m_value); } + wxVariantDataCurrency(CURRENCY value) { m_value = value; } + + CURRENCY GetValue() const { return m_value; } + void SetValue(CURRENCY value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; + +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; + + wxVariantData* Clone() const { return new wxVariantDataCurrency(m_value); } + virtual wxString GetType() const { return wxS("currency"); } + + DECLARE_WXANY_CONVERSION() + +private: + CURRENCY m_value; +}; + + +// wrapper for SCODE type used in VARIANT (VARIANT.vt == VT_ERROR) +class WXDLLIMPEXP_CORE wxVariantDataErrorCode : public wxVariantData +{ +public: + wxVariantDataErrorCode(SCODE value = S_OK) { m_value = value; } + + SCODE GetValue() const { return m_value; } + void SetValue(SCODE value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; + +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; + + wxVariantData* Clone() const { return new wxVariantDataErrorCode(m_value); } + virtual wxString GetType() const { return wxS("errorcode"); } + + DECLARE_WXANY_CONVERSION() + +private: + SCODE m_value; +}; + +// wrapper for SAFEARRAY, used for passing multidimensional arrays in wxVariant +class WXDLLIMPEXP_CORE wxVariantDataSafeArray : public wxVariantData +{ +public: + wxEXPLICIT wxVariantDataSafeArray(SAFEARRAY* value = NULL) + { + m_value = value; + } + + SAFEARRAY* GetValue() const { return m_value; } + void SetValue(SAFEARRAY* value) { m_value = value; } + + virtual bool Eq(wxVariantData& data) const; + +#if wxUSE_STD_IOSTREAM + virtual bool Write(wxSTD ostream& str) const; +#endif + virtual bool Write(wxString& str) const; + + wxVariantData* Clone() const { return new wxVariantDataSafeArray(m_value); } + virtual wxString GetType() const { return wxS("safearray"); } + + DECLARE_WXANY_CONVERSION() + +private: + SAFEARRAY* m_value; +}; + + WXDLLIMPEXP_CORE bool wxConvertVariantToOle(const wxVariant& variant, VARIANTARG& oleVariant); WXDLLIMPEXP_CORE bool wxConvertOleToVariant(const VARIANTARG& oleVariant, wxVariant& variant); #endif // wxUSE_VARIANT diff --git a/Externals/wxWidgets3/include/wx/msw/ole/safearray.h b/Externals/wxWidgets3/include/wx/msw/ole/safearray.h new file mode 100644 index 0000000000..04dc335fdc --- /dev/null +++ b/Externals/wxWidgets3/include/wx/msw/ole/safearray.h @@ -0,0 +1,394 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: msw/ole/safearray.h +// Purpose: Helpers for working with OLE SAFEARRAYs. +// Author: PB +// Created: 2012-09-23 +// Copyright: (c) 2012 wxWidgets development team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _MSW_OLE_SAFEARRAY_H_ +#define _MSW_OLE_SAFEARRAY_H_ + +#include "wx/msw/ole/oleutils.h" + +#if wxUSE_OLE && wxUSE_VARIANT + +/* + wxSafeArray is wxWidgets wrapper for working with MS Windows SAFEARRAYs. + It also has convenience functions for converting between SAFEARRAY + and wxVariant with list type or wxArrayString. +*/ + +// The base class with type-independent methods. It exists solely in order to +// reduce the template bloat. +class WXDLLIMPEXP_CORE wxSafeArrayBase +{ +public: + // If owns a SAFEARRAY, it's unlocked and destroyed. + virtual ~wxSafeArrayBase() { Destroy(); } + + // Unlocks and destroys the owned SAFEARRAY. + void Destroy(); + + // Unlocks the owned SAFEARRAY, returns it and gives up its ownership. + SAFEARRAY* Detach(); + + // Returns true if has a valid SAFEARRAY. + bool HasArray() const { return m_array != NULL; } + + // Returns the number of dimensions. + size_t GetDim() const; + + // Returns lower bound for dimension dim in bound. Dimensions start at 1. + bool GetLBound(size_t dim, long& bound) const; + + // Returns upper bound for dimension dim in bound. Dimensions start at 1. + bool GetUBound(size_t dim, long& bound) const; + + // Returns element count for dimension dim. Dimensions start at 1. + size_t GetCount(size_t dim) const; + +protected: + // Default constructor, protected so the class can't be used on its own, + // it's only used as a base class of wxSafeArray<>. + wxSafeArrayBase() + { + m_array = NULL; + } + + bool Lock(); + bool Unlock(); + + SAFEARRAY* m_array; +}; + +// wxSafeArrayConvertor<> must be specialized for the type in order to allow +// using it with wxSafeArray<>. +// +// We specialize it below for the standard types. +template +struct wxSafeArrayConvertor {}; + +/** + Macro for specializing wxSafeArrayConvertor for simple types. + + The template parameters are: + - externType: basic C data type, e.g. wxFloat64 or wxInt32 + - varType: corresponding VARIANT type constant, e.g. VT_R8 or VT_I4. +*/ +#define wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(externType, varType) \ +template <> \ +struct wxSafeArrayConvertor \ +{ \ + typedef externType externT; \ + typedef externT internT; \ + static bool ToArray(const externT& from, internT& to) \ + { \ + to = from; \ + return true; \ + } \ + static bool FromArray(const internT& from, externT& to) \ + { \ + to = from; \ + return true; \ + } \ +} + +wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxInt16, VT_I2); +wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxInt32, VT_I4); +wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxFloat32, VT_R4); +wxSPECIALIZE_WXSAFEARRAY_CONVERTOR_SIMPLE(wxFloat64, VT_R8); + +// Specialization for VT_BSTR using wxString. +template <> +struct wxSafeArrayConvertor +{ + typedef wxString externT; + typedef BSTR internT; + + static bool ToArray(const wxString& from, BSTR& to) + { + BSTR bstr = wxConvertStringToOle(from); + + if ( !bstr && !from.empty() ) + { + // BSTR can be NULL for empty strings but if the string was + // not empty, it means we failed to allocate memory for it. + return false; + } + to = bstr; + return true; + } + + static bool FromArray(const BSTR from, wxString& to) + { + to = wxConvertStringFromOle(from); + return true; + } +}; + +// Specialization for VT_VARIANT using wxVariant. +template <> +struct wxSafeArrayConvertor +{ + typedef wxVariant externT; + typedef VARIANT internT; + + static bool ToArray(const wxVariant& from, VARIANT& to) + { + return wxConvertVariantToOle(from, to); + } + + static bool FromArray(const VARIANT& from, wxVariant& to) + { + return wxConvertOleToVariant(from, to); + } +}; + + +template +class wxSafeArray : public wxSafeArrayBase +{ +public: + typedef wxSafeArrayConvertor Convertor; + typedef typename Convertor::internT internT; + typedef typename Convertor::externT externT; + + // Default constructor. + wxSafeArray() + { + m_array = NULL; + } + + // Creates and locks a zero-based one-dimensional SAFEARRAY with the given + // number of elements. + bool Create(size_t count) + { + SAFEARRAYBOUND bound; + + bound.lLbound = 0; + bound.cElements = count; + return Create(&bound, 1); + } + + // Creates and locks a SAFEARRAY. See SafeArrayCreate() in MSDN + // documentation for more information. + bool Create(SAFEARRAYBOUND* bound, size_t dimensions) + { + wxCHECK_MSG( !m_array, false, wxS("Can't be created twice") ); + + m_array = SafeArrayCreate(varType, dimensions, bound); + if ( !m_array ) + return false; + + return Lock(); + } + + /** + Creates a 0-based one-dimensional SAFEARRAY from wxVariant with the + list type. + + Can be called only for wxSafeArray. + */ + bool CreateFromListVariant(const wxVariant& variant) + { + wxCHECK(varType == VT_VARIANT, false); + wxCHECK(variant.GetType() == wxS("list"), false); + + if ( !Create(variant.GetCount()) ) + return false; + + VARIANT* data = static_cast(m_array->pvData); + + for ( size_t i = 0; i < variant.GetCount(); i++) + { + if ( !Convertor::ToArray(variant[i], data[i]) ) + return false; + } + return true; + } + + /** + Creates a 0-based one-dimensional SAFEARRAY from wxArrayString. + + Can be called only for wxSafeArray. + */ + bool CreateFromArrayString(const wxArrayString& strings) + { + wxCHECK(varType == VT_BSTR, false); + + if ( !Create(strings.size()) ) + return false; + + BSTR* data = static_cast(m_array->pvData); + + for ( size_t i = 0; i < strings.size(); i++ ) + { + if ( !Convertor::ToArray(strings[i], data[i]) ) + return false; + } + return true; + } + + /** + Attaches and locks an existing SAFEARRAY. + The array must have the same VARTYPE as this wxSafeArray was + instantiated with. + */ + bool Attach(SAFEARRAY* array) + { + wxCHECK_MSG(!m_array && array, false, + wxS("Can only attach a valid array to an uninitialized one") ); + + VARTYPE vt; + HRESULT hr = SafeArrayGetVartype(array, &vt); + if ( FAILED(hr) ) + { + wxLogApiError(wxS("SafeArrayGetVarType()"), hr); + return false; + } + + wxCHECK_MSG(vt == varType, false, + wxS("Attaching array of invalid type")); + + m_array = array; + return Lock(); + } + + /** + Indices have the same row-column order as rgIndices in + SafeArrayPutElement(), i.e. they follow BASIC rules, NOT C ones. + */ + bool SetElement(long* indices, const externT& element) + { + wxCHECK_MSG( m_array, false, wxS("Uninitialized array") ); + wxCHECK_MSG( indices, false, wxS("Invalid index") ); + + internT* data; + + if ( FAILED( SafeArrayPtrOfIndex(m_array, indices, (void**)&data) ) ) + return false; + + return Convertor::ToArray(element, *data); + } + + /** + Indices have the same row-column order as rgIndices in + SafeArrayPutElement(), i.e. they follow BASIC rules, NOT C ones. + */ + bool GetElement(long* indices, externT& element) const + { + wxCHECK_MSG( m_array, false, wxS("Uninitialized array") ); + wxCHECK_MSG( indices, false, wxS("Invalid index") ); + + internT* data; + + if ( FAILED( SafeArrayPtrOfIndex(m_array, indices, (void**)&data) ) ) + return false; + + return Convertor::FromArray(*data, element); + } + + /** + Converts the array to a wxVariant with the list type, regardless of the + underlying SAFEARRAY type. + + If the array is multidimensional, it is flattened using the alghoritm + originally employed in wxConvertOleToVariant(). + */ + bool ConvertToVariant(wxVariant& variant) const + { + wxCHECK_MSG( m_array, false, wxS("Uninitialized array") ); + + size_t dims = m_array->cDims; + size_t count = 1; + + for ( size_t i = 0; i < dims; i++ ) + count *= m_array->rgsabound[i].cElements; + + const internT* data = static_cast(m_array->pvData); + externT element; + + variant.ClearList(); + for ( size_t i1 = 0; i1 < count; i1++ ) + { + if ( !Convertor::FromArray(data[i1], element) ) + { + variant.ClearList(); + return false; + } + variant.Append(element); + } + return true; + } + + /** + Converts an array to an ArrayString. + + Can be called only for wxSafeArray. If the array is + multidimensional, it is flattened using the alghoritm originally + employed in wxConvertOleToVariant(). + */ + bool ConvertToArrayString(wxArrayString& strings) const + { + wxCHECK_MSG( m_array, false, wxS("Uninitialized array") ); + wxCHECK(varType == VT_BSTR, false); + + size_t dims = m_array->cDims; + size_t count = 1; + + for ( size_t i = 0; i < dims; i++ ) + count *= m_array->rgsabound[i].cElements; + + const BSTR* data = static_cast(m_array->pvData); + wxString element; + + strings.clear(); + strings.reserve(count); + for ( size_t i1 = 0; i1 < count; i1++ ) + { + if ( !Convertor::FromArray(data[i1], element) ) + { + strings.clear(); + return false; + } + strings.push_back(element); + } + return true; + } + + static bool ConvertToVariant(SAFEARRAY* psa, wxVariant& variant) + { + wxSafeArray sa; + bool result = false; + + if ( sa.Attach(psa) ) + result = sa.ConvertToVariant(variant); + + if ( sa.HasArray() ) + sa.Detach(); + + return result; + } + + static bool ConvertToArrayString(SAFEARRAY* psa, wxArrayString& strings) + { + wxSafeArray sa; + bool result = false; + + if ( sa.Attach(psa) ) + result = sa.ConvertToArrayString(strings); + + if ( sa.HasArray() ) + sa.Detach(); + + return result; + } + + wxDECLARE_NO_COPY_TEMPLATE_CLASS(wxSafeArray, varType); +}; + +#endif // wxUSE_OLE && wxUSE_VARIANT + +#endif // _MSW_OLE_SAFEARRAY_H_ diff --git a/Externals/wxWidgets3/include/wx/msw/ole/uuid.h b/Externals/wxWidgets3/include/wx/msw/ole/uuid.h index c1753bb5ee..2408450611 100644 --- a/Externals/wxWidgets3/include/wx/msw/ole/uuid.h +++ b/Externals/wxWidgets3/include/wx/msw/ole/uuid.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 11.07.97 -// RCS-ID: $Id: uuid.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence // diff --git a/Externals/wxWidgets3/include/wx/msw/ownerdrw.h b/Externals/wxWidgets3/include/wx/msw/ownerdrw.h index a8a67ca96f..789a7f2d77 100644 --- a/Externals/wxWidgets3/include/wx/msw/ownerdrw.h +++ b/Externals/wxWidgets3/include/wx/msw/ownerdrw.h @@ -4,7 +4,6 @@ // Author: Marcin Malich // Modified by: // Created: 2009-09-22 -// RCS-ID: $Id: ownerdrw.h 63220 2010-01-23 13:21:12Z VZ $ // Copyright: (c) 2009 Marcin Malich // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/palette.h b/Externals/wxWidgets3/include/wx/msw/palette.h index 35560e6012..78477b4320 100644 --- a/Externals/wxWidgets3/include/wx/msw/palette.h +++ b/Externals/wxWidgets3/include/wx/msw/palette.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: palette.h 70040 2011-12-17 23:52:47Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/panel.h b/Externals/wxWidgets3/include/wx/msw/panel.h index 9a2ab283c1..4762bef191 100644 --- a/Externals/wxWidgets3/include/wx/msw/panel.h +++ b/Externals/wxWidgets3/include/wx/msw/panel.h @@ -3,7 +3,6 @@ // Purpose: wxMSW-specific wxPanel class. // Author: Vadim Zeitlin // Created: 2011-03-18 -// RCS-ID: $Id: panel.h 70098 2011-12-23 05:59:59Z PC $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/pen.h b/Externals/wxWidgets3/include/wx/msw/pen.h index b55df15962..cb68780b43 100644 --- a/Externals/wxWidgets3/include/wx/msw/pen.h +++ b/Externals/wxWidgets3/include/wx/msw/pen.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Vadim Zeitlin: fixed operator=(), ==(), !=() // Created: 01/02/97 -// RCS-ID: $Id: pen.h 54273 2008-06-17 17:28:26Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/popupwin.h b/Externals/wxWidgets3/include/wx/msw/popupwin.h index eb45b36d2a..d95c1dabc0 100644 --- a/Externals/wxWidgets3/include/wx/msw/popupwin.h +++ b/Externals/wxWidgets3/include/wx/msw/popupwin.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 06.01.01 -// RCS-ID: $Id: popupwin.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) 2001 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -26,6 +25,7 @@ public: bool Create(wxWindow *parent, int flags = wxBORDER_NONE); + virtual void SetFocus(); virtual bool Show(bool show = true); // return the style to be used for the popup windows diff --git a/Externals/wxWidgets3/include/wx/msw/printdlg.h b/Externals/wxWidgets3/include/wx/msw/printdlg.h index a8362bdd06..2955b89b3c 100644 --- a/Externals/wxWidgets3/include/wx/msw/printdlg.h +++ b/Externals/wxWidgets3/include/wx/msw/printdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: printdlg.h 70636 2012-02-20 21:55:55Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/printwin.h b/Externals/wxWidgets3/include/wx/msw/printwin.h index d594083c97..e5ef80b043 100644 --- a/Externals/wxWidgets3/include/wx/msw/printwin.h +++ b/Externals/wxWidgets3/include/wx/msw/printwin.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: printwin.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/private.h b/Externals/wxWidgets3/include/wx/msw/private.h index 75f5c65382..0f966b841b 100644 --- a/Externals/wxWidgets3/include/wx/msw/private.h +++ b/Externals/wxWidgets3/include/wx/msw/private.h @@ -6,7 +6,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: private.h 69758 2011-11-14 12:51:53Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -169,9 +168,9 @@ extern LONG APIENTRY _EXPORT // This one is a macro so that it can be tested with #ifdef, it will be // undefined if it cannot be implemented for a given compiler. -// Vc++, bcc, dmc, ow, mingw, codewarrior (and rsxnt) have _get_osfhandle. -// Cygwin has get_osfhandle. Others are currently unknown, e.g. Salford, -// Intel, Visual Age. +// Vc++, bcc, dmc, ow, mingw akk have _get_osfhandle() and Cygwin has +// get_osfhandle. Others are currently unknown, e.g. Salford, Intel, Visual +// Age. #if defined(__WXWINCE__) #define wxGetOSFHandle(fd) ((HANDLE)fd) #define wxOpenOSFHandle(h, flags) ((int)wxPtrToUInt(h)) @@ -181,8 +180,7 @@ extern LONG APIENTRY _EXPORT || defined(__BORLANDC__) \ || defined(__DMC__) \ || defined(__WATCOMC__) \ - || defined(__MINGW32__) \ - || (defined(__MWERKS__) && defined(__MSL__)) + || defined(__MINGW32__) #define wxGetOSFHandle(fd) ((HANDLE)_get_osfhandle(fd)) #define wxOpenOSFHandle(h, flags) (_open_osfhandle(wxPtrToUInt(h), flags)) #define wx_fdopen _fdopen @@ -219,6 +217,21 @@ struct WinStruct : public T }; +// Macros for converting wxString to the type expected by API functions. +// +// Normally it is enough to just use wxString::t_str() which is implicitly +// convertible to LPCTSTR, but in some cases an explicit conversion is required. +// +// In such cases wxMSW_CONV_LPCTSTR() should be used. But if an API function +// takes a non-const pointer, wxMSW_CONV_LPTSTR() which casts away the +// constness (but doesn't make it possible to really modify the returned +// pointer, of course) should be used. And if a string is passed as LPARAM, use +// wxMSW_CONV_LPARAM() which does the required ugly reinterpret_cast<> too. +#define wxMSW_CONV_LPCTSTR(s) static_cast((s).t_str()) +#define wxMSW_CONV_LPTSTR(s) const_cast(wxMSW_CONV_LPCTSTR(s)) +#define wxMSW_CONV_LPARAM(s) reinterpret_cast(wxMSW_CONV_LPCTSTR(s)) + + #if wxUSE_GUI #include "wx/gdicmn.h" @@ -418,8 +431,9 @@ private: class WindowHDC { public: + WindowHDC() : m_hwnd(NULL), m_hdc(NULL) { } WindowHDC(HWND hwnd) { m_hdc = ::GetDC(m_hwnd = hwnd); } - ~WindowHDC() { ::ReleaseDC(m_hwnd, m_hdc); } + ~WindowHDC() { if ( m_hwnd && m_hdc ) { ::ReleaseDC(m_hwnd, m_hdc); } } operator HDC() const { return m_hdc; } @@ -781,7 +795,7 @@ public: { if ( IsRegistered() ) { - if ( !::UnregisterClass(m_clsname.wx_str(), wxGetInstance()) ) + if ( !::UnregisterClass(m_clsname.t_str(), wxGetInstance()) ) { wxLogLastError(wxT("UnregisterClass")); } @@ -917,7 +931,7 @@ enum wxWinVersion WXDLLIMPEXP_BASE wxWinVersion wxGetWinVersion(); -#if wxUSE_GUI +#if wxUSE_GUI && defined(__WXMSW__) // cursor stuff extern HCURSOR wxGetCurrentBusyCursor(); // from msw/utils.cpp @@ -1054,6 +1068,6 @@ inline void *wxSetWindowUserData(HWND hwnd, void *data) #endif // __WIN64__/__WIN32__ -#endif // wxUSE_GUI +#endif // wxUSE_GUI && __WXMSW__ #endif // _WX_PRIVATE_H_ diff --git a/Externals/wxWidgets3/include/wx/msw/private/button.h b/Externals/wxWidgets3/include/wx/msw/private/button.h index c45bcf167a..9f605c66a3 100644 --- a/Externals/wxWidgets3/include/wx/msw/private/button.h +++ b/Externals/wxWidgets3/include/wx/msw/private/button.h @@ -3,7 +3,6 @@ // Purpose: helper functions used with native BUTTON control // Author: Vadim Zeitlin // Created: 2008-06-07 -// RCS-ID: $Id: button.h 68922 2011-08-27 14:11:28Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/private/comptr.h b/Externals/wxWidgets3/include/wx/msw/private/comptr.h new file mode 100644 index 0000000000..194cf54f90 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/msw/private/comptr.h @@ -0,0 +1,129 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/comptr.h +// Purpose: Smart pointer for COM interfaces. +// Author: PB +// Created: 2012-04-16 +// Copyright: (c) 2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_COMPTR_H_ +#define _WX_MSW_PRIVATE_COMPTR_H_ + +// ---------------------------------------------------------------------------- +// wxCOMPtr: A minimalistic smart pointer for use with COM interfaces. +// ---------------------------------------------------------------------------- + +template +class wxCOMPtr +{ +public: + typedef T element_type; + + wxCOMPtr() + : m_ptr(NULL) + { + } + + wxEXPLICIT wxCOMPtr(T* ptr) + : m_ptr(ptr) + { + if ( m_ptr ) + m_ptr->AddRef(); + } + + wxCOMPtr(const wxCOMPtr& ptr) + : m_ptr(ptr.get()) + { + if ( m_ptr ) + m_ptr->AddRef(); + } + + ~wxCOMPtr() + { + if ( m_ptr ) + m_ptr->Release(); + } + + void reset(T* ptr = NULL) + { + if ( m_ptr != ptr) + { + if ( ptr ) + ptr->AddRef(); + if ( m_ptr ) + m_ptr->Release(); + m_ptr = ptr; + } + } + + wxCOMPtr& operator=(const wxCOMPtr& ptr) + { + reset(ptr.get()); + return *this; + } + + wxCOMPtr& operator=(T* ptr) + { + reset(ptr); + return *this; + } + + operator T*() const + { + return m_ptr; + } + + T& operator*() const + { + return *m_ptr; + } + + T* operator->() const + { + return m_ptr; + } + + // It would be better to forbid direct access completely but we do need + // for QueryInterface() and similar functions, so provide it but it can + // only be used to initialize the pointer, not to modify an existing one. + T** operator&() + { + wxASSERT_MSG(!m_ptr, + wxS("Can't get direct access to initialized pointer")); + + return &m_ptr; + } + + T* get() const + { + return m_ptr; + } + + bool operator<(T* ptr) const + { + return get() < ptr; + } + +private: + T* m_ptr; +}; + +// Define a helper for the macro below: we just need a function taking a +// pointer and not returning anything to avoid warnings about unused return +// value of the cast in the macro itself. +namespace wxPrivate { inline void PPV_ARGS_CHECK(void*) { } } + +// Takes the interface name and a pointer to a pointer of the interface type +// and expands into the IID of this interface and the same pointer but after a +// type-safety check. +// +// This is similar to the standard IID_PPV_ARGS macro but takes the pointer +// type instead of relying on the non-standard Microsoft __uuidof(). +#define wxIID_PPV_ARGS(IType, pType) \ + IID_##IType, \ + (wxPrivate::PPV_ARGS_CHECK(static_cast(*pType)), \ + reinterpret_cast(pType)) + +#endif // _WX_MSW_PRIVATE_COMPTR_H_ + diff --git a/Externals/wxWidgets3/include/wx/msw/private/datecontrols.h b/Externals/wxWidgets3/include/wx/msw/private/datecontrols.h index 4c8324b87c..9794cfae89 100644 --- a/Externals/wxWidgets3/include/wx/msw/private/datecontrols.h +++ b/Externals/wxWidgets3/include/wx/msw/private/datecontrols.h @@ -3,7 +3,6 @@ // Purpose: implementation helpers for wxDatePickerCtrl and wxCalendarCtrl // Author: Vadim Zeitlin // Created: 2008-04-04 -// RCS-ID: $Id: datecontrols.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/private/dc.h b/Externals/wxWidgets3/include/wx/msw/private/dc.h index c3efeb2537..303cd19df6 100644 --- a/Externals/wxWidgets3/include/wx/msw/private/dc.h +++ b/Externals/wxWidgets3/include/wx/msw/private/dc.h @@ -3,7 +3,6 @@ // Purpose: private wxMSW helpers for working with HDCs // Author: Vadim Zeitlin // Created: 2009-06-16 (extracted from src/msw/dc.cpp) -// RCS-ID: $Id: dc.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/private/fswatcher.h b/Externals/wxWidgets3/include/wx/msw/private/fswatcher.h index f5ef3bbd38..86f91dc3d0 100644 --- a/Externals/wxWidgets3/include/wx/msw/private/fswatcher.h +++ b/Externals/wxWidgets3/include/wx/msw/private/fswatcher.h @@ -3,7 +3,6 @@ // Purpose: File system watcher impl classes // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id: fswatcher.h 67806 2011-05-28 19:35:13Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/private/hiddenwin.h b/Externals/wxWidgets3/include/wx/msw/private/hiddenwin.h index 7f592e2e2e..3b52b60983 100644 --- a/Externals/wxWidgets3/include/wx/msw/private/hiddenwin.h +++ b/Externals/wxWidgets3/include/wx/msw/private/hiddenwin.h @@ -3,7 +3,6 @@ // Purpose: Helper for creating a hidden window used by wxMSW internally. // Author: Vadim Zeitlin // Created: 2011-09-16 -// RCS-ID: $Id: hiddenwin.h 69170 2011-09-21 15:07:32Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/private/keyboard.h b/Externals/wxWidgets3/include/wx/msw/private/keyboard.h index 5817e09911..002303e967 100644 --- a/Externals/wxWidgets3/include/wx/msw/private/keyboard.h +++ b/Externals/wxWidgets3/include/wx/msw/private/keyboard.h @@ -3,7 +3,6 @@ // Purpose: Helper keyboard-related functions. // Author: Vadim Zeitlin // Created: 2010-09-09 -// RCS-ID: $Id: keyboard.h 65590 2010-09-22 13:31:41Z VZ $ // Copyright: (c) 2010 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/private/metrics.h b/Externals/wxWidgets3/include/wx/msw/private/metrics.h index bab56ec9eb..0e1b41deb5 100644 --- a/Externals/wxWidgets3/include/wx/msw/private/metrics.h +++ b/Externals/wxWidgets3/include/wx/msw/private/metrics.h @@ -3,7 +3,6 @@ // Purpose: various helper functions to retrieve system metrics // Author: Vadim Zeitlin // Created: 2008-09-05 -// RCS-ID: $Id: metrics.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/private/msgdlg.h b/Externals/wxWidgets3/include/wx/msw/private/msgdlg.h index 9598f7fc11..e8946503be 100644 --- a/Externals/wxWidgets3/include/wx/msw/private/msgdlg.h +++ b/Externals/wxWidgets3/include/wx/msw/private/msgdlg.h @@ -3,7 +3,6 @@ // Purpose: helper functions used with native message dialog // Author: Rickard Westerlund // Created: 2010-07-12 -// RCS-ID: $Id: msgdlg.h 68537 2011-08-04 22:53:42Z VZ $ // Copyright: (c) 2010 wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -19,10 +18,7 @@ // by the task dialogs only. Also notice that task dialogs are available for // Unicode applications only. #if defined(TD_WARNING_ICON) && wxUSE_UNICODE -// (shuffle2) This is turned off because as of wxW svn r70933, -// there is a bug with the wxPD_AUTO_HIDE style which can cause a non-dolphin -// window to come to the foreground after auto-closing of the TaskDialog. -// #define wxHAS_MSW_TASKDIALOG + #define wxHAS_MSW_TASKDIALOG #endif // Provides methods for creating a task dialog. diff --git a/Externals/wxWidgets3/include/wx/msw/private/pipestream.h b/Externals/wxWidgets3/include/wx/msw/private/pipestream.h new file mode 100644 index 0000000000..ba6d032bea --- /dev/null +++ b/Externals/wxWidgets3/include/wx/msw/private/pipestream.h @@ -0,0 +1,50 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/pipestream.h +// Purpose: MSW wxPipeInputStream and wxPipeOutputStream declarations +// Author: Vadim Zeitlin +// Created: 2013-06-08 (extracted from src/msw/utilsexc.cpp) +// Copyright: (c) 2013 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_PIPESTREAM_H_ +#define _WX_MSW_PRIVATE_PIPESTREAM_H_ + +class wxPipeInputStream : public wxInputStream +{ +public: + wxEXPLICIT wxPipeInputStream(HANDLE hInput); + virtual ~wxPipeInputStream(); + + // returns true if the pipe is still opened + bool IsOpened() const { return m_hInput != INVALID_HANDLE_VALUE; } + + // returns true if there is any data to be read from the pipe + virtual bool CanRead() const; + +protected: + virtual size_t OnSysRead(void *buffer, size_t len); + +protected: + HANDLE m_hInput; + + wxDECLARE_NO_COPY_CLASS(wxPipeInputStream); +}; + +class wxPipeOutputStream: public wxOutputStream +{ +public: + wxEXPLICIT wxPipeOutputStream(HANDLE hOutput); + virtual ~wxPipeOutputStream() { Close(); } + bool Close(); + +protected: + size_t OnSysWrite(const void *buffer, size_t len); + +protected: + HANDLE m_hOutput; + + wxDECLARE_NO_COPY_CLASS(wxPipeOutputStream); +}; + +#endif // _WX_MSW_PRIVATE_PIPESTREAM_H_ diff --git a/Externals/wxWidgets3/include/wx/msw/private/sockmsw.h b/Externals/wxWidgets3/include/wx/msw/private/sockmsw.h index 92fa1b99fe..e0f550d329 100644 --- a/Externals/wxWidgets3/include/wx/msw/private/sockmsw.h +++ b/Externals/wxWidgets3/include/wx/msw/private/sockmsw.h @@ -6,7 +6,6 @@ // Copyright: (C) 1999-1997, Guilhem Lavaux // (C) 1999-2000, Guillermo Rodriguez Garcia // (C) 2008 Vadim Zeitlin -// RCS_ID: $Id: sockmsw.h 67254 2011-03-20 00:14:35Z DS $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/private/textmeasure.h b/Externals/wxWidgets3/include/wx/msw/private/textmeasure.h new file mode 100644 index 0000000000..ee14751a5b --- /dev/null +++ b/Externals/wxWidgets3/include/wx/msw/private/textmeasure.h @@ -0,0 +1,63 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/msw/private/textmeasure.h +// Purpose: wxMSW-specific declaration of wxTextMeasure class +// Author: Manuel Martin +// Created: 2012-10-05 +// Copyright: (c) 1997-2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_MSW_PRIVATE_TEXTMEASURE_H_ +#define _WX_MSW_PRIVATE_TEXTMEASURE_H_ + +#include "wx/msw/wrapwin.h" + +// ---------------------------------------------------------------------------- +// wxTextMeasure for MSW. +// ---------------------------------------------------------------------------- + +class wxTextMeasure : public wxTextMeasureBase +{ +public: + wxEXPLICIT wxTextMeasure(const wxDC *dc, const wxFont *font = NULL) + : wxTextMeasureBase(dc, font) + { + Init(); + } + + wxEXPLICIT wxTextMeasure(const wxWindow *win, const wxFont *font = NULL) + : wxTextMeasureBase(win, font) + { + Init(); + } + +protected: + void Init(); + + virtual void BeginMeasuring(); + virtual void EndMeasuring(); + + virtual void DoGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL); + + virtual bool DoGetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX); + + + + // We use either the HDC of the provided wxDC or an HDC created for our + // window. + HDC m_hdc; + + // If we change the font in BeginMeasuring(), we restore it to the old one + // in EndMeasuring(). + HFONT m_hfontOld; + + wxDECLARE_NO_COPY_CLASS(wxTextMeasure); +}; + +#endif // _WX_MSW_PRIVATE_TEXTMEASURE_H_ diff --git a/Externals/wxWidgets3/include/wx/msw/private/timer.h b/Externals/wxWidgets3/include/wx/msw/private/timer.h index c45ba1df7e..71ce2ceec7 100644 --- a/Externals/wxWidgets3/include/wx/msw/private/timer.h +++ b/Externals/wxWidgets3/include/wx/msw/private/timer.h @@ -3,7 +3,6 @@ // Purpose: wxTimer class // Author: Julian Smart // Created: 01/02/97 -// RCS-ID: $Id: timer.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/progdlg.h b/Externals/wxWidgets3/include/wx/msw/progdlg.h index 096c89a94d..c63a0b66f8 100644 --- a/Externals/wxWidgets3/include/wx/msw/progdlg.h +++ b/Externals/wxWidgets3/include/wx/msw/progdlg.h @@ -3,7 +3,6 @@ // Purpose: wxProgressDialog // Author: Rickard Westerlund // Created: 2010-07-22 -// RCS-ID: $Id: progdlg.h 69041 2011-09-10 03:26:37Z RD $ // Copyright: (c) 2010 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/radiobox.h b/Externals/wxWidgets3/include/wx/msw/radiobox.h index 4caefafb8f..53620db9b3 100644 --- a/Externals/wxWidgets3/include/wx/msw/radiobox.h +++ b/Externals/wxWidgets3/include/wx/msw/radiobox.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: radiobox.h 70498 2012-02-02 14:26:06Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -97,6 +96,7 @@ public: // override some base class methods virtual bool Show(bool show = true); virtual bool Enable(bool enable = true); + virtual bool CanBeFocused() const; virtual void SetFocus(); virtual bool SetFont(const wxFont& font); virtual bool ContainsHWND(WXHWND hWnd) const; @@ -113,10 +113,6 @@ public: virtual bool Reparent(wxWindowBase *newParent); - // we inherit a version always returning false from wxStaticBox, override - // it to behave normally - virtual bool AcceptsFocus() const { return wxControl::AcceptsFocus(); } - // returns true if the platform should explicitly apply a theme border virtual bool CanApplyThemeBorder() const { return false; } diff --git a/Externals/wxWidgets3/include/wx/msw/radiobut.h b/Externals/wxWidgets3/include/wx/msw/radiobut.h index f7387694e4..4e9af38f70 100644 --- a/Externals/wxWidgets3/include/wx/msw/radiobut.h +++ b/Externals/wxWidgets3/include/wx/msw/radiobut.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: radiobut.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/rcdefs.h b/Externals/wxWidgets3/include/wx/msw/rcdefs.h index 7d963d966a..8b9ac716f9 100644 --- a/Externals/wxWidgets3/include/wx/msw/rcdefs.h +++ b/Externals/wxWidgets3/include/wx/msw/rcdefs.h @@ -2,7 +2,6 @@ // Name: wx/msw/rcdefs.h // Purpose: Fallback for the generated rcdefs.h under the lib directory // Author: Mike Wetherell -// RCS-ID: $Id: rcdefs.h 36133 2005-11-08 22:49:46Z MW $ // Copyright: (c) 2005 Mike Wetherell // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -10,6 +9,33 @@ #ifndef _WX_RCDEFS_H #define _WX_RCDEFS_H -#define WX_CPU_X86 +#ifdef __GNUC__ + // We must be using windres which uses gcc as its preprocessor. We do need + // to generate the manifest then as gcc doesn't do it automatically and we + // can define the architecture macro on our own as all the usual symbols + // are available (unlike with Microsoft RC.EXE which doesn't predefine + // anything useful at all). + #ifndef wxUSE_RC_MANIFEST + #define wxUSE_RC_MANIFEST 1 + #endif + + #if defined __i386__ + #ifndef WX_CPU_X86 + #define WX_CPU_X86 + #endif + #elif defined __x86_64__ + #ifndef WX_CPU_AMD64 + #define WX_CPU_AMD64 + #endif + #elif defined __ia64__ + #ifndef WX_CPU_IA64 + #define WX_CPU_IA64 + #endif + #endif +#endif + +// Don't do anything here for the other compilers, in particular don't define +// WX_CPU_X86 here as we used to do. If people define wxUSE_RC_MANIFEST, they +// must also define the architecture constant correctly. #endif diff --git a/Externals/wxWidgets3/include/wx/msw/regconf.h b/Externals/wxWidgets3/include/wx/msw/regconf.h index 1f20255aa2..ec290ec88c 100644 --- a/Externals/wxWidgets3/include/wx/msw/regconf.h +++ b/Externals/wxWidgets3/include/wx/msw/regconf.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 27.04.98 -// RCS-ID: $Id: regconf.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/region.h b/Externals/wxWidgets3/include/wx/msw/region.h index 4c34c2c4a9..aba0d536dc 100644 --- a/Externals/wxWidgets3/include/wx/msw/region.h +++ b/Externals/wxWidgets3/include/wx/msw/region.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: region.h 57915 2009-01-08 16:43:56Z FM $ // Copyright: (c) 1997-2002 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/registry.h b/Externals/wxWidgets3/include/wx/msw/registry.h index 5f7c8cc7d8..20343a540b 100644 --- a/Externals/wxWidgets3/include/wx/msw/registry.h +++ b/Externals/wxWidgets3/include/wx/msw/registry.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 03.04.1998 -// RCS-ID: $Id: registry.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/richmsgdlg.h b/Externals/wxWidgets3/include/wx/msw/richmsgdlg.h index fb51a75499..20c8eb72da 100644 --- a/Externals/wxWidgets3/include/wx/msw/richmsgdlg.h +++ b/Externals/wxWidgets3/include/wx/msw/richmsgdlg.h @@ -3,7 +3,6 @@ // Purpose: wxRichMessageDialog // Author: Rickard Westerlund // Created: 2010-07-04 -// RCS-ID: $Id: richmsgdlg.h 65349 2010-08-18 22:48:41Z VZ $ // Copyright: (c) 2010 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/scrolbar.h b/Externals/wxWidgets3/include/wx/msw/scrolbar.h index d33150bb16..1b7c86295d 100644 --- a/Externals/wxWidgets3/include/wx/msw/scrolbar.h +++ b/Externals/wxWidgets3/include/wx/msw/scrolbar.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: scrolbar.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/seh.h b/Externals/wxWidgets3/include/wx/msw/seh.h index cf203778e1..a331570d75 100644 --- a/Externals/wxWidgets3/include/wx/msw/seh.h +++ b/Externals/wxWidgets3/include/wx/msw/seh.h @@ -3,7 +3,6 @@ // Purpose: declarations for SEH (structured exceptions handling) support // Author: Vadim Zeitlin // Created: 2006-04-26 -// RCS-ID: $Id: seh.h 60934 2009-06-06 23:27:37Z VZ $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -55,11 +54,11 @@ // as division by 0 or access violation) to C++ pseudo-exceptions extern void wxSETranslator(unsigned int code, EXCEPTION_POINTERS *ep); - // up to VC 9 this warning ("calling _set_se_translator() requires /EHa") + // up to VC 11 this warning ("calling _set_se_translator() requires /EHa") // is harmless and it's easier to suppress it than use different makefiles - // for VC5 and 6 (which don't support /EHa at all) and VC7 (which does + // for VC5 and 6 (which don't support /EHa at all) and VC7+ (which does // accept it but it seems to change nothing for it anyhow) - #if __VISUALC__ < 1600 + #if __VISUALC__ < 1800 #pragma warning(disable: 4535) #endif diff --git a/Externals/wxWidgets3/include/wx/msw/setup0.h b/Externals/wxWidgets3/include/wx/msw/setup0.h index 7b0bf0b25f..f0b2e646cb 100644 --- a/Externals/wxWidgets3/include/wx/msw/setup0.h +++ b/Externals/wxWidgets3/include/wx/msw/setup0.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: setup0.h 69463 2011-10-18 21:57:02Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -151,7 +150,7 @@ // In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If // this causes problems (e.g. link errors), set this to 0. You may need to set // this to 0 if using templates (at least for VC++). This switch is currently -// ignored for mingw / cygwin / CodeWarrior +// ignored for MinGW/Cygwin. // // Default is 0 // @@ -267,6 +266,17 @@ // Recommended setting: 1 if you want to support multiple languages #define wxUSE_PRINTF_POS_PARAMS 1 +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but must +// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using +// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS +// support that results in crashes when any TLS variables are used. So if you +// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set +// this to 0. +// +// Default is 1, but set to 0 if the scenario above is applicable. +#define wxUSE_COMPILER_TLS 1 // ---------------------------------------------------------------------------- // Interoperability with the standard library. @@ -1087,6 +1097,16 @@ // Recommended setting: 1 #define wxUSE_NOTIFICATION_MESSAGE 1 +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + // wxRichToolTip is a customizable tooltip class which has more functionality // than the stock (but native, unlike this class) wxToolTip. // diff --git a/Externals/wxWidgets3/include/wx/msw/setup_inc.h b/Externals/wxWidgets3/include/wx/msw/setup_inc.h index 176796629d..6905a7a8e6 100644 --- a/Externals/wxWidgets3/include/wx/msw/setup_inc.h +++ b/Externals/wxWidgets3/include/wx/msw/setup_inc.h @@ -3,7 +3,6 @@ // Purpose: MSW-specific setup.h options // Author: Vadim Zeitlin // Created: 2007-07-21 (extracted from wx/msw/setup0.h) -// RCS-ID: $Id: setup_inc.h 69224 2011-09-29 13:43:15Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/slider.h b/Externals/wxWidgets3/include/wx/msw/slider.h index 99267d7ca3..a16c5952e0 100644 --- a/Externals/wxWidgets3/include/wx/msw/slider.h +++ b/Externals/wxWidgets3/include/wx/msw/slider.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: slider.h 68230 2011-07-11 22:49:33Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/sound.h b/Externals/wxWidgets3/include/wx/msw/sound.h index f8b1134229..9e7cc49698 100644 --- a/Externals/wxWidgets3/include/wx/msw/sound.h +++ b/Externals/wxWidgets3/include/wx/msw/sound.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: sound.h 69178 2011-09-21 15:08:02Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/spinbutt.h b/Externals/wxWidgets3/include/wx/msw/spinbutt.h index a459911a0d..d50912fbf8 100644 --- a/Externals/wxWidgets3/include/wx/msw/spinbutt.h +++ b/Externals/wxWidgets3/include/wx/msw/spinbutt.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: spinbutt.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/spinctrl.h b/Externals/wxWidgets3/include/wx/msw/spinctrl.h index c1c0f7975d..9250292de0 100644 --- a/Externals/wxWidgets3/include/wx/msw/spinctrl.h +++ b/Externals/wxWidgets3/include/wx/msw/spinctrl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 22.07.99 -// RCS-ID: $Id: spinctrl.h 70799 2012-03-04 00:29:48Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -62,6 +61,11 @@ public: // another wxTextCtrl-like method void SetSelection(long from, long to); + // wxSpinCtrlBase methods + virtual int GetBase() const; + virtual bool SetBase(int base); + + // implementation only from now on // ------------------------------- @@ -111,6 +115,7 @@ 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 wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; virtual void DoGetSize(int *width, int *height) const; virtual void DoGetClientSize(int *x, int *y) const; #if wxUSE_TOOLTIPS @@ -148,6 +153,12 @@ private: // Common part of all ctors. void Init(); + // Adjust the text control style depending on whether we need to enter only + // digits or may need to enter something else (e.g. "-" sign, "x" + // hexadecimal prefix, ...) in it. + void UpdateBuddyStyle(); + + DECLARE_DYNAMIC_CLASS(wxSpinCtrl) DECLARE_EVENT_TABLE() wxDECLARE_NO_COPY_CLASS(wxSpinCtrl); diff --git a/Externals/wxWidgets3/include/wx/msw/stackwalk.h b/Externals/wxWidgets3/include/wx/msw/stackwalk.h index 21a28fbf69..6ff467205e 100644 --- a/Externals/wxWidgets3/include/wx/msw/stackwalk.h +++ b/Externals/wxWidgets3/include/wx/msw/stackwalk.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-08 -// RCS-ID: $Id: stackwalk.h 58093 2009-01-14 14:38:00Z FM $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/statbmp.h b/Externals/wxWidgets3/include/wx/msw/statbmp.h index c9cbcf21fc..165ddb5af1 100644 --- a/Externals/wxWidgets3/include/wx/msw/statbmp.h +++ b/Externals/wxWidgets3/include/wx/msw/statbmp.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: statbmp.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -58,7 +57,7 @@ public: virtual bool CanApplyThemeBorder() const { return false; } protected: - virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetBestClientSize() const; // ctor/dtor helpers void Init() { m_isIcon = true; m_image = NULL; m_currentHandle = 0; } @@ -76,6 +75,7 @@ protected: void DoPaintManually(wxPaintEvent& event); #endif // !__WXWINCE__ + void WXHandleSize(wxSizeEvent& event); // we can have either an icon or a bitmap bool m_isIcon; @@ -86,6 +86,7 @@ protected: private: DECLARE_DYNAMIC_CLASS(wxStaticBitmap) + wxDECLARE_EVENT_TABLE(); wxDECLARE_NO_COPY_CLASS(wxStaticBitmap); }; diff --git a/Externals/wxWidgets3/include/wx/msw/statbox.h b/Externals/wxWidgets3/include/wx/msw/statbox.h index 578bfd7a69..7721ccacb1 100644 --- a/Externals/wxWidgets3/include/wx/msw/statbox.h +++ b/Externals/wxWidgets3/include/wx/msw/statbox.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: statbox.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/statline.h b/Externals/wxWidgets3/include/wx/msw/statline.h index 002f8dc8ce..1d2662b3bb 100644 --- a/Externals/wxWidgets3/include/wx/msw/statline.h +++ b/Externals/wxWidgets3/include/wx/msw/statline.h @@ -3,7 +3,6 @@ // Purpose: MSW version of wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 -// Version: $Id: statline.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/stattext.h b/Externals/wxWidgets3/include/wx/msw/stattext.h index 7fbc8fd83d..9bbcca7141 100644 --- a/Externals/wxWidgets3/include/wx/msw/stattext.h +++ b/Externals/wxWidgets3/include/wx/msw/stattext.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: stattext.h 61169 2009-06-22 20:36:13Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/statusbar.h b/Externals/wxWidgets3/include/wx/msw/statusbar.h index c69be90c93..b1d352a7cc 100644 --- a/Externals/wxWidgets3/include/wx/msw/statusbar.h +++ b/Externals/wxWidgets3/include/wx/msw/statusbar.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 04.04.98 -// RCS-ID: $Id: statusbar.h 70310 2012-01-10 17:01:09Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/stdpaths.h b/Externals/wxWidgets3/include/wx/msw/stdpaths.h index 3ca578d71b..80ad985044 100644 --- a/Externals/wxWidgets3/include/wx/msw/stdpaths.h +++ b/Externals/wxWidgets3/include/wx/msw/stdpaths.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2004-10-19 -// RCS-ID: $Id: stdpaths.h 61662 2009-08-14 00:05:56Z VZ $ // Copyright: (c) 2004 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -19,10 +18,6 @@ class WXDLLIMPEXP_BASE wxStandardPaths : public wxStandardPathsBase { public: - // ctor calls IgnoreAppBuildSubDirs() and also sets up the object to use - // both vendor and application name by default - wxStandardPaths(); - // implement base class pure virtuals virtual wxString GetExecutablePath() const; virtual wxString GetConfigDir() const; @@ -67,6 +62,13 @@ public: static wxString MSWGetShellDir(int csidl); protected: + // Ctor is protected, use wxStandardPaths::Get() instead of instantiating + // objects of this class directly. + // + // It calls IgnoreAppBuildSubDirs() and also sets up the object to use + // both vendor and application name by default. + wxStandardPaths(); + // get the path corresponding to the given standard CSIDL_XXX constant static wxString DoGetDirectory(int csidl); diff --git a/Externals/wxWidgets3/include/wx/msw/subwin.h b/Externals/wxWidgets3/include/wx/msw/subwin.h index cf94679403..9e48b9e35f 100644 --- a/Externals/wxWidgets3/include/wx/msw/subwin.h +++ b/Externals/wxWidgets3/include/wx/msw/subwin.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2004-12-11 -// RCS-ID: $Id: subwin.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) 2004 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/taskbar.h b/Externals/wxWidgets3/include/wx/msw/taskbar.h index 103f8dd82a..c9a4a11ca5 100644 --- a/Externals/wxWidgets3/include/wx/msw/taskbar.h +++ b/Externals/wxWidgets3/include/wx/msw/taskbar.h @@ -5,7 +5,6 @@ // Author: Julian Smart // Modified by: Vaclav Slavik // Created: 24/3/98 -// RCS-ID: $Id: taskbar.h 50586 2007-12-08 20:51:21Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// @@ -21,7 +20,7 @@ class WXDLLIMPEXP_FWD_ADV wxTaskBarIconWindow; class WXDLLIMPEXP_ADV wxTaskBarIcon : public wxTaskBarIconBase { public: - wxTaskBarIcon(); + wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE); virtual ~wxTaskBarIcon(); // Accessors diff --git a/Externals/wxWidgets3/include/wx/msw/textctrl.h b/Externals/wxWidgets3/include/wx/msw/textctrl.h index cbcf8b772e..14265e7983 100644 --- a/Externals/wxWidgets3/include/wx/msw/textctrl.h +++ b/Externals/wxWidgets3/include/wx/msw/textctrl.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: textctrl.h 68450 2011-07-29 15:11:54Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -236,6 +235,7 @@ protected: bool SendUpdateEvent(); virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetSizeFromTextSize(int xlen, int ylen = -1) const; #if wxUSE_RICHEDIT // Apply the character-related parts of wxTextAttr to the given selection diff --git a/Externals/wxWidgets3/include/wx/msw/textentry.h b/Externals/wxWidgets3/include/wx/msw/textentry.h index 3ba6dcb2ea..80b9e23966 100644 --- a/Externals/wxWidgets3/include/wx/msw/textentry.h +++ b/Externals/wxWidgets3/include/wx/msw/textentry.h @@ -3,7 +3,6 @@ // Purpose: wxMSW-specific wxTextEntry implementation // Author: Vadim Zeitlin // Created: 2007-09-26 -// RCS-ID: $Id: textentry.h 68918 2011-08-27 14:11:13Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -75,7 +74,9 @@ protected: // wxUSE_OLE as OleInitialize() is not called then #if wxUSE_OLE virtual bool DoAutoCompleteStrings(const wxArrayString& choices); +#if wxUSE_DYNLIB_CLASS virtual bool DoAutoCompleteFileNames(int flags); +#endif // wxUSE_DYNLIB_CLASS virtual bool DoAutoCompleteCustom(wxTextCompleter *completer); #endif // wxUSE_OLE diff --git a/Externals/wxWidgets3/include/wx/msw/tglbtn.h b/Externals/wxWidgets3/include/wx/msw/tglbtn.h index 7711f70bb6..091978b865 100644 --- a/Externals/wxWidgets3/include/wx/msw/tglbtn.h +++ b/Externals/wxWidgets3/include/wx/msw/tglbtn.h @@ -5,7 +5,6 @@ // Author: John Norris, minor changes by Axel Schlueter // Modified by: // Created: 08.02.01 -// RCS-ID: $Id: tglbtn.h 67931 2011-06-14 13:00:42Z VZ $ // Copyright: (c) 2000 Johnny C. Norris II // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/timectrl.h b/Externals/wxWidgets3/include/wx/msw/timectrl.h index 8fbb70196e..e39528a4e0 100644 --- a/Externals/wxWidgets3/include/wx/msw/timectrl.h +++ b/Externals/wxWidgets3/include/wx/msw/timectrl.h @@ -3,7 +3,6 @@ // Purpose: wxTimePickerCtrl for Windows. // Author: Vadim Zeitlin // Created: 2011-09-22 -// RCS-ID: $Id: timectrl.h 69224 2011-09-29 13:43:15Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/tls.h b/Externals/wxWidgets3/include/wx/msw/tls.h index b42ee7694e..9d46cadf3e 100644 --- a/Externals/wxWidgets3/include/wx/msw/tls.h +++ b/Externals/wxWidgets3/include/wx/msw/tls.h @@ -3,7 +3,6 @@ // Purpose: Win32 implementation of wxTlsValue<> // Author: Vadim Zeitlin // Created: 2008-08-08 -// RCS-ID: $Id: tls.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/toolbar.h b/Externals/wxWidgets3/include/wx/msw/toolbar.h index 1fe458f2aa..0c6b7e9c9a 100644 --- a/Externals/wxWidgets3/include/wx/msw/toolbar.h +++ b/Externals/wxWidgets3/include/wx/msw/toolbar.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: toolbar.h 70854 2012-03-10 00:01:09Z RD $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -27,7 +26,7 @@ public: wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER | wxTB_HORIZONTAL, + long style = wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr) { Init(); @@ -39,7 +38,7 @@ public: wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER | wxTB_HORIZONTAL, + long style = wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr); virtual ~wxToolBar(); @@ -67,6 +66,7 @@ public: void OnMouseEvent(wxMouseEvent& event); void OnSysColourChanged(wxSysColourChangedEvent& event); + void OnEraseBackground(wxEraseEvent& event); void SetFocus() {} diff --git a/Externals/wxWidgets3/include/wx/msw/tooltip.h b/Externals/wxWidgets3/include/wx/msw/tooltip.h index 0a42cb5429..39ffe0d6da 100644 --- a/Externals/wxWidgets3/include/wx/msw/tooltip.h +++ b/Externals/wxWidgets3/include/wx/msw/tooltip.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 31.01.99 -// RCS-ID: $Id: tooltip.h 66053 2010-11-07 13:12:16Z VZ $ // Copyright: (c) 1999 Robert Roebling, Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -60,7 +59,7 @@ public: static void RelayEvent(WXMSG *msg); // add a window to the tooltip control - void Add(WXHWND hwnd); + void AddOtherWindow(WXHWND hwnd); // remove any tooltip from the window static void Remove(WXHWND hwnd, unsigned int id, const wxRect& rc); @@ -72,7 +71,7 @@ public: private: // Adds a window other than our main m_window to this tooltip. - void DoAddOtherWindow(WXHWND hWnd); + void DoAddHWND(WXHWND hWnd); // Perform the specified operation for the given window only. void DoSetTip(WXHWND hWnd); diff --git a/Externals/wxWidgets3/include/wx/msw/toplevel.h b/Externals/wxWidgets3/include/wx/msw/toplevel.h index 55afcbdb17..fd1de18d80 100644 --- a/Externals/wxWidgets3/include/wx/msw/toplevel.h +++ b/Externals/wxWidgets3/include/wx/msw/toplevel.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 20.09.01 -// RCS-ID: $Id: toplevel.h 70881 2012-03-12 11:42:49Z JS $ // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com) // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -122,6 +121,22 @@ public: // returns true if the platform should explicitly apply a theme border virtual bool CanApplyThemeBorder() const { return false; } +#if wxUSE_MENUS + bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu); + + // handle WM_EXITMENULOOP message for Win95 only + bool HandleExitMenuLoop(WXWORD isPopup); + + // handle WM_(UN)INITMENUPOPUP message to generate wxEVT_MENU_OPEN/CLOSE + bool HandleMenuPopup(wxEventType evtType, WXHMENU hMenu); + + // Command part of HandleMenuPopup() and HandleExitMenuLoop(). + bool DoSendMenuOpenCloseEvent(wxEventType evtType, wxMenu* menu, bool popup); + + // Find the menu corresponding to the given handle. + virtual wxMenu* MSWFindMenuFromHMENU(WXHMENU hMenu); +#endif // wxUSE_MENUS + protected: // common part of all ctors void Init(); @@ -236,6 +251,10 @@ private: // MSWGetSystemMenu(). Owned by this window. wxMenu *m_menuSystem; + // The number of currently opened menus: 0 initially, 1 when a top level + // menu is opened, 2 when its submenu is opened and so on. + int m_menuDepth; + DECLARE_EVENT_TABLE() wxDECLARE_NO_COPY_CLASS(wxTopLevelWindowMSW); }; diff --git a/Externals/wxWidgets3/include/wx/msw/treectrl.h b/Externals/wxWidgets3/include/wx/msw/treectrl.h index c20974e8ab..5eeede8598 100644 --- a/Externals/wxWidgets3/include/wx/msw/treectrl.h +++ b/Externals/wxWidgets3/include/wx/msw/treectrl.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Vadim Zeitlin to be less MSW-specific on 10/10/98 // Created: 01/02/97 -// RCS-ID: $Id: treectrl.h 64532 2010-06-09 13:55:48Z FM $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -212,6 +211,14 @@ public: virtual bool CanApplyThemeBorder() const { return false; } protected: + // Implement "update locking" in a custom way for this control. + virtual void DoFreeze(); + virtual void DoThaw(); + + virtual void DoSetSize(int x, int y, + int width, int height, + int sizeFlags = wxSIZE_AUTO); + // SetImageList helper void SetAnyImageList(wxImageList *imageList, int which); @@ -332,6 +339,9 @@ private: // whether we need to deselect other items on mouse up bool m_mouseUpDeselect; + // The size to restore the control to when it is thawed, see DoThaw(). + wxSize m_thawnSize; + friend class wxTreeItemIndirectData; friend class wxTreeSortHelper; diff --git a/Externals/wxWidgets3/include/wx/msw/uxtheme.h b/Externals/wxWidgets3/include/wx/msw/uxtheme.h index 75d9262a18..5c4eae981d 100644 --- a/Externals/wxWidgets3/include/wx/msw/uxtheme.h +++ b/Externals/wxWidgets3/include/wx/msw/uxtheme.h @@ -4,7 +4,6 @@ // Author: John Platts, Vadim Zeitlin // Modified by: // Created: 2003 -// RCS-ID: $Id: uxtheme.h 65955 2010-10-30 23:50:22Z VZ $ // Copyright: (c) 2003 John Platts, Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/webview_ie.h b/Externals/wxWidgets3/include/wx/msw/webview_ie.h index 62b9a49a01..bc19ee85ae 100644 --- a/Externals/wxWidgets3/include/wx/msw/webview_ie.h +++ b/Externals/wxWidgets3/include/wx/msw/webview_ie.h @@ -1,8 +1,7 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: include/wx/msw/webviewie.h +// Name: include/wx/msw/webview_ie.h // Purpose: wxMSW IE wxWebView backend // Author: Marianne Gagnon -// Id: $Id: webview_ie.h 70499 2012-02-02 20:32:08Z SJL $ // Copyright: (c) 2010 Marianne Gagnon, 2011 Steven Lamerton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,234 +18,22 @@ #include "wx/msw/ole/automtn.h" #include "wx/msw/ole/activex.h" #include "wx/msw/ole/oleutils.h" +#include "wx/msw/private/comptr.h" #include "wx/msw/wrapwin.h" #include "wx/msw/missing.h" +#include "wx/msw/webview_missing.h" #include "wx/sharedptr.h" #include "wx/vector.h" -/* Classes and definitions from urlmon.h vary in their - * completeness between compilers and versions of compilers. - * We implement our own versions here which should work - * for all compilers. The definitions are taken from the - * mingw-w64 headers which are public domain. - */ - -#ifndef REFRESH_NORMAL -#define REFRESH_NORMAL 0 -#endif - -#ifndef REFRESH_COMPLETELY -#define REFRESH_COMPLETELY 3 -#endif - -typedef enum __wxMIDL_IBindStatusCallback_0006 -{ - wxBSCF_FIRSTDATANOTIFICATION = 0x1, - wxBSCF_INTERMEDIATEDATANOTIFICATION = 0x2, - wxBSCF_LASTDATANOTIFICATION = 0x4, - wxBSCF_DATAFULLYAVAILABLE = 0x8, - wxBSCF_AVAILABLEDATASIZEUNKNOWN = 0x10 -} wxBSCF; - -EXTERN_C const IID CLSID_FileProtocol; - -typedef struct _tagwxBINDINFO -{ - ULONG cbSize; - LPWSTR szExtraInfo; - STGMEDIUM stgmedData; - DWORD grfBindInfoF; - DWORD dwBindVerb; - LPWSTR szCustomVerb; - DWORD cbstgmedData; - DWORD dwOptions; - DWORD dwOptionsFlags; - DWORD dwCodePage; - SECURITY_ATTRIBUTES securityAttributes; - IID iid; - IUnknown *pUnk; - DWORD dwReserved; -} wxBINDINFO; - -typedef struct _tagwxPROTOCOLDATA -{ - DWORD grfFlags; - DWORD dwState; - LPVOID pData; - ULONG cbData; -} wxPROTOCOLDATA; - -class wxIInternetBindInfo : public IUnknown -{ -public: - virtual HRESULT wxSTDCALL GetBindInfo(DWORD *grfBINDF,wxBINDINFO *pbindinfo) = 0; - virtual HRESULT wxSTDCALL GetBindString(ULONG ulStringType,LPOLESTR *ppwzStr, - ULONG cEl,ULONG *pcElFetched) = 0; -}; - -class wxIInternetProtocolSink : public IUnknown -{ -public: - virtual HRESULT wxSTDCALL Switch(wxPROTOCOLDATA *pProtocolData) = 0; - virtual HRESULT wxSTDCALL ReportProgress(ULONG ulStatusCode, - LPCWSTR szStatusText) = 0; - virtual HRESULT wxSTDCALL ReportData(DWORD grfBSCF,ULONG ulProgress, - ULONG ulProgressMax) = 0; - virtual HRESULT wxSTDCALL ReportResult(HRESULT hrResult,DWORD dwError, - LPCWSTR szResult) = 0; -}; - -class wxIInternetProtocolRoot : public IUnknown -{ -public: - virtual HRESULT wxSTDCALL Start(LPCWSTR szUrl,wxIInternetProtocolSink *pOIProtSink, - wxIInternetBindInfo *pOIBindInfo,DWORD grfPI, - HANDLE_PTR dwReserved) = 0; - virtual HRESULT wxSTDCALL Continue(wxPROTOCOLDATA *pProtocolData) = 0; - virtual HRESULT wxSTDCALL Abort(HRESULT hrReason,DWORD dwOptions) = 0; - virtual HRESULT wxSTDCALL Terminate(DWORD dwOptions) = 0; - virtual HRESULT wxSTDCALL Suspend(void) = 0; - virtual HRESULT wxSTDCALL Resume(void) = 0; -}; - - -class wxIInternetProtocol : public wxIInternetProtocolRoot -{ -public: - virtual HRESULT wxSTDCALL Read(void *pv,ULONG cb,ULONG *pcbRead) = 0; - virtual HRESULT wxSTDCALL Seek(LARGE_INTEGER dlibMove,DWORD dwOrigin, - ULARGE_INTEGER *plibNewPosition) = 0; - virtual HRESULT wxSTDCALL LockRequest(DWORD dwOptions) = 0; - virtual HRESULT wxSTDCALL UnlockRequest(void) = 0; -}; - - -class wxIInternetSession : public IUnknown -{ - public: - virtual HRESULT wxSTDCALL RegisterNameSpace(IClassFactory *pCF,REFCLSID rclsid, - LPCWSTR pwzProtocol, - ULONG cPatterns, - const LPCWSTR *ppwzPatterns, - DWORD dwReserved) = 0; - virtual HRESULT wxSTDCALL UnregisterNameSpace(IClassFactory *pCF, - LPCWSTR pszProtocol) = 0; - virtual HRESULT wxSTDCALL RegisterMimeFilter(IClassFactory *pCF, - REFCLSID rclsid, - LPCWSTR pwzType) = 0; - virtual HRESULT wxSTDCALL UnregisterMimeFilter(IClassFactory *pCF, - LPCWSTR pwzType) = 0; - virtual HRESULT wxSTDCALL CreateBinding(LPBC pBC,LPCWSTR szUrl, - IUnknown *pUnkOuter,IUnknown **ppUnk, - wxIInternetProtocol **ppOInetProt, - DWORD dwOption) = 0; - virtual HRESULT wxSTDCALL SetSessionOption(DWORD dwOption,LPVOID pBuffer, - DWORD dwBufferLength, - DWORD dwReserved) = 0; - virtual HRESULT wxSTDCALL GetSessionOption(DWORD dwOption,LPVOID pBuffer, - DWORD *pdwBufferLength, - DWORD dwReserved) = 0; -}; - -/* END OF URLMON.H implementation */ - -/* Same goes for the mshtmhst.h, these are also taken - * from mingw-w64 headers. - */ - -typedef enum _tagwxDOCHOSTUIFLAG -{ - DOCHOSTUIFLAG_DIALOG = 0x1, - DOCHOSTUIFLAG_DISABLE_HELP_MENU = 0x2, - DOCHOSTUIFLAG_NO3DBORDER = 0x4, - DOCHOSTUIFLAG_SCROLL_NO = 0x8, - DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE = 0x10, - DOCHOSTUIFLAG_OPENNEWWIN = 0x20, - DOCHOSTUIFLAG_DISABLE_OFFSCREEN = 0x40, - DOCHOSTUIFLAG_FLAT_SCROLLBAR = 0x80, - DOCHOSTUIFLAG_DIV_BLOCKDEFAULT = 0x100, - DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY = 0x200, - DOCHOSTUIFLAG_OVERRIDEBEHAVIORFACTORY = 0x400, - DOCHOSTUIFLAG_CODEPAGELINKEDFONTS = 0x800, - DOCHOSTUIFLAG_URL_ENCODING_DISABLE_UTF8 = 0x1000, - DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8 = 0x2000, - DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE = 0x4000, - DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION = 0x10000, - DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION = 0x20000, - DOCHOSTUIFLAG_THEME = 0x40000, - DOCHOSTUIFLAG_NOTHEME = 0x80000, - DOCHOSTUIFLAG_NOPICS = 0x100000, - DOCHOSTUIFLAG_NO3DOUTERBORDER = 0x200000, - DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP = 0x400000, - DOCHOSTUIFLAG_LOCAL_MACHINE_ACCESS_CHECK = 0x800000, - DOCHOSTUIFLAG_DISABLE_UNTRUSTEDPROTOCOL = 0x1000000 -} DOCHOSTUIFLAG; - -typedef struct _tagwxDOCHOSTUIINFO -{ - ULONG cbSize; - DWORD dwFlags; - DWORD dwDoubleClick; - OLECHAR *pchHostCss; - OLECHAR *pchHostNS; -} DOCHOSTUIINFO; - -class wxIDocHostUIHandler : public IUnknown -{ -public: - virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt, - IUnknown *pcmdtReserved, - IDispatch *pdispReserved) = 0; - - virtual HRESULT wxSTDCALL GetHostInfo(DOCHOSTUIINFO *pInfo) = 0; - - virtual HRESULT wxSTDCALL ShowUI(DWORD dwID, - IOleInPlaceActiveObject *pActiveObject, - IOleCommandTarget *pCommandTarget, - IOleInPlaceFrame *pFrame, - IOleInPlaceUIWindow *pDoc) = 0; - - virtual HRESULT wxSTDCALL HideUI(void) = 0; - - virtual HRESULT wxSTDCALL UpdateUI(void) = 0; - - virtual HRESULT wxSTDCALL EnableModeless(BOOL fEnable) = 0; - - virtual HRESULT wxSTDCALL OnDocWindowActivate(BOOL fActivate) = 0; - - virtual HRESULT wxSTDCALL OnFrameWindowActivate(BOOL fActivate) = 0; - - virtual HRESULT wxSTDCALL ResizeBorder(LPCRECT prcBorder, - IOleInPlaceUIWindow *pUIWindow, - BOOL fRameWindow) = 0; - - virtual HRESULT wxSTDCALL TranslateAccelerator(LPMSG lpMsg, - const GUID *pguidCmdGroup, - DWORD nCmdID) = 0; - - virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey, - DWORD dw) = 0; - - virtual HRESULT wxSTDCALL GetDropTarget(IDropTarget *pDropTarget, - IDropTarget **ppDropTarget) = 0; - - virtual HRESULT wxSTDCALL GetExternal(IDispatch **ppDispatch) = 0; - - virtual HRESULT wxSTDCALL TranslateUrl(DWORD dwTranslate, - OLECHAR *pchURLIn, - OLECHAR **ppchURLOut) = 0; - - virtual HRESULT wxSTDCALL FilterDataObject(IDataObject *pDO, - IDataObject **ppDORet) = 0; -}; - -/* END OF MSHTMHST.H implementation */ - struct IHTMLDocument2; +struct IHTMLElement; +struct IMarkupPointer; class wxFSFile; class ClassFactory; class wxIEContainer; class DocHostUIHandler; +class wxFindPointers; +class wxIInternetProtocol; class WXDLLIMPEXP_WEBVIEW wxWebViewIE : public wxWebView { @@ -287,7 +74,7 @@ public: virtual void ClearHistory(); virtual void EnableHistory(bool enable = true); virtual void Stop(); - virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT); + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); virtual wxString GetPageSource() const; virtual wxString GetPageText() const; @@ -302,8 +89,6 @@ public: virtual void Print(); - virtual void SetPage(const wxString& html, const wxString& baseUrl); - virtual wxWebViewZoom GetZoom() const; virtual void SetZoom(wxWebViewZoom zoom); @@ -321,6 +106,9 @@ public: virtual void Undo(); virtual void Redo(); + //Find function + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT); + //Editing functions virtual void SetEditable(bool enable = true); virtual bool IsEditable() const; @@ -338,6 +126,8 @@ public: //Virtual Filesystem Support virtual void RegisterHandler(wxSharedPtr handler); + virtual void* GetNativeBackend() const { return m_webBrowser; } + // ---- IE-specific methods // FIXME: I seem to be able to access remote webpages even in offline mode... @@ -355,12 +145,15 @@ public: DECLARE_EVENT_TABLE(); +protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + private: wxIEContainer* m_container; wxAutomationObject m_ie; IWebBrowser2* m_webBrowser; DWORD m_dwCookie; - DocHostUIHandler* m_uiHandler; + wxCOMPtr m_uiHandler; //We store the current zoom type; wxWebViewZoomType m_zoomType; @@ -380,16 +173,41 @@ private: bool m_historyLoadingFromList; bool m_historyEnabled; - //Generic helper functions for IHtmlDocument commands + //We store find flag, results and position. + wxVector m_findPointers; + int m_findFlags; + wxString m_findText; + int m_findPosition; + + //Generic helper functions bool CanExecCommand(wxString command) const; void ExecCommand(wxString command); - IHTMLDocument2* GetDocument() const; + wxCOMPtr GetDocument() const; + bool IsElementVisible(wxCOMPtr elm); + //Find helper functions. + void FindInternal(const wxString& text, int flags, int internal_flag); + long FindNext(int direction = 1); + void FindClear(); //Toggles control features see INTERNETFEATURELIST for values. bool EnableControlFeature(long flag, bool enable = true); wxDECLARE_DYNAMIC_CLASS(wxWebViewIE); }; +class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryIE : public wxWebViewFactory +{ +public: + virtual wxWebView* Create() { return new wxWebViewIE; } + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { return new wxWebViewIE(parent, id, url, pos, size, style, name); } +}; + class VirtualProtocol : public wxIInternetProtocol { protected: @@ -402,7 +220,7 @@ protected: public: VirtualProtocol(wxSharedPtr handler); - ~VirtualProtocol() {} + virtual ~VirtualProtocol() {} //IUnknown DECLARE_IUNKNOWN_METHODS; @@ -436,7 +254,11 @@ public: class ClassFactory : public IClassFactory { public: - ClassFactory(wxSharedPtr handler) : m_handler(handler) {} + ClassFactory(wxSharedPtr handler) : m_handler(handler) + { AddRef(); } + virtual ~ClassFactory() {} + + wxString GetName() { return m_handler->GetName(); } //IClassFactory HRESULT STDMETHODCALLTYPE CreateInstance(IUnknown* pUnkOuter, @@ -463,12 +285,13 @@ private: class DocHostUIHandler : public wxIDocHostUIHandler { public: - DocHostUIHandler() {}; - ~DocHostUIHandler() {}; + DocHostUIHandler(wxWebView* browser) { m_browser = browser; } + virtual ~DocHostUIHandler() {} + virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved); - + virtual HRESULT wxSTDCALL GetHostInfo(DOCHOSTUIINFO *pInfo); virtual HRESULT wxSTDCALL ShowUI(DWORD dwID, @@ -495,7 +318,7 @@ public: const GUID *pguidCmdGroup, DWORD nCmdID); - virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey, + virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey, DWORD dw); virtual HRESULT wxSTDCALL GetDropTarget(IDropTarget *pDropTarget, @@ -511,6 +334,21 @@ public: IDataObject **ppDORet); //IUnknown DECLARE_IUNKNOWN_METHODS; + +private: + wxWebView* m_browser; +}; + +class wxFindPointers +{ +public: + wxFindPointers(wxIMarkupPointer *ptrBegin, wxIMarkupPointer *ptrEnd) + { + begin = ptrBegin; + end = ptrEnd; + } + //The two markup pointers. + wxIMarkupPointer *begin, *end; }; #endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_IE && defined(__WXMSW__) diff --git a/Externals/wxWidgets3/include/wx/msw/webview_missing.h b/Externals/wxWidgets3/include/wx/msw/webview_missing.h new file mode 100644 index 0000000000..fc2b8bc045 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/msw/webview_missing.h @@ -0,0 +1,947 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: include/wx/msw/webview_missing.h +// Purpose: Defintions / classes commonly missing used by wxWebViewIE +// Author: Steven Lamerton +// Copyright: (c) 2012 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +/* + * Classes and definitions used by wxWebViewIE vary in their + * completeness between compilers and versions of compilers. + * We implement our own versions here which should work + * for all compilers. The definitions are taken from the + * mingw-w64 headers which are public domain. +*/ + +/* urlmon.h */ + +struct IHTMLElement; +struct IHTMLDocument2; + +#ifndef REFRESH_NORMAL +#define REFRESH_NORMAL 0 +#endif + +#ifndef REFRESH_COMPLETELY +#define REFRESH_COMPLETELY 3 +#endif + +typedef enum __wxMIDL_IBindStatusCallback_0006 +{ + wxBSCF_FIRSTDATANOTIFICATION = 0x1, + wxBSCF_INTERMEDIATEDATANOTIFICATION = 0x2, + wxBSCF_LASTDATANOTIFICATION = 0x4, + wxBSCF_DATAFULLYAVAILABLE = 0x8, + wxBSCF_AVAILABLEDATASIZEUNKNOWN = 0x10 +} wxBSCF; + +EXTERN_C const IID CLSID_FileProtocol; + +typedef struct _tagwxBINDINFO +{ + ULONG cbSize; + LPWSTR szExtraInfo; + STGMEDIUM stgmedData; + DWORD grfBindInfoF; + DWORD dwBindVerb; + LPWSTR szCustomVerb; + DWORD cbstgmedData; + DWORD dwOptions; + DWORD dwOptionsFlags; + DWORD dwCodePage; + SECURITY_ATTRIBUTES securityAttributes; + IID iid; + IUnknown *pUnk; + DWORD dwReserved; +} wxBINDINFO; + +typedef struct _tagwxPROTOCOLDATA +{ + DWORD grfFlags; + DWORD dwState; + LPVOID pData; + ULONG cbData; +} wxPROTOCOLDATA; + +class wxIInternetBindInfo : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL GetBindInfo(DWORD *grfBINDF, wxBINDINFO *pbindinfo) = 0; + virtual HRESULT wxSTDCALL GetBindString(ULONG ulStringType, LPOLESTR *ppwzStr, + ULONG cEl, ULONG *pcElFetched) = 0; +}; + +class wxIInternetProtocolSink : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL Switch(wxPROTOCOLDATA *pProtocolData) = 0; + virtual HRESULT wxSTDCALL ReportProgress(ULONG ulStatusCode, + LPCWSTR szStatusText) = 0; + virtual HRESULT wxSTDCALL ReportData(DWORD grfBSCF, ULONG ulProgress, + ULONG ulProgressMax) = 0; + virtual HRESULT wxSTDCALL ReportResult(HRESULT hrResult, DWORD dwError, + LPCWSTR szResult) = 0; +}; + +class wxIInternetProtocolRoot : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL Start(LPCWSTR szUrl, wxIInternetProtocolSink *pOIProtSink, + wxIInternetBindInfo *pOIBindInfo, DWORD grfPI, + HANDLE_PTR dwReserved) = 0; + virtual HRESULT wxSTDCALL Continue(wxPROTOCOLDATA *pProtocolData) = 0; + virtual HRESULT wxSTDCALL Abort(HRESULT hrReason, DWORD dwOptions) = 0; + virtual HRESULT wxSTDCALL Terminate(DWORD dwOptions) = 0; + virtual HRESULT wxSTDCALL Suspend(void) = 0; + virtual HRESULT wxSTDCALL Resume(void) = 0; +}; + + +class wxIInternetProtocol : public wxIInternetProtocolRoot +{ +public: + virtual HRESULT wxSTDCALL Read(void *pv, ULONG cb, ULONG *pcbRead) = 0; + virtual HRESULT wxSTDCALL Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, + ULARGE_INTEGER *plibNewPosition) = 0; + virtual HRESULT wxSTDCALL LockRequest(DWORD dwOptions) = 0; + virtual HRESULT wxSTDCALL UnlockRequest(void) = 0; +}; + + +class wxIInternetSession : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL RegisterNameSpace(IClassFactory *pCF, REFCLSID rclsid, + LPCWSTR pwzProtocol, + ULONG cPatterns, + const LPCWSTR *ppwzPatterns, + DWORD dwReserved) = 0; + virtual HRESULT wxSTDCALL UnregisterNameSpace(IClassFactory *pCF, + LPCWSTR pszProtocol) = 0; + virtual HRESULT wxSTDCALL RegisterMimeFilter(IClassFactory *pCF, + REFCLSID rclsid, + LPCWSTR pwzType) = 0; + virtual HRESULT wxSTDCALL UnregisterMimeFilter(IClassFactory *pCF, + LPCWSTR pwzType) = 0; + virtual HRESULT wxSTDCALL CreateBinding(LPBC pBC, LPCWSTR szUrl, + IUnknown *pUnkOuter, IUnknown **ppUnk, + wxIInternetProtocol **ppOInetProt, + DWORD dwOption) = 0; + virtual HRESULT wxSTDCALL SetSessionOption(DWORD dwOption, LPVOID pBuffer, + DWORD dwBufferLength, + DWORD dwReserved) = 0; + virtual HRESULT wxSTDCALL GetSessionOption(DWORD dwOption, LPVOID pBuffer, + DWORD *pdwBufferLength, + DWORD dwReserved) = 0; +}; + +/* end of urlmon.h */ + +/* mshtmhst.h */ + +typedef enum _tagwxDOCHOSTUIFLAG +{ + DOCHOSTUIFLAG_DIALOG = 0x1, + DOCHOSTUIFLAG_DISABLE_HELP_MENU = 0x2, + DOCHOSTUIFLAG_NO3DBORDER = 0x4, + DOCHOSTUIFLAG_SCROLL_NO = 0x8, + DOCHOSTUIFLAG_DISABLE_SCRIPT_INACTIVE = 0x10, + DOCHOSTUIFLAG_OPENNEWWIN = 0x20, + DOCHOSTUIFLAG_DISABLE_OFFSCREEN = 0x40, + DOCHOSTUIFLAG_FLAT_SCROLLBAR = 0x80, + DOCHOSTUIFLAG_DIV_BLOCKDEFAULT = 0x100, + DOCHOSTUIFLAG_ACTIVATE_CLIENTHIT_ONLY = 0x200, + DOCHOSTUIFLAG_OVERRIDEBEHAVIORFACTORY = 0x400, + DOCHOSTUIFLAG_CODEPAGELINKEDFONTS = 0x800, + DOCHOSTUIFLAG_URL_ENCODING_DISABLE_UTF8 = 0x1000, + DOCHOSTUIFLAG_URL_ENCODING_ENABLE_UTF8 = 0x2000, + DOCHOSTUIFLAG_ENABLE_FORMS_AUTOCOMPLETE = 0x4000, + DOCHOSTUIFLAG_ENABLE_INPLACE_NAVIGATION = 0x10000, + DOCHOSTUIFLAG_IME_ENABLE_RECONVERSION = 0x20000, + DOCHOSTUIFLAG_THEME = 0x40000, + DOCHOSTUIFLAG_NOTHEME = 0x80000, + DOCHOSTUIFLAG_NOPICS = 0x100000, + DOCHOSTUIFLAG_NO3DOUTERBORDER = 0x200000, + DOCHOSTUIFLAG_DISABLE_EDIT_NS_FIXUP = 0x400000, + DOCHOSTUIFLAG_LOCAL_MACHINE_ACCESS_CHECK = 0x800000, + DOCHOSTUIFLAG_DISABLE_UNTRUSTEDPROTOCOL = 0x1000000 +} DOCHOSTUIFLAG; + +typedef struct _tagwxDOCHOSTUIINFO +{ + ULONG cbSize; + DWORD dwFlags; + DWORD dwDoubleClick; + OLECHAR *pchHostCss; + OLECHAR *pchHostNS; +} DOCHOSTUIINFO; + +class wxIDocHostUIHandler : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL ShowContextMenu(DWORD dwID, POINT *ppt, + IUnknown *pcmdtReserved, + IDispatch *pdispReserved) = 0; + + virtual HRESULT wxSTDCALL GetHostInfo(DOCHOSTUIINFO *pInfo) = 0; + + virtual HRESULT wxSTDCALL ShowUI(DWORD dwID, + IOleInPlaceActiveObject *pActiveObject, + IOleCommandTarget *pCommandTarget, + IOleInPlaceFrame *pFrame, + IOleInPlaceUIWindow *pDoc) = 0; + + virtual HRESULT wxSTDCALL HideUI(void) = 0; + + virtual HRESULT wxSTDCALL UpdateUI(void) = 0; + + virtual HRESULT wxSTDCALL EnableModeless(BOOL fEnable) = 0; + + virtual HRESULT wxSTDCALL OnDocWindowActivate(BOOL fActivate) = 0; + + virtual HRESULT wxSTDCALL OnFrameWindowActivate(BOOL fActivate) = 0; + + virtual HRESULT wxSTDCALL ResizeBorder(LPCRECT prcBorder, + IOleInPlaceUIWindow *pUIWindow, + BOOL fRameWindow) = 0; + + virtual HRESULT wxSTDCALL TranslateAccelerator(LPMSG lpMsg, + const GUID *pguidCmdGroup, + DWORD nCmdID) = 0; + + virtual HRESULT wxSTDCALL GetOptionKeyPath(LPOLESTR *pchKey, + DWORD dw) = 0; + + virtual HRESULT wxSTDCALL GetDropTarget(IDropTarget *pDropTarget, + IDropTarget **ppDropTarget) = 0; + + virtual HRESULT wxSTDCALL GetExternal(IDispatch **ppDispatch) = 0; + + virtual HRESULT wxSTDCALL TranslateUrl(DWORD dwTranslate, + OLECHAR *pchURLIn, + OLECHAR **ppchURLOut) = 0; + + virtual HRESULT wxSTDCALL FilterDataObject(IDataObject *pDO, + IDataObject **ppDORet) = 0; +}; + +/* end of mshtmhst.h */ + +/* mshtml.h */ + +typedef enum _tagwxPOINTER_GRAVITY +{ + wxPOINTER_GRAVITY_Left = 0, + wxPOINTER_GRAVITY_Right = 1, + wxPOINTER_GRAVITY_Max = 2147483647 +} wxPOINTER_GRAVITY; + +typedef enum _tagwxELEMENT_ADJACENCY +{ + wxELEM_ADJ_BeforeBegin = 0, + wxELEM_ADJ_AfterBegin = 1, + wxELEM_ADJ_BeforeEnd = 2, + wxELEM_ADJ_AfterEnd = 3, + wxELEMENT_ADJACENCY_Max = 2147483647 +} wxELEMENT_ADJACENCY; + +typedef enum _tagwxMARKUP_CONTEXT_TYPE +{ + wxCONTEXT_TYPE_None = 0, + wxCONTEXT_TYPE_Text = 1, + wxCONTEXT_TYPE_EnterScope = 2, + wxCONTEXT_TYPE_ExitScope = 3, + wxCONTEXT_TYPE_NoScope = 4, + wxMARKUP_CONTEXT_TYPE_Max = 2147483647 +} wxMARKUP_CONTEXT_TYPE; + +typedef enum _tagwxFINDTEXT_FLAGS +{ + wxFINDTEXT_BACKWARDS = 0x1, + wxFINDTEXT_WHOLEWORD = 0x2, + wxFINDTEXT_MATCHCASE = 0x4, + wxFINDTEXT_RAW = 0x20000, + wxFINDTEXT_MATCHDIAC = 0x20000000, + wxFINDTEXT_MATCHKASHIDA = 0x40000000, + wxFINDTEXT_MATCHALEFHAMZA = 0x80000000, + wxFINDTEXT_FLAGS_Max = 2147483647 +} wxFINDTEXT_FLAGS; + +typedef enum _tagwxMOVEUNIT_ACTION +{ + wxMOVEUNIT_PREVCHAR = 0, + wxMOVEUNIT_NEXTCHAR = 1, + wxMOVEUNIT_PREVCLUSTERBEGIN = 2, + wxMOVEUNIT_NEXTCLUSTERBEGIN = 3, + wxMOVEUNIT_PREVCLUSTEREND = 4, + wxMOVEUNIT_NEXTCLUSTEREND = 5, + wxMOVEUNIT_PREVWORDBEGIN = 6, + wxMOVEUNIT_NEXTWORDBEGIN = 7, + wxMOVEUNIT_PREVWORDEND = 8, + wxMOVEUNIT_NEXTWORDEND = 9, + wxMOVEUNIT_PREVPROOFWORD = 10, + wxMOVEUNIT_NEXTPROOFWORD = 11, + wxMOVEUNIT_NEXTURLBEGIN = 12, + wxMOVEUNIT_PREVURLBEGIN = 13, + wxMOVEUNIT_NEXTURLEND = 14, + wxMOVEUNIT_PREVURLEND = 15, + wxMOVEUNIT_PREVSENTENCE = 16, + wxMOVEUNIT_NEXTSENTENCE = 17, + wxMOVEUNIT_PREVBLOCK = 18, + wxMOVEUNIT_NEXTBLOCK = 19, + wxMOVEUNIT_ACTION_Max = 2147483647 +} wxMOVEUNIT_ACTION; + +typedef enum _tagwxELEMENT_TAG_ID +{ + wxTAGID_NULL = 0, wxTAGID_UNKNOWN = 1, wxTAGID_A = 2, wxTAGID_ACRONYM = 3, + wxTAGID_ADDRESS = 4, wxTAGID_APPLET = 5, wxTAGID_AREA = 6, wxTAGID_B = 7, + wxTAGID_BASE = 8, wxTAGID_BASEFONT = 9, wxTAGID_BDO = 10, + wxTAGID_BGSOUND = 11, wxTAGID_BIG = 12, wxTAGID_BLINK = 13, + wxTAGID_BLOCKQUOTE = 14, wxTAGID_BODY = 15, wxTAGID_BR = 16, + wxTAGID_BUTTON = 17, wxTAGID_CAPTION = 18, wxTAGID_CENTER = 19, + wxTAGID_CITE = 20, wxTAGID_CODE = 21, wxTAGID_COL = 22, + wxTAGID_COLGROUP = 23, wxTAGID_COMMENT = 24, wxTAGID_COMMENT_RAW = 25, + wxTAGID_DD = 26, wxTAGID_DEL = 27, wxTAGID_DFN = 28, wxTAGID_DIR = 29, + wxTAGID_DIV = 30, wxTAGID_DL = 31, wxTAGID_DT = 32, wxTAGID_EM = 33, + wxTAGID_EMBED = 34, wxTAGID_FIELDSET = 35, wxTAGID_FONT = 36, + wxTAGID_FORM = 37, wxTAGID_FRAME = 38, wxTAGID_FRAMESET = 39, + wxTAGID_GENERIC = 40, wxTAGID_H1 = 41, wxTAGID_H2 = 42, wxTAGID_H3 = 43, + wxTAGID_H4 = 44, wxTAGID_H5 = 45, wxTAGID_H6 = 46, wxTAGID_HEAD = 47, + wxTAGID_HR = 48, wxTAGID_HTML = 49, wxTAGID_I = 50, wxTAGID_IFRAME = 51, + wxTAGID_IMG = 52, wxTAGID_INPUT = 53, wxTAGID_INS = 54, wxTAGID_KBD = 55, + wxTAGID_LABEL = 56, wxTAGID_LEGEND = 57, wxTAGID_LI = 58, wxTAGID_LINK = 59, + wxTAGID_LISTING = 60, wxTAGID_MAP = 61, wxTAGID_MARQUEE = 62, + wxTAGID_MENU = 63, wxTAGID_META = 64, wxTAGID_NEXTID = 65, + wxTAGID_NOBR = 66, wxTAGID_NOEMBED = 67, wxTAGID_NOFRAMES = 68, + wxTAGID_NOSCRIPT = 69, wxTAGID_OBJECT = 70, wxTAGID_OL = 71, + wxTAGID_OPTION = 72, wxTAGID_P = 73, wxTAGID_PARAM = 74, + wxTAGID_PLAINTEXT = 75, wxTAGID_PRE = 76, wxTAGID_Q = 77, wxTAGID_RP = 78, + wxTAGID_RT = 79, wxTAGID_RUBY = 80, wxTAGID_S = 81, wxTAGID_SAMP = 82, + wxTAGID_SCRIPT = 83, wxTAGID_SELECT = 84, wxTAGID_SMALL = 85, + wxTAGID_SPAN = 86, wxTAGID_STRIKE = 87, wxTAGID_STRONG = 88, + wxTAGID_STYLE = 89, wxTAGID_SUB = 90, wxTAGID_SUP = 91, wxTAGID_TABLE = 92, + wxTAGID_TBODY = 93, wxTAGID_TC = 94, wxTAGID_TD = 95, wxTAGID_TEXTAREA = 96, + wxTAGID_TFOOT = 97, wxTAGID_TH = 98, wxTAGID_THEAD = 99, + wxTAGID_TITLE = 100, wxTAGID_TR = 101, wxTAGID_TT = 102, wxTAGID_U = 103, + wxTAGID_UL = 104, wxTAGID_VAR = 105, wxTAGID_WBR = 106, wxTAGID_XMP = 107, + wxTAGID_ROOT = 108, wxTAGID_OPTGROUP = 109, wxTAGID_COUNT = 110, + wxTAGID_LAST_PREDEFINED = 10000, wxELEMENT_TAG_ID_Max = 2147483647 +} wxELEMENT_TAG_ID; + +struct wxIHTMLStyle : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL put_fontFamily(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_fontFamily(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_fontStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_fontStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_fontVariant(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_fontVariant(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_fontWeight(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_fontWeight(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_fontSize(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_fontSize(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_font(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_font(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_color(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_color(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_background(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_background(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundColor(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_backgroundColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundImage(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_backgroundImage(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundRepeat(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_backgroundRepeat(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundAttachment(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_backgroundAttachment(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundPosition(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_backgroundPosition(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundPositionX(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_backgroundPositionX(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_backgroundPositionY(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_backgroundPositionY(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_wordSpacing(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_wordSpacing(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_letterSpacing(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_letterSpacing(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_textDecoration(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_textDecoration(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_textDecorationNone(VARIANT_BOOL v) = 0; + virtual HRESULT wxSTDCALL get_textDecorationNone(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL put_textDecorationUnderline(VARIANT_BOOL v) = 0; + virtual HRESULT wxSTDCALL get_textDecorationUnderline(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL put_textDecorationOverline(VARIANT_BOOL v) = 0; + virtual HRESULT wxSTDCALL get_textDecorationOverline(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL put_textDecorationLineThrough(VARIANT_BOOL v) = 0; + virtual HRESULT wxSTDCALL get_textDecorationLineThrough(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL put_textDecorationBlink(VARIANT_BOOL v) = 0; + virtual HRESULT wxSTDCALL get_textDecorationBlink(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL put_verticalAlign(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_verticalAlign(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_textTransform(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_textTransform(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_textAlign(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_textAlign(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_textIndent(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_textIndent(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_lineHeight(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_lineHeight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_marginTop(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_marginTop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_marginRight(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_marginRight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_marginBottom(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_marginBottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_marginLeft(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_marginLeft(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_margin(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_margin(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_paddingTop(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_paddingTop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_paddingRight(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_paddingRight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_paddingBottom(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_paddingBottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_paddingLeft(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_paddingLeft(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_padding(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_padding(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_border(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_border(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderTop(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderTop(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderRight(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderRight(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderBottom(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderBottom(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderLeft(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderLeft(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderColor(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderColor(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderTopColor(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderTopColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderRightColor(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderRightColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderBottomColor(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderBottomColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderLeftColor(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderLeftColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderWidth(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderWidth(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderTopWidth(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderTopWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderRightWidth(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderRightWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderBottomWidth(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderBottomWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderLeftWidth(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_borderLeftWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_borderStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderTopStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderTopStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderRightStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderRightStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderBottomStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderBottomStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_borderLeftStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_borderLeftStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_width(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_width(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_height(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_height(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_styleFloat(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_styleFloat(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_clear(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_clear(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_display(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_display(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_visibility(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_visibility(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_listStyleType(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_listStyleType(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_listStylePosition(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_listStylePosition(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_listStyleImage(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_listStyleImage(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_listStyle(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_listStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_whiteSpace(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_whiteSpace(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_top(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_top(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_left(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_left(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_position(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_zIndex(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_zIndex(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_overflow(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_overflow(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_pageBreakBefore(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_pageBreakBefore(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_pageBreakAfter(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_pageBreakAfter(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_cssText(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_cssText(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_pixelTop(long v) = 0; + virtual HRESULT wxSTDCALL get_pixelTop(long *p) = 0; + virtual HRESULT wxSTDCALL put_pixelLeft(long v) = 0; + virtual HRESULT wxSTDCALL get_pixelLeft(long *p) = 0; + virtual HRESULT wxSTDCALL put_pixelWidth(long v) = 0; + virtual HRESULT wxSTDCALL get_pixelWidth(long *p) = 0; + virtual HRESULT wxSTDCALL put_pixelHeight(long v) = 0; + virtual HRESULT wxSTDCALL get_pixelHeight(long *p) = 0; + virtual HRESULT wxSTDCALL put_posTop(float v) = 0; + virtual HRESULT wxSTDCALL get_posTop(float *p) = 0; + virtual HRESULT wxSTDCALL put_posLeft(float v) = 0; + virtual HRESULT wxSTDCALL get_posLeft(float *p) = 0; + virtual HRESULT wxSTDCALL put_posWidth(float v) = 0; + virtual HRESULT wxSTDCALL get_posWidth(float *p) = 0; + virtual HRESULT wxSTDCALL put_posHeight(float v) = 0; + virtual HRESULT wxSTDCALL get_posHeight(float *p) = 0; + virtual HRESULT wxSTDCALL put_cursor(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_cursor(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_clip(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_clip(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_filter(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_filter(BSTR *p) = 0; + virtual HRESULT wxSTDCALL setAttribute(BSTR strAttributeName, VARIANT AttributeValue, LONG lFlags = 1) = 0; + virtual HRESULT wxSTDCALL getAttribute(BSTR strAttributeName, LONG lFlags, VARIANT *AttributeValue) = 0; + virtual HRESULT wxSTDCALL removeAttribute(BSTR strAttributeName, LONG lFlags, VARIANT_BOOL *pfSuccess) = 0; + virtual HRESULT wxSTDCALL toString(BSTR *String) = 0; +}; + +struct wxIHTMLCurrentStyle : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL get_position(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_styleFloat(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_color(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_fontFamily(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_fontStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_fontVariant(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_fontWeight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_fontSize(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundImage(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundPositionX(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundPositionY(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundRepeat(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderLeftColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderTopColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderRightColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderBottomColor(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderTopStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderRightStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderBottomStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderLeftStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderTopWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderRightWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderBottomWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_borderLeftWidth(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_left(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_top(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_width(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_height(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_paddingLeft(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_paddingTop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_paddingRight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_paddingBottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_textAlign(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textDecoration(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_display(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_visibility(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_zIndex(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_letterSpacing(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_lineHeight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_textIndent(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_verticalAlign(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_backgroundAttachment(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_marginTop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_marginRight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_marginBottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_marginLeft(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_clear(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_listStyleType(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_listStylePosition(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_listStyleImage(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_clipTop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_clipRight(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_clipBottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_clipLeft(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_overflow(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_pageBreakBefore(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_pageBreakAfter(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_cursor(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_tableLayout(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderCollapse(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_direction(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_behavior(BSTR *p) = 0; + virtual HRESULT wxSTDCALL getAttribute(BSTR strAttributeName, LONG lFlags, VARIANT *AttributeValue) = 0; + virtual HRESULT wxSTDCALL get_unicodeBidi(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_right(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_bottom(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_imeMode(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_rubyAlign(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_rubyPosition(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_rubyOverhang(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textAutospace(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_lineBreak(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_wordBreak(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textJustify(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textJustifyTrim(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textKashida(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_blockDirection(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_layoutGridChar(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_layoutGridLine(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_layoutGridMode(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_layoutGridType(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderStyle(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderColor(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_borderWidth(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_padding(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_margin(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_accelerator(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_overflowX(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_overflowY(BSTR *p) = 0; + virtual HRESULT wxSTDCALL get_textTransform(BSTR *p) = 0; +}; + + +struct wxIHTMLRect : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL put_left(long v) = 0; + virtual HRESULT wxSTDCALL get_left(long *p) = 0; + virtual HRESULT wxSTDCALL put_top(long v) = 0; + virtual HRESULT wxSTDCALL get_top(long *p) = 0; + virtual HRESULT wxSTDCALL put_right(long v) = 0; + virtual HRESULT wxSTDCALL get_right(long *p) = 0; + virtual HRESULT wxSTDCALL put_bottom(long v) = 0; + virtual HRESULT wxSTDCALL get_bottom(long *p) = 0; +}; + +struct wxIHTMLRectCollection : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL get_length(long *p) = 0; + virtual HRESULT wxSTDCALL get__newEnum(IUnknown **p) = 0; + virtual HRESULT wxSTDCALL item(VARIANT *pvarIndex, VARIANT *pvarResult) = 0; +}; + +struct wxIHTMLFiltersCollection : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL get_length(long *p) = 0; + virtual HRESULT wxSTDCALL get__newEnum(IUnknown **p) = 0; + virtual HRESULT wxSTDCALL item(VARIANT *pvarIndex, VARIANT *pvarResult) = 0; +}; + +struct wxIHTMLElementCollection : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL toString(BSTR *String) = 0; + virtual HRESULT wxSTDCALL put_length(long v) = 0; + virtual HRESULT wxSTDCALL get_length(long *p) = 0; + virtual HRESULT wxSTDCALL get__newEnum(IUnknown **p) = 0; + virtual HRESULT wxSTDCALL item(VARIANT name, VARIANT index, IDispatch **pdisp) = 0; + virtual HRESULT wxSTDCALL tags(VARIANT tagName, IDispatch **pdisp) = 0; +}; + +struct wxIHTMLElement2 : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL get_scopeName(BSTR *p) = 0; + virtual HRESULT wxSTDCALL setCapture(VARIANT_BOOL containerCapture = -1) = 0; + virtual HRESULT wxSTDCALL releaseCapture(void) = 0; + virtual HRESULT wxSTDCALL put_onlosecapture(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onlosecapture(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL componentFromPoint(long x, long y, BSTR *component) = 0; + virtual HRESULT wxSTDCALL doScroll(VARIANT component) = 0; + virtual HRESULT wxSTDCALL put_onscroll(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onscroll(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondrag(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondrag(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondragend(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondragend(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondragenter(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondragenter(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondragover(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondragover(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondragleave(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondragleave(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_ondrop(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_ondrop(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onbeforecut(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onbeforecut(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_oncut(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_oncut(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onbeforecopy(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onbeforecopy(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_oncopy(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_oncopy(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onbeforepaste(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onbeforepaste(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onpaste(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onpaste(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_currentStyle(wxIHTMLCurrentStyle **p) = 0; + virtual HRESULT wxSTDCALL put_onpropertychange(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onpropertychange(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL getClientRects(wxIHTMLRectCollection **pRectCol) = 0; + virtual HRESULT wxSTDCALL getBoundingClientRect(wxIHTMLRect **pRect) = 0; + virtual HRESULT wxSTDCALL setExpression(BSTR propname, BSTR expression, BSTR language = L"") = 0; + virtual HRESULT wxSTDCALL getExpression(BSTR propname, VARIANT *expression) = 0; + virtual HRESULT wxSTDCALL removeExpression(BSTR propname, VARIANT_BOOL *pfSuccess) = 0; + virtual HRESULT wxSTDCALL put_tabIndex(short v) = 0; + virtual HRESULT wxSTDCALL get_tabIndex(short *p) = 0; + virtual HRESULT wxSTDCALL focus(void) = 0; + virtual HRESULT wxSTDCALL put_accessKey(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_accessKey(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_onblur(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onblur(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onfocus(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onfocus(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onresize(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onresize(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL blur(void) = 0; + virtual HRESULT wxSTDCALL addFilter(IUnknown *pUnk) = 0; + virtual HRESULT wxSTDCALL removeFilter(IUnknown *pUnk) = 0; + virtual HRESULT wxSTDCALL get_clientHeight(long *p) = 0; + virtual HRESULT wxSTDCALL get_clientWidth(long *p) = 0; + virtual HRESULT wxSTDCALL get_clientTop(long *p) = 0; + virtual HRESULT wxSTDCALL get_clientLeft(long *p) = 0; + virtual HRESULT wxSTDCALL attachEvent(BSTR event, IDispatch *pDisp, VARIANT_BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL detachEvent(BSTR event, IDispatch *pDisp) = 0; + virtual HRESULT wxSTDCALL get_readyState(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onreadystatechange(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onreadystatechange(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onrowsdelete(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onrowsdelete(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_onrowsinserted(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onrowsinserted(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_oncellchange(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_oncellchange(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL put_dir(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_dir(BSTR *p) = 0; + virtual HRESULT wxSTDCALL createControlRange(IDispatch **range) = 0; + virtual HRESULT wxSTDCALL get_scrollHeight(long *p) = 0; + virtual HRESULT wxSTDCALL get_scrollWidth(long *p) = 0; + virtual HRESULT wxSTDCALL put_scrollTop(long v) = 0; + virtual HRESULT wxSTDCALL get_scrollTop(long *p) = 0; + virtual HRESULT wxSTDCALL put_scrollLeft(long v) = 0; + virtual HRESULT wxSTDCALL get_scrollLeft(long *p) = 0; + virtual HRESULT wxSTDCALL clearAttributes(void) = 0; + virtual HRESULT wxSTDCALL mergeAttributes(IHTMLElement *mergeThis) = 0; + virtual HRESULT wxSTDCALL put_oncontextmenu(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_oncontextmenu(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL insertAdjacentElement(BSTR where, IHTMLElement *insertedElement, IHTMLElement **inserted) = 0; + virtual HRESULT wxSTDCALL applyElement(IHTMLElement *apply, BSTR where, IHTMLElement **applied) = 0; + virtual HRESULT wxSTDCALL getAdjacentText(BSTR where, BSTR *text) = 0; + virtual HRESULT wxSTDCALL replaceAdjacentText(BSTR where, BSTR newText, BSTR *oldText) = 0; + virtual HRESULT wxSTDCALL get_canHaveChildren(VARIANT_BOOL *p) = 0; + virtual HRESULT wxSTDCALL addBehavior(BSTR bstrUrl, VARIANT *pvarFactory, long *pCookie) = 0; + virtual HRESULT wxSTDCALL removeBehavior(long cookie, VARIANT_BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL get_runtimeStyle(wxIHTMLStyle **p) = 0; + virtual HRESULT wxSTDCALL get_behaviorUrns(IDispatch **p) = 0; + virtual HRESULT wxSTDCALL put_tagUrn(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_tagUrn(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_onbeforeeditfocus(VARIANT v) = 0; + virtual HRESULT wxSTDCALL get_onbeforeeditfocus(VARIANT *p) = 0; + virtual HRESULT wxSTDCALL get_readyStateValue(long *p) = 0; + virtual HRESULT wxSTDCALL getElementsByTagName(BSTR v, + wxIHTMLElementCollection **pelColl) = 0; +}; + +struct wxIHTMLTxtRange : public IDispatch +{ +public: + virtual HRESULT wxSTDCALL get_htmlText(BSTR *p) = 0; + virtual HRESULT wxSTDCALL put_text(BSTR v) = 0; + virtual HRESULT wxSTDCALL get_text(BSTR *p) = 0; + virtual HRESULT wxSTDCALL parentElement(IHTMLElement **parent) = 0; + virtual HRESULT wxSTDCALL duplicate(wxIHTMLTxtRange **Duplicate) = 0; + virtual HRESULT wxSTDCALL inRange(wxIHTMLTxtRange *Range, VARIANT_BOOL *InRange) = 0; + virtual HRESULT wxSTDCALL isEqual(wxIHTMLTxtRange *Range, VARIANT_BOOL *IsEqual) = 0; + virtual HRESULT wxSTDCALL scrollIntoView(VARIANT_BOOL fStart = -1) = 0; + virtual HRESULT wxSTDCALL collapse(VARIANT_BOOL Start = -1) = 0; + virtual HRESULT wxSTDCALL expand(BSTR Unit, VARIANT_BOOL *Success) = 0; + virtual HRESULT wxSTDCALL move(BSTR Unit, long Count, long *ActualCount) = 0; + virtual HRESULT wxSTDCALL moveStart(BSTR Unit, long Count, long *ActualCount) = 0; + virtual HRESULT wxSTDCALL moveEnd(BSTR Unit, long Count, long *ActualCount) = 0; + virtual HRESULT wxSTDCALL select(void) = 0; + virtual HRESULT wxSTDCALL pasteHTML(BSTR html) = 0; + virtual HRESULT wxSTDCALL moveToElementText(IHTMLElement *element) = 0; + virtual HRESULT wxSTDCALL setEndPoint(BSTR how, wxIHTMLTxtRange *SourceRange) = 0; + virtual HRESULT wxSTDCALL compareEndPoints(BSTR how, wxIHTMLTxtRange *SourceRange, long *ret) = 0; + virtual HRESULT wxSTDCALL findText(BSTR String, long count, long Flags, VARIANT_BOOL *Success) = 0; + virtual HRESULT wxSTDCALL moveToPoint(long x, long y) = 0; + virtual HRESULT wxSTDCALL getBookmark(BSTR *Boolmark) = 0; + virtual HRESULT wxSTDCALL moveToBookmark(BSTR Bookmark, VARIANT_BOOL *Success) = 0; + virtual HRESULT wxSTDCALL queryCommandSupported(BSTR cmdID, VARIANT_BOOL *pfRet) = 0; + virtual HRESULT wxSTDCALL queryCommandEnabled(BSTR cmdID, VARIANT_BOOL *pfRet) = 0; + virtual HRESULT wxSTDCALL queryCommandState(BSTR cmdID, VARIANT_BOOL *pfRet) = 0; + virtual HRESULT wxSTDCALL queryCommandIndeterm(BSTR cmdID, VARIANT_BOOL *pfRet) = 0; + virtual HRESULT wxSTDCALL queryCommandText(BSTR cmdID, BSTR *pcmdText) = 0; + virtual HRESULT wxSTDCALL queryCommandValue(BSTR cmdID, VARIANT *pcmdValue) = 0; + virtual HRESULT wxSTDCALL execCommand(BSTR cmdID, VARIANT_BOOL showUI, VARIANT value, VARIANT_BOOL *pfRet) = 0; + virtual HRESULT wxSTDCALL execCommandShowHelp(BSTR cmdID, VARIANT_BOOL *pfRet) = 0; +}; + +struct wxIMarkupContainer : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL OwningDoc(IHTMLDocument2 **ppDoc) = 0; +}; + +struct wxIMarkupPointer : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL OwningDoc(IHTMLDocument2 **ppDoc) = 0; + virtual HRESULT wxSTDCALL Gravity(wxPOINTER_GRAVITY *pGravity) = 0; + virtual HRESULT wxSTDCALL SetGravity(wxPOINTER_GRAVITY Gravity) = 0; + virtual HRESULT wxSTDCALL Cling(BOOL *pfCling) = 0; + virtual HRESULT wxSTDCALL SetCling(BOOL fCLing) = 0; + virtual HRESULT wxSTDCALL Unposition(void) = 0; + virtual HRESULT wxSTDCALL IsPositioned(BOOL *pfPositioned) = 0; + virtual HRESULT wxSTDCALL GetContainer(wxIMarkupContainer **ppContainer) = 0; + virtual HRESULT wxSTDCALL MoveAdjacentToElement(IHTMLElement *pElement, wxELEMENT_ADJACENCY eAdj) = 0; + virtual HRESULT wxSTDCALL MoveToPointer(wxIMarkupPointer *pPointer) = 0; + virtual HRESULT wxSTDCALL MoveToContainer(wxIMarkupContainer *pContainer, BOOL fAtStart) = 0; + virtual HRESULT wxSTDCALL Left(BOOL fMove, wxMARKUP_CONTEXT_TYPE *pContext, IHTMLElement **ppElement, long *pcch, OLECHAR *pchText) = 0; + virtual HRESULT wxSTDCALL Right(BOOL fMove, wxMARKUP_CONTEXT_TYPE *pContext, IHTMLElement **ppElement, long *pcch, OLECHAR *pchText) = 0; + virtual HRESULT wxSTDCALL CurrentScope(IHTMLElement **ppElemCurrent) = 0; + virtual HRESULT wxSTDCALL IsLeftOf(wxIMarkupPointer *pPointerThat, BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL IsLeftOfOrEqualTo(wxIMarkupPointer *pPointerThat, BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL IsRightOf(wxIMarkupPointer *pPointerThat, BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL IsRightOfOrEqualTo(wxIMarkupPointer *pPointerThat, BOOL *pfResult) = 0; + virtual HRESULT wxSTDCALL IsEqualTo(wxIMarkupPointer *pPointerThat, BOOL *pfAreEqual) = 0; + virtual HRESULT wxSTDCALL MoveUnit(wxMOVEUNIT_ACTION muAction) = 0; + virtual HRESULT wxSTDCALL FindText(OLECHAR *pchFindText, DWORD dwFlags, wxIMarkupPointer *pIEndMatch, wxIMarkupPointer *pIEndSearch) = 0; +}; + +struct wxIMarkupServices : public IUnknown +{ +public: + virtual HRESULT wxSTDCALL CreateMarkupPointer(wxIMarkupPointer **ppPointer) = 0; + virtual HRESULT wxSTDCALL CreateMarkupContainer(wxIMarkupContainer **ppMarkupContainer) = 0; + virtual HRESULT wxSTDCALL CreateElement(wxELEMENT_TAG_ID tagID, OLECHAR *pchAttributes, IHTMLElement **ppElement) = 0; + virtual HRESULT wxSTDCALL CloneElement(IHTMLElement *pElemCloneThis, IHTMLElement **ppElementTheClone) = 0; + virtual HRESULT wxSTDCALL InsertElement(IHTMLElement *pElementInsert, wxIMarkupPointer *pPointerStart, wxIMarkupPointer *pPointerFinish) = 0; + virtual HRESULT wxSTDCALL RemoveElement(IHTMLElement *pElementRemove) = 0; + virtual HRESULT wxSTDCALL Remove(wxIMarkupPointer *pPointerStart, wxIMarkupPointer *pPointerFinish) = 0; + virtual HRESULT wxSTDCALL Copy(wxIMarkupPointer *pPointerSourceStart, wxIMarkupPointer *pPointerSourceFinish, wxIMarkupPointer *pPointerTarget) = 0; + virtual HRESULT wxSTDCALL Move(wxIMarkupPointer *pPointerSourceStart, wxIMarkupPointer *pPointerSourceFinish, wxIMarkupPointer *pPointerTarget) = 0; + virtual HRESULT wxSTDCALL InsertText(OLECHAR *pchText, long cch, wxIMarkupPointer *pPointerTarget) = 0; + virtual HRESULT wxSTDCALL ParseString(OLECHAR *pchHTML, DWORD dwFlags, wxIMarkupContainer **ppContainerResult, wxIMarkupPointer *ppPointerStart, wxIMarkupPointer *ppPointerFinish) = 0; + virtual HRESULT wxSTDCALL ParseGlobal(HGLOBAL hglobalHTML, DWORD dwFlags, wxIMarkupContainer **ppContainerResult, wxIMarkupPointer *pPointerStart, wxIMarkupPointer *pPointerFinish) = 0; + virtual HRESULT wxSTDCALL IsScopedElement(IHTMLElement *pElement, BOOL *pfScoped) = 0; + virtual HRESULT wxSTDCALL GetElementTagId(IHTMLElement *pElement, wxELEMENT_TAG_ID *ptagId) = 0; + virtual HRESULT wxSTDCALL GetTagIDForName(BSTR bstrName, wxELEMENT_TAG_ID *ptagId) = 0; + virtual HRESULT wxSTDCALL GetNameForTagID(wxELEMENT_TAG_ID tagId, BSTR *pbstrName) = 0; + virtual HRESULT wxSTDCALL MovePointersToRange(wxIHTMLTxtRange *pIRange, wxIMarkupPointer *pPointerStart, wxIMarkupPointer *pPointerFinish) = 0; + virtual HRESULT wxSTDCALL MoveRangeToPointers(wxIMarkupPointer *pPointerStart, wxIMarkupPointer *pPointerFinish, wxIHTMLTxtRange *pIRange) = 0; + virtual HRESULT wxSTDCALL BeginUndoUnit(OLECHAR *pchTitle) = 0; + virtual HRESULT wxSTDCALL EndUndoUnit(void) = 0; +}; + +/* end of mshtml.h */ + +/* WinInet.h */ + +#ifndef HTTP_STATUS_BAD_REQUEST +#define HTTP_STATUS_BAD_REQUEST 400 +#endif + +#ifndef HTTP_STATUS_DENIED +#define HTTP_STATUS_DENIED 401 +#endif + +#ifndef HTTP_STATUS_PAYMENT_REQ +#define HTTP_STATUS_PAYMENT_REQ 402 +#endif + +#ifndef HTTP_STATUS_FORBIDDEN +#define HTTP_STATUS_FORBIDDEN 403 +#endif + +#ifndef HTTP_STATUS_NOT_FOUND +#define HTTP_STATUS_NOT_FOUND 404 +#endif + +#ifndef HTTP_STATUS_BAD_METHOD +#define HTTP_STATUS_BAD_METHOD 405 +#endif + +#ifndef HTTP_STATUS_NONE_ACCEPTABLE +#define HTTP_STATUS_NONE_ACCEPTABLE 406 +#endif + +#ifndef HTTP_STATUS_PROXY_AUTH_REQ +#define HTTP_STATUS_PROXY_AUTH_REQ 407 +#endif + +#ifndef HTTP_STATUS_REQUEST_TIMEOUT +#define HTTP_STATUS_REQUEST_TIMEOUT 408 +#endif + +#ifndef HTTP_STATUS_CONFLICT +#define HTTP_STATUS_CONFLICT 409 +#endif + +#ifndef HTTP_STATUS_GONE +#define HTTP_STATUS_GONE 410 +#endif + +#ifndef HTTP_STATUS_LENGTH_REQUIRED +#define HTTP_STATUS_LENGTH_REQUIRED 411 +#endif + +#ifndef HTTP_STATUS_PRECOND_FAILED +#define HTTP_STATUS_PRECOND_FAILED 412 +#endif + +#ifndef HTTP_STATUS_REQUEST_TOO_LARGE +#define HTTP_STATUS_REQUEST_TOO_LARGE 413 +#endif + +#ifndef HTTP_STATUS_URI_TOO_LONG +#define HTTP_STATUS_URI_TOO_LONG 414 +#endif + +#ifndef HTTP_STATUS_UNSUPPORTED_MEDIA +#define HTTP_STATUS_UNSUPPORTED_MEDIA 415 +#endif + +#ifndef HTTP_STATUS_RETRY_WITH +#define HTTP_STATUS_RETRY_WITH 449 +#endif + +#ifndef HTTP_STATUS_SERVER_ERROR +#define HTTP_STATUS_SERVER_ERROR 500 +#endif + +#ifndef HTTP_STATUS_NOT_SUPPORTED +#define HTTP_STATUS_NOT_SUPPORTED 501 +#endif + +#ifndef HTTP_STATUS_BAD_GATEWAY +#define HTTP_STATUS_BAD_GATEWAY 502 +#endif + +#ifndef HTTP_STATUS_SERVICE_UNAVAIL +#define HTTP_STATUS_SERVICE_UNAVAIL 503 +#endif + +#ifndef HTTP_STATUS_GATEWAY_TIMEOUT +#define HTTP_STATUS_GATEWAY_TIMEOUT 504 +#endif + +#ifndef HTTP_STATUS_VERSION_NOT_SUP +#define HTTP_STATUS_VERSION_NOT_SUP 505 +#endif + +/* end of WinInet.h */ + diff --git a/Externals/wxWidgets3/include/wx/msw/webviewhistoryitem_ie.h b/Externals/wxWidgets3/include/wx/msw/webviewhistoryitem_ie.h index acfec70014..6edfbb3932 100644 --- a/Externals/wxWidgets3/include/wx/msw/webviewhistoryitem_ie.h +++ b/Externals/wxWidgets3/include/wx/msw/webviewhistoryitem_ie.h @@ -2,7 +2,6 @@ // Name: include/wx/msw/webviewhistoryitem.h // Purpose: wxWebViewHistoryItem header for MSW // Author: Steven Lamerton -// Id: $Id: webviewhistoryitem_ie.h 69074 2011-09-12 18:35:39Z SJL $ // Copyright: (c) 2011 Steven Lamerton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,7 +16,7 @@ class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem { public: - wxWebViewHistoryItem(const wxString& url, const wxString& title) : + wxWebViewHistoryItem(const wxString& url, const wxString& title) : m_url(url), m_title(title) {} wxString GetUrl() { return m_url; } wxString GetTitle() { return m_title; } diff --git a/Externals/wxWidgets3/include/wx/msw/wince/checklst.h b/Externals/wxWidgets3/include/wx/msw/wince/checklst.h index ef44415177..61121298bc 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/checklst.h +++ b/Externals/wxWidgets3/include/wx/msw/wince/checklst.h @@ -4,7 +4,6 @@ // Author: Wlodzimierz ABX Skiba // Modified by: // Created: 30.10.2005 -// RCS-ID: $Id: checklst.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Wlodzimierz Skiba // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wince/chkconf.h b/Externals/wxWidgets3/include/wx/msw/wince/chkconf.h index 872c8d8ccb..00785067ee 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/chkconf.h +++ b/Externals/wxWidgets3/include/wx/msw/wince/chkconf.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-03-07 -// RCS-ID: $Id: chkconf.h 60495 2009-05-03 07:43:00Z VZ $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wince/choicece.h b/Externals/wxWidgets3/include/wx/msw/wince/choicece.h index 255027d57c..e280be7fdc 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/choicece.h +++ b/Externals/wxWidgets3/include/wx/msw/wince/choicece.h @@ -4,7 +4,6 @@ // Author: Wlodzimierz ABX Skiba // Modified by: // Created: 29.07.2004 -// RCS-ID: $Id: choicece.h 64940 2010-07-13 13:29:13Z VZ $ // Copyright: (c) Wlodzimierz Skiba // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wince/helpwce.h b/Externals/wxWidgets3/include/wx/msw/wince/helpwce.h index 669d408fb0..20cd4e405c 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/helpwce.h +++ b/Externals/wxWidgets3/include/wx/msw/wince/helpwce.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 2003-07-12 -// RCS-ID: $Id: helpwce.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wince/libraries.h b/Externals/wxWidgets3/include/wx/msw/wince/libraries.h index 0d3c9a6226..d05e604ca2 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/libraries.h +++ b/Externals/wxWidgets3/include/wx/msw/wince/libraries.h @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 2004-04-11 -// RCS-ID: $Id: libraries.h 52163 2008-02-28 00:22:02Z VZ $ // Copyright: (c) 2004 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wince/missing.h b/Externals/wxWidgets3/include/wx/msw/wince/missing.h index 5f45e0a4d1..73f48bea1e 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/missing.h +++ b/Externals/wxWidgets3/include/wx/msw/wince/missing.h @@ -4,7 +4,6 @@ // Author: Marco Cavallini // Modified by: // Created: 16/11/2002 -// RCS-ID: $Id: missing.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) KOAN SAS ( www.koansoftware.com ) // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wince/resources.h b/Externals/wxWidgets3/include/wx/msw/wince/resources.h index 3ccb65f567..f080518950 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/resources.h +++ b/Externals/wxWidgets3/include/wx/msw/wince/resources.h @@ -4,7 +4,6 @@ // Author: Wlodzimierz ABX Skiba // Modified by: // Created: 01.05.2004 -// RCS-ID: $Id: resources.h 64940 2010-07-13 13:29:13Z VZ $ // Copyright: (c) Wlodzimierz Skiba // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wince/setup.h b/Externals/wxWidgets3/include/wx/msw/wince/setup.h index a22f9ec48f..9da5f70df9 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/setup.h +++ b/Externals/wxWidgets3/include/wx/msw/wince/setup.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: setup.h 69463 2011-10-18 21:57:02Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -151,7 +150,7 @@ // In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If // this causes problems (e.g. link errors), set this to 0. You may need to set // this to 0 if using templates (at least for VC++). This switch is currently -// ignored for mingw / cygwin / CodeWarrior +// ignored for MinGW/Cygwin. // // Default is 0 // @@ -267,6 +266,17 @@ // Recommended setting: 1 if you want to support multiple languages #define wxUSE_PRINTF_POS_PARAMS 1 +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but must +// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using +// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS +// support that results in crashes when any TLS variables are used. So if you +// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set +// this to 0. +// +// Default is 1, but set to 0 if the scenario above is applicable. +#define wxUSE_COMPILER_TLS 1 // ---------------------------------------------------------------------------- // Interoperability with the standard library. @@ -1087,6 +1097,16 @@ // Recommended setting: 1 #define wxUSE_NOTIFICATION_MESSAGE 1 +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + // wxRichToolTip is a customizable tooltip class which has more functionality // than the stock (but native, unlike this class) wxToolTip. // diff --git a/Externals/wxWidgets3/include/wx/msw/wince/smartphone.rc b/Externals/wxWidgets3/include/wx/msw/wince/smartphone.rc index d1d7a53fb1..89ac65f450 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/smartphone.rc +++ b/Externals/wxWidgets3/include/wx/msw/wince/smartphone.rc @@ -4,7 +4,6 @@ // Author: Wlodzimierz ABX Skiba // Modified by: // Created: 01.05.2004 -// RCS-ID: $Id: smartphone.rc 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Wlodzimierz Skiba // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wince/tbarwce.h b/Externals/wxWidgets3/include/wx/msw/wince/tbarwce.h index 41d44623b6..12cfd7e8fe 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/tbarwce.h +++ b/Externals/wxWidgets3/include/wx/msw/wince/tbarwce.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 2003-07-12 -// RCS-ID: $Id: tbarwce.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -29,7 +28,7 @@ public: wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER | wxTB_HORIZONTAL, + long style = wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr) { Create(parent, id, pos, size, style, name); @@ -39,7 +38,7 @@ public: wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER | wxTB_HORIZONTAL, + long style = wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr); // override/implement base class virtuals @@ -88,7 +87,7 @@ public: wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER | wxTB_HORIZONTAL, + long style = wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr, wxMenuBar* menuBar = NULL) { @@ -101,7 +100,7 @@ public: wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER | wxTB_HORIZONTAL, + long style = wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr, wxMenuBar* menuBar = NULL); diff --git a/Externals/wxWidgets3/include/wx/msw/wince/textctrlce.h b/Externals/wxWidgets3/include/wx/msw/wince/textctrlce.h index 0f4ecbca5b..3c51633b0a 100644 --- a/Externals/wxWidgets3/include/wx/msw/wince/textctrlce.h +++ b/Externals/wxWidgets3/include/wx/msw/wince/textctrlce.h @@ -4,7 +4,6 @@ // Author: Wlodzimierz ABX Skiba // Modified by: // Created: 30.08.2004 -// RCS-ID: $Id: textctrlce.h 64940 2010-07-13 13:29:13Z VZ $ // Copyright: (c) Wlodzimierz Skiba // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/window.h b/Externals/wxWidgets3/include/wx/msw/window.h index afb6df7a60..3475f3d6b7 100644 --- a/Externals/wxWidgets3/include/wx/msw/window.h +++ b/Externals/wxWidgets3/include/wx/msw/window.h @@ -5,7 +5,6 @@ // Modified by: Vadim Zeitlin on 13.05.99: complete refont of message handling, // elimination of Default(), ... // Created: 01/02/97 -// RCS-ID: $Id: window.h 69348 2011-10-09 22:01:57Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -67,6 +66,9 @@ public: virtual void Raise(); virtual void Lower(); + virtual bool BeginRepositioningChildren(); + virtual void EndRepositioningChildren(); + virtual bool Show(bool show = true); virtual bool ShowWithEffect(wxShowEffect effect, unsigned timeout = 0) @@ -345,12 +347,13 @@ public: bool HandleMouseEvent(WXUINT msg, int x, int y, WXUINT flags); bool HandleMouseMove(int x, int y, WXUINT flags); - bool HandleMouseWheel(WXWPARAM wParam, WXLPARAM lParam); + bool HandleMouseWheel(wxMouseWheelAxis axis, + WXWPARAM wParam, WXLPARAM lParam); bool HandleChar(WXWPARAM wParam, WXLPARAM lParam); bool HandleKeyDown(WXWPARAM wParam, WXLPARAM lParam); bool HandleKeyUp(WXWPARAM wParam, WXLPARAM lParam); -#if wxUSE_ACCEL +#if wxUSE_HOTKEY bool HandleHotKey(WXWPARAM wParam, WXLPARAM lParam); #endif #ifdef __WIN32__ @@ -409,6 +412,17 @@ public: // weird wxToolBar case and MSWGetBgBrushForChild() itself is used by // MSWGetBgBrush() to actually find the right brush to use. + // Adjust the origin for the brush returned by MSWGetBgBrushForChild(). + // + // This needs to be overridden for scrolled windows to ensure that the + // scrolling of their associated DC is taken into account. + // + // Both parameters must be non-NULL. + virtual void MSWAdjustBrushOrg(int* WXUNUSED(xOrg), + int* WXUNUSED(yOrg)) const + { + } + // The brush returned from here must remain valid at least until the next // event loop iteration. Returning 0, as is done by default, indicates // there is no custom background brush. diff --git a/Externals/wxWidgets3/include/wx/msw/winundef.h b/Externals/wxWidgets3/include/wx/msw/winundef.h index 4f1f74791a..af44c49aea 100644 --- a/Externals/wxWidgets3/include/wx/msw/winundef.h +++ b/Externals/wxWidgets3/include/wx/msw/winundef.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 16.05.99 -// RCS-ID: $Id: winundef.h 63658 2010-03-09 11:08:52Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -248,26 +247,20 @@ #endif -/* - When this file is included, sometimes the wxCHECK_W32API_VERSION macro - is undefined. With for example CodeWarrior this gives problems with - the following code: - #if 0 && wxCHECK_W32API_VERSION( 0, 5 ) - Because CodeWarrior does macro expansion before test evaluation. - We define wxCHECK_W32API_VERSION here if it's undefined. -*/ -#if !defined(__GNUG__) && !defined(wxCHECK_W32API_VERSION) - #define wxCHECK_W32API_VERSION(maj, min) (0) -#endif - // StartDoc #ifdef StartDoc #undef StartDoc - #if defined( __GNUG__ ) && !wxCHECK_W32API_VERSION( 0, 5 ) - #define DOCINFOW DOCINFO - #define DOCINFOA DOCINFO + + // Work around a bug in very old MinGW headers that didn't define DOCINFOW + // and DOCINFOA but only DOCINFO in both ANSI and Unicode. + #if defined( __GNUG__ ) + #if !wxCHECK_W32API_VERSION( 0, 5 ) + #define DOCINFOW DOCINFO + #define DOCINFOA DOCINFO + #endif #endif + #ifdef _UNICODE inline int StartDoc(HDC h, CONST DOCINFOW* info) { diff --git a/Externals/wxWidgets3/include/wx/msw/wrapcctl.h b/Externals/wxWidgets3/include/wx/msw/wrapcctl.h index 3164ec3856..036e191139 100644 --- a/Externals/wxWidgets3/include/wx/msw/wrapcctl.h +++ b/Externals/wxWidgets3/include/wx/msw/wrapcctl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 03.08.2003 -// RCS-ID: $Id: wrapcctl.h 57093 2008-12-03 21:53:10Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wrapcdlg.h b/Externals/wxWidgets3/include/wx/msw/wrapcdlg.h index 733e1b5f99..fe663119ec 100644 --- a/Externals/wxWidgets3/include/wx/msw/wrapcdlg.h +++ b/Externals/wxWidgets3/include/wx/msw/wrapcdlg.h @@ -4,7 +4,6 @@ // Author: Wlodzimierz ABX Skiba // Modified by: // Created: 22.03.2005 -// RCS-ID: $Id: wrapcdlg.h 43151 2006-11-07 09:08:33Z JS $ // Copyright: (c) 2005 Wlodzimierz Skiba // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wrapgdip.h b/Externals/wxWidgets3/include/wx/msw/wrapgdip.h index 0dcf913e09..04d4009a67 100644 --- a/Externals/wxWidgets3/include/wx/msw/wrapgdip.h +++ b/Externals/wxWidgets3/include/wx/msw/wrapgdip.h @@ -3,7 +3,6 @@ // Purpose: wrapper around header // Author: Vadim Zeitlin // Created: 2007-03-15 -// RCS-ID: $Id: wrapgdip.h 44815 2007-03-15 03:41:52Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wrapshl.h b/Externals/wxWidgets3/include/wx/msw/wrapshl.h index 872f78255c..8826a039ba 100644 --- a/Externals/wxWidgets3/include/wx/msw/wrapshl.h +++ b/Externals/wxWidgets3/include/wx/msw/wrapshl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2004-10-19 -// RCS-ID: $Id: wrapshl.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) 2004 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/msw/wrapwin.h b/Externals/wxWidgets3/include/wx/msw/wrapwin.h index 8ddd5fe79e..266179847e 100644 --- a/Externals/wxWidgets3/include/wx/msw/wrapwin.h +++ b/Externals/wxWidgets3/include/wx/msw/wrapwin.h @@ -3,7 +3,6 @@ // Purpose: Wrapper around , to be included instead of it // Author: Vaclav Slavik // Created: 2003/07/22 -// RCS-ID: $Id: wrapwin.h 69784 2011-11-17 16:43:34Z VZ $ // Copyright: (c) 2003 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -72,7 +71,7 @@ // #undef the macros defined in winsows.h which conflict with code elsewhere #include "wx/msw/winundef.h" -// Types DWORD_PTR, ULONG_PTR and so on are used for 64-bit compatability +// Types DWORD_PTR, ULONG_PTR and so on are used for 64-bit compatibility // in the WINAPI SDK (they are an integral type that is the size of a // pointer) on MSVC 7 and later. However, they are not available in older // Platform SDKs, and since they are typedefs and not #defines we simply diff --git a/Externals/wxWidgets3/include/wx/msw/wx.rc b/Externals/wxWidgets3/include/wx/msw/wx.rc index 5caede958e..702861a287 100644 --- a/Externals/wxWidgets3/include/wx/msw/wx.rc +++ b/Externals/wxWidgets3/include/wx/msw/wx.rc @@ -6,15 +6,10 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: wx.rc 46316 2007-06-04 09:01:37Z VS $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__MWERKS__) -#include -#else #include -#endif #if defined(_WIN32_WCE) #include "wx/msw/wince/wince.rc" @@ -54,7 +49,6 @@ WXCURSOR_PBRUSH CURSOR DISCARDABLE "wx/msw/pbrush.cur" WXCURSOR_PLEFT CURSOR DISCARDABLE "wx/msw/pntleft.cur" WXCURSOR_PRIGHT CURSOR DISCARDABLE "wx/msw/pntright.cur" WXCURSOR_BLANK CURSOR DISCARDABLE "wx/msw/blank.cur" -WXCURSOR_RIGHT_ARROW CURSOR DISCARDABLE "wx/msw/rightarr.cur" WXCURSOR_CROSS CURSOR DISCARDABLE "wx/msw/cross.cur" @@ -94,14 +88,15 @@ wxBITMAP_STD_COLOURS BITMAP "wx/msw/colours.bmp" ////////////////////////////////////////////////////////////////////////////// // -// Manifest file for Windows XP +// Include manifest file for common controls library v6 required to use themes. +// +// Predefining wxUSE_NO_MANIFEST as 1 always disables the use of the manifest. +// Otherwise we include it only if wxUSE_RC_MANIFEST is defined as 1. // #if !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0) -// Visual Studio 2005 generates the manifest automatically and so we -// shouldn't include it in the resources manually: -#if !defined(WX_MSC_FULL_VER) || WX_MSC_FULL_VER < 140040130 +#if defined(wxUSE_RC_MANIFEST) && wxUSE_RC_MANIFEST // see "about isolated applications" topic in MSDN #ifdef ISOLATION_AWARE_ENABLED @@ -116,8 +111,16 @@ wxMANIFEST_ID 24 "wx/msw/amd64.manifest" wxMANIFEST_ID 24 "wx/msw/ia64.manifest" #elif defined(WX_CPU_X86) wxMANIFEST_ID 24 "wx/msw/wx.manifest" +#else +// Notice that if the manifest is included, WX_CPU_XXX constant corresponding +// to the architecture we're compiling for must be defined. This can be done +// either manually in your make/project file or by configuring the resource +// compiler paths to search in $(WXWIN)/lib/$(COMPILER_PREFIX)_lib/mswu[d] +// directory for its include files, as wx/msw/rcdefs.h file in this directory +// is generated during wxWidgets build and contains the correct definition. +#error "One of WX_CPU_XXX constants must be defined. See comment above." #endif -#endif // !defined(WX_MSC_FULL_VER) || WX_MSC_FULL_VER < 140040130 +#endif // wxUSE_RC_MANIFEST #endif // !defined(wxUSE_NO_MANIFEST) || (wxUSE_NO_MANIFEST == 0) diff --git a/Externals/wxWidgets3/include/wx/nativewin.h b/Externals/wxWidgets3/include/wx/nativewin.h index 20f637fb55..e0328e9583 100644 --- a/Externals/wxWidgets3/include/wx/nativewin.h +++ b/Externals/wxWidgets3/include/wx/nativewin.h @@ -3,7 +3,6 @@ // Purpose: classes allowing to wrap a native window handle // Author: Vadim Zeitlin // Created: 2008-03-05 -// RCS-ID: $Id: nativewin.h 62783 2009-12-05 17:31:07Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -39,9 +38,12 @@ typedef HWND wxNativeContainerWindowId; typedef HWND wxNativeContainerWindowHandle; #elif defined(__WXGTK__) - #include - - typedef GdkNativeWindow wxNativeContainerWindowId; + // GdkNativeWindow is guint32 under GDK/X11 and gpointer under GDK/WIN32 + #ifdef __UNIX__ + typedef unsigned long wxNativeContainerWindowId; + #else + typedef void *wxNativeContainerWindowId; + #endif typedef GdkWindow *wxNativeContainerWindowHandle; #else // no support for using native windows under this platform yet diff --git a/Externals/wxWidgets3/include/wx/nonownedwnd.h b/Externals/wxWidgets3/include/wx/nonownedwnd.h index 03888e4140..7d8709933d 100644 --- a/Externals/wxWidgets3/include/wx/nonownedwnd.h +++ b/Externals/wxWidgets3/include/wx/nonownedwnd.h @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 2006-12-24 -// RCS-ID: $Id: nonownedwnd.h 70813 2012-03-05 13:00:57Z VZ $ // Copyright: (c) 2006 TT-Solutions // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/notebook.h b/Externals/wxWidgets3/include/wx/notebook.h index 98bb521f37..1535229aa0 100644 --- a/Externals/wxWidgets3/include/wx/notebook.h +++ b/Externals/wxWidgets3/include/wx/notebook.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 01.02.01 -// RCS-ID: $Id: notebook.h 66555 2011-01-04 08:31:53Z SC $ // Copyright: (c) 1996-2000 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -132,7 +131,7 @@ public: virtual wxColour GetThemeBackgroundColour() const { return wxNullColour; } - // send wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING/ED events + // send wxEVT_NOTEBOOK_PAGE_CHANGING/ED events // returns false if the change to nPage is vetoed by the program bool SendPageChangingEvent(int nPage); @@ -169,14 +168,14 @@ protected: typedef wxBookCtrlEventFunction wxNotebookEventFunction; #define wxNotebookEventHandler(func) wxBookCtrlEventHandler(func) -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_NOTEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_NOTEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); #define EVT_NOTEBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_NOTEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) #define EVT_NOTEBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_NOTEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) // ---------------------------------------------------------------------------- // wxNotebook class itself @@ -200,6 +199,10 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING #include "wx/os2/notebook.h" #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED wxEVT_NOTEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING wxEVT_NOTEBOOK_PAGE_CHANGING + #endif // wxUSE_NOTEBOOK #endif diff --git a/Externals/wxWidgets3/include/wx/notifmsg.h b/Externals/wxWidgets3/include/wx/notifmsg.h index fd91fe2e3b..fe49c8763c 100644 --- a/Externals/wxWidgets3/include/wx/notifmsg.h +++ b/Externals/wxWidgets3/include/wx/notifmsg.h @@ -3,7 +3,6 @@ // Purpose: class allowing to show notification messages to the user // Author: Vadim Zeitlin // Created: 2007-11-19 -// RCS-ID: $Id: notifmsg.h 62071 2009-09-24 12:36:34Z JS $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -127,13 +126,14 @@ private: wxDECLARE_NO_COPY_CLASS(wxNotificationMessageBase); }; -#if defined(__WXGTK__) && (wxUSE_LIBHILDON || wxUSE_LIBHILDON2) - #include "wx/gtk/hildon/notifmsg.h" /* - TODO: provide support for - - libnotify (Gnome) - - Growl (http://growl.info/, OS X) + TODO: Implement under OS X using notification centre (10.8+) or + Growl (http://growl.info/) for the previous versions. */ +#if defined(__WXGTK__) && wxUSE_LIBNOTIFY + #include "wx/gtk/notifmsg.h" +#elif defined(__WXGTK__) && (wxUSE_LIBHILDON || wxUSE_LIBHILDON2) + #include "wx/gtk/hildon/notifmsg.h" #elif defined(__WXMSW__) && wxUSE_TASKBARICON && wxUSE_TASKBARICON_BALLOONS #include "wx/msw/notifmsg.h" #else diff --git a/Externals/wxWidgets3/include/wx/numdlg.h b/Externals/wxWidgets3/include/wx/numdlg.h index a3a1505fc2..c1c39742ec 100644 --- a/Externals/wxWidgets3/include/wx/numdlg.h +++ b/Externals/wxWidgets3/include/wx/numdlg.h @@ -4,7 +4,6 @@ // Author: John Labenski // Modified by: // Created: 07.02.04 (extracted from wx/textdlg.h) -// RCS-ID: $Id: numdlg.h 37157 2006-01-26 15:33:27Z ABX $ // Copyright: (c) John Labenski // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/object.h b/Externals/wxWidgets3/include/wx/object.h index 6e01ab8caa..04c6512254 100644 --- a/Externals/wxWidgets3/include/wx/object.h +++ b/Externals/wxWidgets3/include/wx/object.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Ron Lee // Created: 01/02/97 -// RCS-ID: $Id: object.h 66650 2011-01-08 08:03:42Z SC $ // Copyright: (c) 1997 Julian Smart // (c) 2001 Ron Lee // Licence: wxWindows licence @@ -195,9 +194,8 @@ inline T *wxCheckCast(const void *ptr, T * = NULL) #define _WX_WANT_DELETE_VOID_CONSTCHAR_SIZET #endif -// Only VC++ 6 and CodeWarrior get overloaded delete that matches new -#if (defined(__VISUALC__) && (__VISUALC__ >= 1200)) || \ - (defined(__MWERKS__) && (__MWERKS__ >= 0x2400)) +// Only VC++ 6 gets overloaded delete that matches new +#if (defined(__VISUALC__) && (__VISUALC__ >= 1200)) #define _WX_WANT_DELETE_VOID_WXCHAR_INT #endif @@ -213,12 +211,6 @@ inline T *wxCheckCast(const void *ptr, T * = NULL) #if !defined(__VISUALC__) #define _WX_WANT_ARRAY_DELETE_VOID #endif - - // Only CodeWarrior 6 or higher - #if defined(__MWERKS__) && (__MWERKS__ >= 0x2400) - #define _WX_WANT_ARRAY_DELETE_VOID_WXCHAR_INT - #endif - #endif // wxUSE_ARRAY_MEMORY_OPERATORS #endif // wxUSE_MEMORY_TRACING diff --git a/Externals/wxWidgets3/include/wx/odcombo.h b/Externals/wxWidgets3/include/wx/odcombo.h index 6e2d9efb86..af0f1160d8 100644 --- a/Externals/wxWidgets3/include/wx/odcombo.h +++ b/Externals/wxWidgets3/include/wx/odcombo.h @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: Apr-30-2006 -// RCS-ID: $Id: odcombo.h 68460 2011-07-30 11:30:08Z VZ $ // Copyright: (c) Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -355,6 +354,10 @@ protected: // Callback for item width, or -1 for default/undetermined virtual wxCoord OnMeasureItemWidth( size_t item ) const; + // override base implementation so we can return the size for the + // largest item + virtual wxSize DoGetBestSize() const; + // Callback for background drawing. Flags are same as with // OnDrawItem. virtual void OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags ) const; diff --git a/Externals/wxWidgets3/include/wx/osx/accel.h b/Externals/wxWidgets3/include/wx/osx/accel.h index 1a61174518..a6690acf5f 100644 --- a/Externals/wxWidgets3/include/wx/osx/accel.h +++ b/Externals/wxWidgets3/include/wx/osx/accel.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: accel.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/anybutton.h b/Externals/wxWidgets3/include/wx/osx/anybutton.h index 9e11031ae8..ffa28dfb6c 100644 --- a/Externals/wxWidgets3/include/wx/osx/anybutton.h +++ b/Externals/wxWidgets3/include/wx/osx/anybutton.h @@ -3,7 +3,6 @@ // Purpose: wxAnyButton class // Author: Stefan Csomor // Created: 1998-01-01 (extracted from button.h) -// RCS-ID: $Id: anybutton.h 67931 2011-06-14 13:00:42Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/app.h b/Externals/wxWidgets3/include/wx/osx/app.h index 3814c79462..723841913c 100644 --- a/Externals/wxWidgets3/include/wx/osx/app.h +++ b/Externals/wxWidgets3/include/wx/osx/app.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: app.h 68617 2011-08-09 22:17:12Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -83,14 +82,21 @@ public: // TODO change semantics to be in line with cocoa (make autrelease NOT increase the count) void MacAddToAutorelease( void* cfrefobj ); void MacReleaseAutoreleasePool(); + public: static wxWindow* s_captureWindow ; static long s_lastModifiers ; int m_nCmdShow; -private: // mac specifics +protected: +#if wxOSX_USE_COCOA + // override for support of custom app controllers + virtual WX_NSObject OSXCreateAppController(); +#endif + +private: virtual bool DoInitGui(); virtual void DoCleanUp(); @@ -109,10 +115,10 @@ public: // For embedded use. By default does nothing. virtual void MacHandleUnhandledEvent( WXEVENTREF ev ); - bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ; - bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ; - bool MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ; - void MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymessage , long modifiers , long when , short wherex , short wherey , wxChar uniChar ) ; + bool MacSendKeyDownEvent( wxWindow* focus , long keyval , long modifiers , long when , wxChar uniChar ) ; + bool MacSendKeyUpEvent( wxWindow* focus , long keyval , long modifiers , long when , wxChar uniChar ) ; + bool MacSendCharEvent( wxWindow* focus , long keymessage , long modifiers , long when , wxChar uniChar ) ; + void MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymessage , long modifiers , long when , wxChar uniChar ) ; #if wxOSX_USE_CARBON // we only have applescript on these virtual short MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; @@ -135,7 +141,23 @@ public: virtual void MacNewFile() ; // in response of a reopen-application apple event virtual void MacReopenApp() ; +#if wxOSX_USE_COCOA_OR_IPHONE + // immediately before the native event loop launches + virtual void OSXOnWillFinishLaunching(); + // immediately when the native event loop starts, no events have been served yet + virtual void OSXOnDidFinishLaunching(); + // OS asks to terminate app, return no to stay running + virtual bool OSXOnShouldTerminate(); + // before application terminates + virtual void OSXOnWillTerminate(); +private: + bool m_onInitResult; + +public: + +#endif + // Hide the application windows the same as the system hide command would do it. void MacHideApp(); diff --git a/Externals/wxWidgets3/include/wx/osx/bitmap.h b/Externals/wxWidgets3/include/wx/osx/bitmap.h index 0f2d861083..8f51d7678f 100644 --- a/Externals/wxWidgets3/include/wx/osx/bitmap.h +++ b/Externals/wxWidgets3/include/wx/osx/bitmap.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: bitmap.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -57,6 +56,8 @@ public: bool Create(const wxBitmap& bitmap); bool Create(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ; + wxBitmap GetBitmap() const; + // Implementation below void Init() ; @@ -102,14 +103,19 @@ public: wxBitmap(const void* data, wxBitmapType type, int width, int height, int depth = 1); // creates an bitmap from the native image format - wxBitmap(CGImageRef image); + wxBitmap(CGImageRef image, double scale = 1.0); + wxBitmap(WX_NSImage image); + wxBitmap(CGContextRef bitmapcontext); + // Create a bitmap compatible with the given DC + wxBitmap(int width, int height, const wxDC& dc); + // If depth is omitted, will create a bitmap compatible with the display wxBitmap(int width, int height, int depth = -1) { (void)Create(width, height, depth); } wxBitmap(const wxSize& sz, int depth = -1) { (void)Create(sz, depth); } // Convert from wxImage: - wxBitmap(const wxImage& image, int depth = -1); + wxBitmap(const wxImage& image, int depth = -1, double scale = 1.0); // Convert from wxIcon wxBitmap(const wxIcon& icon) { CopyFromIcon(icon); } @@ -126,7 +132,15 @@ public: { return Create(sz.GetWidth(), sz.GetHeight(), depth); } virtual bool Create(const void* data, wxBitmapType type, int width, int height, int depth = 1); - bool Create( CGImageRef image ); + bool Create( CGImageRef image, double scale = 1.0 ); + bool Create( WX_NSImage image ); + bool Create( CGContextRef bitmapcontext); + + // Create a bitmap compatible with the given DC, inheriting its magnification factor + bool Create(int width, int height, const wxDC& dc); + + // Create a bitmap with a scale factor, width and height are multiplied with that factor + bool CreateScaled(int logwidth, int logheight, int depth, double logicalScale); // virtual bool Create( WXHICON icon) ; virtual bool LoadFile(const wxString& name, wxBitmapType type = wxBITMAP_DEFAULT_TYPE); @@ -190,6 +204,7 @@ public: void *BeginRawAccess() ; void EndRawAccess() ; + double GetScaleFactor() const; protected: virtual wxGDIRefData *CreateGDIRefData() const; virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; diff --git a/Externals/wxWidgets3/include/wx/osx/bmpbuttn.h b/Externals/wxWidgets3/include/wx/osx/bmpbuttn.h index a84403be6b..4a045fe0b6 100644 --- a/Externals/wxWidgets3/include/wx/osx/bmpbuttn.h +++ b/Externals/wxWidgets3/include/wx/osx/bmpbuttn.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: bmpbuttn.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/brush.h b/Externals/wxWidgets3/include/wx/osx/brush.h index df68d1c9c8..dc04a09b3d 100644 --- a/Externals/wxWidgets3/include/wx/osx/brush.h +++ b/Externals/wxWidgets3/include/wx/osx/brush.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: brush.h 54874 2008-07-31 09:59:04Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/button.h b/Externals/wxWidgets3/include/wx/osx/button.h index a9a7abbd99..8e8752288c 100644 --- a/Externals/wxWidgets3/include/wx/osx/button.h +++ b/Externals/wxWidgets3/include/wx/osx/button.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: button.h 67931 2011-06-14 13:00:42Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -49,6 +48,10 @@ public: virtual bool OSXHandleClicked( double timestampsec ); +#if wxOSX_USE_COCOA + void OSXUpdateAfterLabelChange(const wxString& label); +#endif + protected: DECLARE_DYNAMIC_CLASS(wxButton) }; diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/chkconf.h b/Externals/wxWidgets3/include/wx/osx/carbon/chkconf.h index 3322f0dcb9..68e395429d 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/chkconf.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/chkconf.h @@ -4,7 +4,6 @@ * Author: Julian Smart * Modified by: * Created: 01/02/97 - * RCS-ID: $Id: chkconf.h 61926 2009-09-14 13:07:23Z SC $ * Copyright: (c) Julian Smart * Licence: wxWindows licence */ diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/dataview.h b/Externals/wxWidgets3/include/wx/osx/carbon/dataview.h index e4dfeb2940..6f7b05acdc 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/dataview.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/dataview.h @@ -2,7 +2,6 @@ // Name: wx/osx/carbon/dataview.h // Purpose: wxDataViewCtrl native implementation header for carbon // Author: -// Id: $Id: dataview.h 57374 2009-01-27 // Copyright: (c) 2009 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/drawer.h b/Externals/wxWidgets3/include/wx/osx/carbon/drawer.h index b56e82076b..b20c9dd512 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/drawer.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/drawer.h @@ -7,7 +7,6 @@ // Author: Jason Bagley // Modified by: // Created: 2004-30-01 -// RCS-ID: $Id: drawer.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Jason Bagley; Art & Logic, Inc. // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/evtloop.h b/Externals/wxWidgets3/include/wx/osx/carbon/evtloop.h index c327fff427..f18c7c9494 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/evtloop.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/evtloop.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2006-01-12 -// RCS-ID: $Id: evtloop.h 68302 2011-07-19 17:56:57Z SC $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -25,9 +24,8 @@ public: protected: virtual int DoDispatchTimeout(unsigned long timeout); - virtual void DoRun(); - - virtual void DoStop(); + virtual void OSXDoRun(); + virtual void OSXDoStop(); virtual CFRunLoopRef CFGetCurrentRunLoop() const; }; diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/mimetype.h b/Externals/wxWidgets3/include/wx/osx/carbon/mimetype.h index 61ab948825..837275285a 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/mimetype.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/mimetype.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 04/16/2005 -// RCS-ID: $Id: mimetype.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 2005 Ryan Norton () // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/private.h b/Externals/wxWidgets3/include/wx/osx/carbon/private.h index fb26d2687d..82db9b98e5 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/private.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/private.h @@ -6,7 +6,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: private.h 67233 2011-03-18 15:45:51Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -332,7 +331,6 @@ public : wxBitmap GetBitmap() const; void SetBitmap( const wxBitmap& bitmap ); void SetBitmapPosition( wxDirection dir ); - void SetupTabs( const wxNotebook ¬ebook ); void GetBestRect( wxRect *r ) const; bool IsEnabled() const; diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/private/mactext.h b/Externals/wxWidgets3/include/wx/osx/carbon/private/mactext.h index b298c33506..d665abaa0d 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/private/mactext.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/private/mactext.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 03/02/99 -// RCS-ID: $Id: mactext.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/private/overlay.h b/Externals/wxWidgets3/include/wx/osx/carbon/private/overlay.h index f684a407f4..f5ebe1d83e 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/private/overlay.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/private/overlay.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2006-10-20 -// RCS-ID: $Id: overlay.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/private/print.h b/Externals/wxWidgets3/include/wx/osx/carbon/private/print.h index 90d1875537..b00fd619ef 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/private/print.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/private/print.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 03/02/99 -// RCS-ID: $Id: print.h 65680 2010-09-30 11:44:45Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/private/timer.h b/Externals/wxWidgets3/include/wx/osx/carbon/private/timer.h index 7f34e6da7f..0d68d7a204 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/private/timer.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/private/timer.h @@ -3,7 +3,6 @@ // Purpose: wxTimer class // Author: Stefan Csomor // Created: 1998-01-01 -// RCS-ID: $Id: timer.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/region.h b/Externals/wxWidgets3/include/wx/osx/carbon/region.h index e15ca339d8..f9c3fe3dd3 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/region.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/region.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: region.h 69459 2011-10-18 21:56:40Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -55,6 +54,7 @@ protected: virtual bool DoOffset(wxCoord x, wxCoord y); virtual bool DoCombine(const wxRegion& region, wxRegionOp op); + virtual bool DoUnionWithRect(const wxRect& rect); private: DECLARE_DYNAMIC_CLASS(wxRegion) @@ -86,7 +86,7 @@ public: long GetWidth() const { return GetW(); } long GetH() const; long GetHeight() const { return GetH(); } - wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); } + wxRect GetRect() const { return wxRect((int)GetX(), (int)GetY(), (int)GetWidth(), (int)GetHeight()); } private: void SetRects(long numRects, wxRect *rects); diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/statbmp.h b/Externals/wxWidgets3/include/wx/osx/carbon/statbmp.h index 4ec79b1054..0f9ffb1763 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/statbmp.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/statbmp.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: statbmp.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/carbon/uma.h b/Externals/wxWidgets3/include/wx/osx/carbon/uma.h index cfb3f2f0cb..57b77f798c 100644 --- a/Externals/wxWidgets3/include/wx/osx/carbon/uma.h +++ b/Externals/wxWidgets3/include/wx/osx/carbon/uma.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 03/02/99 -// RCS-ID: $Id: uma.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/checkbox.h b/Externals/wxWidgets3/include/wx/osx/checkbox.h index fc8e4fa977..3ba0accc90 100644 --- a/Externals/wxWidgets3/include/wx/osx/checkbox.h +++ b/Externals/wxWidgets3/include/wx/osx/checkbox.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: checkbox.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/checklst.h b/Externals/wxWidgets3/include/wx/osx/checklst.h index 35aed903f3..c23d36f562 100644 --- a/Externals/wxWidgets3/include/wx/osx/checklst.h +++ b/Externals/wxWidgets3/include/wx/osx/checklst.h @@ -5,7 +5,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: checklst.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/chkconf.h b/Externals/wxWidgets3/include/wx/osx/chkconf.h index 211411c961..c960923cc8 100644 --- a/Externals/wxWidgets3/include/wx/osx/chkconf.h +++ b/Externals/wxWidgets3/include/wx/osx/chkconf.h @@ -4,7 +4,6 @@ * Author: Vadim Zeitlin * Modified by: * Created: 2005-04-05 (extracted from wx/chkconf.h) - * RCS-ID: $Id: chkconf.h 67497 2011-04-15 19:18:34Z DS $ * Copyright: (c) 2005 Vadim Zeitlin * Licence: wxWindows licence */ @@ -14,27 +13,6 @@ #ifndef _WX_OSX_CHKCONF_H_ #define _WX_OSX_CHKCONF_H_ - -#if wxUSE_STACKWALKER - /* not supported under Mac */ -# undef wxUSE_STACKWALKER -# define wxUSE_STACKWALKER 0 -#endif /* wxUSE_STACKWALKER */ - -/* - * disable the settings which don't work for some compilers - */ - -#if defined(__MWERKS__) - #undef wxUSE_DEBUG_NEW_ALWAYS - #define wxUSE_DEBUG_NEW_ALWAYS 0 - - /* DS: Fixes compilation when wxUSE_ON_FATAL_EXCEPTION is 1 */ - #ifndef wxTYPE_SA_HANDLER - #define wxTYPE_SA_HANDLER int - #endif -#endif - /* * check graphics context option, must be on for every os x platform * we only use core graphics now on all builds, try to catch attempts diff --git a/Externals/wxWidgets3/include/wx/osx/choice.h b/Externals/wxWidgets3/include/wx/osx/choice.h index 358c81f85e..0e108f4552 100644 --- a/Externals/wxWidgets3/include/wx/osx/choice.h +++ b/Externals/wxWidgets3/include/wx/osx/choice.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: choice.h 66993 2011-02-22 13:25:38Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -93,6 +92,10 @@ protected: wxArrayString m_strings; wxChoiceDataArray m_datas ; wxMenu* m_popUpMenu ; + +private: + // This should be called when the number of items in the control changes. + void DoAfterItemCountChange(); }; #endif diff --git a/Externals/wxWidgets3/include/wx/osx/clipbrd.h b/Externals/wxWidgets3/include/wx/osx/clipbrd.h index 5101b6700d..cba7a41e22 100644 --- a/Externals/wxWidgets3/include/wx/osx/clipbrd.h +++ b/Externals/wxWidgets3/include/wx/osx/clipbrd.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: clipbrd.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/cocoa/chkconf.h b/Externals/wxWidgets3/include/wx/osx/cocoa/chkconf.h index 3e1443eb11..9789e77d54 100644 --- a/Externals/wxWidgets3/include/wx/osx/cocoa/chkconf.h +++ b/Externals/wxWidgets3/include/wx/osx/cocoa/chkconf.h @@ -4,7 +4,6 @@ * Author: Stefan Csomor * Modified by: * Created: 2008-07-30 - * RCS-ID: $Id: chkconf.h 67232 2011-03-18 15:10:15Z DS $ * Copyright: (c) Stefan Csomor * Licence: wxWindows licence */ @@ -12,6 +11,17 @@ #ifndef _WX_OSX_COCOA_CHKCONF_H_ #define _WX_OSX_COCOA_CHKCONF_H_ +/* Many wchar functions (and also strnlen(), for some reason) are only + available since 10.7 so don't use them if we want to build the applications + that would run under 10.6 and earlier. */ +#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_7 +#define HAVE_STRNLEN 1 +#define HAVE_WCSDUP 1 +#define HAVE_WCSNLEN 1 +#define HAVE_WCSCASECMP 1 +#define HAVE_WCSNCASECMP 1 +#endif + /* * native (1) or emulated (0) toolbar */ @@ -20,6 +30,13 @@ #define wxOSX_USE_NATIVE_TOOLBAR 1 #endif +/* + * leave is isFlipped and don't override + */ +#ifndef wxOSX_USE_NATIVE_FLIPPED + #define wxOSX_USE_NATIVE_FLIPPED 1 +#endif + /* * text rendering system */ diff --git a/Externals/wxWidgets3/include/wx/osx/cocoa/dataview.h b/Externals/wxWidgets3/include/wx/osx/cocoa/dataview.h index 0859b2dbae..2d33fff661 100644 --- a/Externals/wxWidgets3/include/wx/osx/cocoa/dataview.h +++ b/Externals/wxWidgets3/include/wx/osx/cocoa/dataview.h @@ -2,7 +2,6 @@ // Name: wx/osx/cocoa/dataview.h // Purpose: wxDataViewCtrl native implementation header for carbon // Author: -// Id: $Id: dataview.h 57374 2009-01-27 // Copyright: (c) 2009 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/cocoa/evtloop.h b/Externals/wxWidgets3/include/wx/osx/cocoa/evtloop.h index 4dae4c2184..ab15dd94af 100644 --- a/Externals/wxWidgets3/include/wx/osx/cocoa/evtloop.h +++ b/Externals/wxWidgets3/include/wx/osx/cocoa/evtloop.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxGUIEventLoop for wxOSX/Cocoa // Author: Vadim Zeitlin // Created: 2008-12-28 -// RCS-ID: $Id: evtloop.h 68301 2011-07-19 16:17:44Z SC $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -23,12 +22,14 @@ public: virtual void WakeUp(); + void OSXUseLowLevelWakeup(bool useIt) + { m_osxLowLevelWakeUp = useIt ; } + protected: virtual int DoDispatchTimeout(unsigned long timeout); - virtual void DoRun(); - - virtual void DoStop(); + virtual void OSXDoRun(); + virtual void OSXDoStop(); virtual CFRunLoopRef CFGetCurrentRunLoop() const; @@ -39,6 +40,8 @@ protected: WXWindow m_dummyWindow; int m_modalNestedLevel; + + bool m_osxLowLevelWakeUp; }; #endif // _WX_OSX_COCOA_EVTLOOP_H_ diff --git a/Externals/wxWidgets3/include/wx/osx/cocoa/private.h b/Externals/wxWidgets3/include/wx/osx/cocoa/private.h index 0e4a19ac8c..9dcbf365b7 100644 --- a/Externals/wxWidgets3/include/wx/osx/cocoa/private.h +++ b/Externals/wxWidgets3/include/wx/osx/cocoa/private.h @@ -6,7 +6,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: private.h 70863 2012-03-10 13:13:51Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -39,9 +38,12 @@ OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage( CGContextRef inContext, const CGRect * inBounds, CGImageRef inImage) ; -WX_NSImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromCGImage( CGImageRef image ); -CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage ); +WX_NSImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromCGImage( CGImageRef image, double scale = 1.0 ); +CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage, double *scale = NULL ); +CGContextRef WXDLLIMPEXP_CORE wxOSXCreateBitmapContextFromNSImage( WX_NSImage nsimage); + wxBitmap WXDLLIMPEXP_CORE wxOSXCreateSystemBitmap(const wxString& id, const wxString &client, const wxSize& size); +WXWindow WXDLLIMPEXP_CORE wxOSXGetMainWindow(); class WXDLLIMPEXP_FWD_CORE wxDialog; @@ -88,6 +90,8 @@ public : virtual void SetNeedsDisplay( const wxRect* where = NULL ); virtual bool GetNeedsDisplay() const; + virtual void SetDrawingEnabled(bool enabled); + virtual bool CanFocus() const; // return true if successful virtual bool SetFocus(); @@ -104,6 +108,8 @@ public : void CaptureMouse(); void ReleaseMouse(); + void SetDropTarget(wxDropTarget* target); + wxInt32 GetValue() const; void SetValue( wxInt32 v ); wxBitmap GetBitmap() const; @@ -133,11 +139,17 @@ public : virtual void SetupKeyEvent(wxKeyEvent &wxevent, NSEvent * nsEvent, NSString* charString = NULL); virtual void SetupMouseEvent(wxMouseEvent &wxevent, NSEvent * nsEvent); + void SetupCoordinates(wxCoord &x, wxCoord &y, NSEvent *nsEvent); + virtual bool SetupCursor(NSEvent* event); +#if !wxOSX_USE_NATIVE_FLIPPED void SetFlipped(bool flipped); virtual bool IsFlipped() const { return m_isFlipped; } +#endif + virtual double GetContentScaleFactor() const; + // cocoa thunk connected calls virtual unsigned int draggingEntered(void* sender, WXWidget slf, void* _cmd); @@ -152,7 +164,9 @@ public : virtual bool acceptsFirstResponder(WXWidget slf, void* _cmd); virtual bool becomeFirstResponder(WXWidget slf, void* _cmd); virtual bool resignFirstResponder(WXWidget slf, void* _cmd); +#if !wxOSX_USE_NATIVE_FLIPPED virtual bool isFlipped(WXWidget slf, void* _cmd); +#endif virtual void drawRect(void* rect, WXWidget slf, void* _cmd); virtual void controlAction(WXWidget slf, void* _cmd, void* sender); @@ -165,7 +179,9 @@ public : protected: WXWidget m_osxView; NSEvent* m_lastKeyDownEvent; +#if !wxOSX_USE_NATIVE_FLIPPED bool m_isFlipped; +#endif // if it the control has an editor, that editor will already send some // events, don't resend them bool m_hasEditor; @@ -245,6 +261,8 @@ public : CGWindowLevel GetWindowLevel() const { return m_macWindowLevel; } void RestoreWindowLevel(); + + static WX_NSResponder GetNextFirstResponder() ; protected : CGWindowLevel m_macWindowLevel; WXWindow m_macWindow; @@ -252,7 +270,30 @@ protected : DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCocoaImpl) }; +DECLARE_WXCOCOA_OBJC_CLASS( wxNSButton ); + +class wxButtonCocoaImpl : public wxWidgetCocoaImpl, public wxButtonImpl +{ +public: + wxButtonCocoaImpl(wxWindowMac *wxpeer, wxNSButton *v); + virtual void SetBitmap(const wxBitmap& bitmap); +#if wxUSE_MARKUP + virtual void SetLabelMarkup(const wxString& markup); +#endif // wxUSE_MARKUP + + void SetPressedBitmap( const wxBitmap& bitmap ); + void GetLayoutInset(int &left , int &top , int &right, int &bottom) const; + void SetAcceleratorFromLabel(const wxString& label); + + NSButton *GetNSButton() const; +}; + #ifdef __OBJC__ + typedef void (*wxOSX_TextEventHandlerPtr)(NSView* self, SEL _cmd, NSString *event); + typedef void (*wxOSX_EventHandlerPtr)(NSView* self, SEL _cmd, NSEvent *event); + typedef BOOL (*wxOSX_PerformKeyEventHandlerPtr)(NSView* self, SEL _cmd, NSEvent *event); + typedef BOOL (*wxOSX_FocusHandlerPtr)(NSView* self, SEL _cmd); + WXDLLIMPEXP_CORE NSScreen* wxOSXGetMenuScreen(); WXDLLIMPEXP_CORE NSRect wxToNSRect( NSView* parent, const wxRect& r ); @@ -263,6 +304,8 @@ protected : NSRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin = true ); + WXDLLIMPEXP_CORE NSView* wxOSXGetViewFromResponder( NSResponder* responder ); + // used for many wxControls @interface wxNSButton : NSButton @@ -310,6 +353,18 @@ protected : @end + @interface wxNSComboBox : NSComboBox + { + wxNSTextFieldEditor* fieldEditor; + } + + - (wxNSTextFieldEditor*) fieldEditor; + - (void) setFieldEditor:(wxNSTextFieldEditor*) fieldEditor; + + @end + + + @interface wxNSMenu : NSMenu { wxMenuImpl* impl; @@ -414,6 +469,8 @@ const short kwxCursorLast = kwxCursorWatch; extern ClassicCursor gMacCursors[]; +extern NSLayoutManager* gNSLayoutManager; + #endif #endif diff --git a/Externals/wxWidgets3/include/wx/osx/cocoa/private/date.h b/Externals/wxWidgets3/include/wx/osx/cocoa/private/date.h index 09624ab3f9..e7d9d40b6d 100644 --- a/Externals/wxWidgets3/include/wx/osx/cocoa/private/date.h +++ b/Externals/wxWidgets3/include/wx/osx/cocoa/private/date.h @@ -3,7 +3,6 @@ // Purpose: NSDate-related helpers // Author: Vadim Zeitlin // Created: 2011-12-19 -// RCS-ID: $Id: date.h 70070 2011-12-20 21:27:09Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/cocoa/private/markuptoattr.h b/Externals/wxWidgets3/include/wx/osx/cocoa/private/markuptoattr.h index 542ae6b608..1d23d8e3b4 100644 --- a/Externals/wxWidgets3/include/wx/osx/cocoa/private/markuptoattr.h +++ b/Externals/wxWidgets3/include/wx/osx/cocoa/private/markuptoattr.h @@ -3,7 +3,6 @@ // Purpose: Class to convert markup to Cocoa attributed strings. // Author: Vadim Zeitlin // Created: 2011-02-22 -// RCS-ID: $Id: markuptoattr.h 67069 2011-02-27 12:48:46Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/cocoa/private/overlay.h b/Externals/wxWidgets3/include/wx/osx/cocoa/private/overlay.h index 2af5b14842..5a49e8104e 100644 --- a/Externals/wxWidgets3/include/wx/osx/cocoa/private/overlay.h +++ b/Externals/wxWidgets3/include/wx/osx/cocoa/private/overlay.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2006-10-20 -// RCS-ID: $Id: overlay.h 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/cocoa/private/textimpl.h b/Externals/wxWidgets3/include/wx/osx/cocoa/private/textimpl.h index 841bf5bd08..767f31cddb 100644 --- a/Externals/wxWidgets3/include/wx/osx/cocoa/private/textimpl.h +++ b/Externals/wxWidgets3/include/wx/osx/cocoa/private/textimpl.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 03/02/99 -// RCS-ID: $Id: textimpl.h 70354 2012-01-15 15:53:56Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -45,6 +44,10 @@ public : virtual bool SetHint(const wxString& hint); virtual void controlAction(WXWidget slf, void* _cmd, void *sender); + virtual bool becomeFirstResponder(WXWidget slf, void *_cmd); + virtual bool resignFirstResponder(WXWidget slf, void *_cmd); + + virtual void SetInternalSelection( long from , long to ); protected : NSTextField* m_textField; @@ -111,6 +114,10 @@ public : virtual void Popup(); virtual void Dismiss(); + virtual void SetEditable(bool editable); + + virtual void mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd); + private: NSComboBox* m_comboBox; }; diff --git a/Externals/wxWidgets3/include/wx/osx/colordlg.h b/Externals/wxWidgets3/include/wx/osx/colordlg.h index ea18736896..832b46cf0d 100644 --- a/Externals/wxWidgets3/include/wx/osx/colordlg.h +++ b/Externals/wxWidgets3/include/wx/osx/colordlg.h @@ -5,7 +5,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: colordlg.h 66615 2011-01-07 05:26:57Z PC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/combobox.h b/Externals/wxWidgets3/include/wx/osx/combobox.h index ba55d4f160..d7d16f503f 100644 --- a/Externals/wxWidgets3/include/wx/osx/combobox.h +++ b/Externals/wxWidgets3/include/wx/osx/combobox.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: combobox.h 69956 2011-12-08 14:47:37Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -104,10 +103,10 @@ class WXDLLIMPEXP_CORE wxComboBox : virtual unsigned int GetCount() const; + virtual void SetValue(const wxString& value); // these methods are provided by wxTextEntry for the native impl. #if wxOSX_USE_CARBON // Text field functions - virtual void SetValue(const wxString& value); virtual wxString GetValue() const; virtual void WriteText(const wxString& text); diff --git a/Externals/wxWidgets3/include/wx/osx/config_xcode.h b/Externals/wxWidgets3/include/wx/osx/config_xcode.h index 5c92ac2032..e293e90aea 100644 --- a/Externals/wxWidgets3/include/wx/osx/config_xcode.h +++ b/Externals/wxWidgets3/include/wx/osx/config_xcode.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 29.04.04 -// RCS-ID: $Id: config_xcode.h 70021 2011-12-16 22:12:49Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -117,7 +116,6 @@ #define HAVE_LANGINFO_H 1 #define HAVE_WCSRTOMBS 1 #define HAVE_FPUTWS 1 -#define HAVE_STRCASECMP_IN_STRING_H 1 #define HAVE_WPRINTF 1 #define HAVE_VSWPRINTF 1 #define HAVE_VSWSCANF 1 @@ -133,9 +131,9 @@ #define WXWIN_OS_DESCRIPTION "Darwin 7.9.0 Power Macintosh" #define PACKAGE_BUGREPORT "wx-dev@lists.wxwidgets.org" #define PACKAGE_NAME "wxWidgets" -#define PACKAGE_STRING "wxWidgets 2.9.4" +#define PACKAGE_STRING "wxWidgets 3.0.0" #define PACKAGE_TARNAME "wxwidgets" -#define PACKAGE_VERSION "2.9.4" +#define PACKAGE_VERSION "3.0.0" // for regex #define WX_NO_REGEX_ADVANCED 1 diff --git a/Externals/wxWidgets3/include/wx/osx/control.h b/Externals/wxWidgets3/include/wx/osx/control.h index e68dca2fe9..f0d7c4606b 100644 --- a/Externals/wxWidgets3/include/wx/osx/control.h +++ b/Externals/wxWidgets3/include/wx/osx/control.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: control.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/core/cfdataref.h b/Externals/wxWidgets3/include/wx/osx/core/cfdataref.h index 4f710f223a..6c604cd069 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/cfdataref.h +++ b/Externals/wxWidgets3/include/wx/osx/core/cfdataref.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2007/05/10 -// RCS-ID: $Id: cfdataref.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 2007 Stefan Csomor // Licence: wxWindows licence // Notes: See http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBinaryData/index.html diff --git a/Externals/wxWidgets3/include/wx/osx/core/cfref.h b/Externals/wxWidgets3/include/wx/osx/core/cfref.h index 8a9ea13c51..c4a6b3c17a 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/cfref.h +++ b/Externals/wxWidgets3/include/wx/osx/core/cfref.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: Stefan Csomor // Created: 2007/05/10 -// RCS-ID: $Id: cfref.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 2007 David Elliott , Stefan Csomor // Licence: wxWindows licence // Notes: See http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/index.html diff --git a/Externals/wxWidgets3/include/wx/osx/core/cfstring.h b/Externals/wxWidgets3/include/wx/osx/core/cfstring.h index 01275cf73c..cbe092463b 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/cfstring.h +++ b/Externals/wxWidgets3/include/wx/osx/core/cfstring.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2004-10-29 (from code in wx/mac/carbon/private.h) -// RCS-ID: $Id: cfstring.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence // Usage: Darwin (base library) @@ -71,8 +70,10 @@ public: wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) const; static wxString AsString( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; + static wxString AsStringWithNormalizationFormC( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; #if wxOSX_USE_COCOA_OR_IPHONE static wxString AsString( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; + static wxString AsStringWithNormalizationFormC( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; #endif #if wxOSX_USE_COCOA_OR_IPHONE diff --git a/Externals/wxWidgets3/include/wx/osx/core/colour.h b/Externals/wxWidgets3/include/wx/osx/core/colour.h index 2765a4c20b..004b627f61 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/colour.h +++ b/Externals/wxWidgets3/include/wx/osx/core/colour.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: colour.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/core/dataview.h b/Externals/wxWidgets3/include/wx/osx/core/dataview.h index f02d328eea..61d05bf309 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/dataview.h +++ b/Externals/wxWidgets3/include/wx/osx/core/dataview.h @@ -3,7 +3,6 @@ // Name: wx/osx/core/dataview.h // Purpose: wxDataViewCtrl native implementation header for OSX // Author: -// Id: $Id: dataview.h 57374 2009-01-27 // Copyright: (c) 2009 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/core/evtloop.h b/Externals/wxWidgets3/include/wx/osx/core/evtloop.h new file mode 100644 index 0000000000..d2ff91d4c2 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/osx/core/evtloop.h @@ -0,0 +1,114 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/evtloop.h +// Purpose: CoreFoundation-based event loop +// Author: Vadim Zeitlin +// Modified by: +// Created: 2006-01-12 +// Copyright: (c) 2006 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_CORE_EVTLOOP_H_ +#define _WX_OSX_CORE_EVTLOOP_H_ + +DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoop ); +DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoopObserver ); + +class WXDLLIMPEXP_FWD_BASE wxCFEventLoopPauseIdleEvents; + +class WXDLLIMPEXP_BASE wxCFEventLoop : public wxEventLoopBase +{ + friend class wxCFEventLoopPauseIdleEvents; +public: + wxCFEventLoop(); + virtual ~wxCFEventLoop(); + + // sets the "should exit" flag and wakes up the loop so that it terminates + // soon + virtual void ScheduleExit(int rc = 0); + + // return true if any events are available + virtual bool Pending() const; + + // dispatch a single event, return false if we should exit from the loop + virtual bool Dispatch(); + + // same as Dispatch() but doesn't wait for longer than the specified (in + // ms) timeout, return true if an event was processed, false if we should + // exit the loop or -1 if timeout expired + virtual int DispatchTimeout(unsigned long timeout); + + // implement this to wake up the loop: usually done by posting a dummy event + // to it (can be called from non main thread) + virtual void WakeUp(); + + virtual bool YieldFor(long eventsToProcess); + + bool ShouldProcessIdleEvents() const { return m_processIdleEvents ; } + +#if wxUSE_UIACTIONSIMULATOR + // notifies Yield and Dispatch to wait for at least one event before + // returning, this is necessary, because the synthesized events need to be + // converted by the OS before being available on the native event queue + void SetShouldWaitForEvent(bool should) { m_shouldWaitForEvent = should; } +#endif +protected: + // enters a loop calling OnNextIteration(), Pending() and Dispatch() and + // terminating when Exit() is called + virtual int DoRun(); + + void CommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity); + void DefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity); + + // set to false to avoid idling at unexpected moments - eg when having native message boxes + void SetProcessIdleEvents(bool process) { m_processIdleEvents = process; } + + static void OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info); + static void OSXDefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info); + + // get the currently executing CFRunLoop + virtual CFRunLoopRef CFGetCurrentRunLoop() const; + + virtual int DoDispatchTimeout(unsigned long timeout); + + virtual void OSXDoRun(); + virtual void OSXDoStop(); + + // the loop exit code + int m_exitcode; + + // cfrunloop + CFRunLoopRef m_runLoop; + + // common modes runloop observer + CFRunLoopObserverRef m_commonModeRunLoopObserver; + + // default mode runloop observer + CFRunLoopObserverRef m_defaultModeRunLoopObserver; + + // set to false to avoid idling at unexpected moments - eg when having native message boxes + bool m_processIdleEvents; + +#if wxUSE_UIACTIONSIMULATOR + bool m_shouldWaitForEvent; +#endif +private: + // process all already pending events and dispatch a new one (blocking + // until it appears in the event queue if necessary) + // + // returns the return value of DoDispatchTimeout() + int DoProcessEvents(); + + wxDECLARE_NO_COPY_CLASS(wxCFEventLoop); +}; + +class WXDLLIMPEXP_BASE wxCFEventLoopPauseIdleEvents : public wxObject +{ +public: + wxCFEventLoopPauseIdleEvents(); + virtual ~wxCFEventLoopPauseIdleEvents(); +private: + bool m_formerState; +}; + +#endif // _WX_OSX_EVTLOOP_H_ diff --git a/Externals/wxWidgets3/include/wx/osx/core/hid.h b/Externals/wxWidgets3/include/wx/osx/core/hid.h index 2738f5a31b..20c1a7ba41 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/hid.h +++ b/Externals/wxWidgets3/include/wx/osx/core/hid.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 11/11/2003 -// RCS-ID: $Id: hid.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -34,7 +33,6 @@ //Darn apple - doesn't properly wrap their headers in extern "C"! //http://www.macosx.com/forums/archive/index.php/t-68069.html -//Needed for codewarrior link error with mach_port_deallocate() extern "C" { #include } diff --git a/Externals/wxWidgets3/include/wx/osx/core/joystick.h b/Externals/wxWidgets3/include/wx/osx/core/joystick.h index 4af96dae10..36941b5b0b 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/joystick.h +++ b/Externals/wxWidgets3/include/wx/osx/core/joystick.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 2/13/2005 -// RCS-ID: $Id: joystick.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/core/mimetype.h b/Externals/wxWidgets3/include/wx/osx/core/mimetype.h index a6e5b1ead9..7f92a990ff 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/mimetype.h +++ b/Externals/wxWidgets3/include/wx/osx/core/mimetype.h @@ -4,7 +4,6 @@ // Author: Neil Perkins // Modified by: // Created: 2010-05-15 -// RCS-ID: $Id: mimetype.h 68563 2011-08-05 19:02:26Z VZ $ // Copyright: (C) 2010 Neil Perkins // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/core/objcid.h b/Externals/wxWidgets3/include/wx/osx/core/objcid.h new file mode 100644 index 0000000000..35238bb891 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/osx/core/objcid.h @@ -0,0 +1,23 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/osx/core/objcid.h +// Purpose: Define wxObjCID working in both C++ and Objective-C. +// Author: Vadim Zeitlin +// Created: 2012-05-20 +// Copyright: (c) 2012 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_OSX_CORE_OBJCID_H_ +#define _WX_OSX_CORE_OBJCID_H_ + +// ---------------------------------------------------------------------------- +// wxObjCID: Equivalent of Objective-C "id" that works in C++ code. +// ---------------------------------------------------------------------------- + +#ifdef __OBJC__ + #define wxObjCID id +#else + typedef struct objc_object* wxObjCID; +#endif + +#endif // _WX_OSX_CORE_OBJCID_H_ diff --git a/Externals/wxWidgets3/include/wx/osx/core/private.h b/Externals/wxWidgets3/include/wx/osx/core/private.h index 4b69c9bb90..18c3cc7b89 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/private.h +++ b/Externals/wxWidgets3/include/wx/osx/core/private.h @@ -6,7 +6,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: private.h 70354 2012-01-15 15:53:56Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -32,6 +31,23 @@ #define wxOSX_10_6_AND_LATER(x) #endif +// platform specific Clang analyzer support +#ifndef NS_RETURNS_RETAINED +# if WX_HAS_CLANG_FEATURE(attribute_ns_returns_retained) +# define NS_RETURNS_RETAINED __attribute__((ns_returns_retained)) +# else +# define NS_RETURNS_RETAINED +# endif +#endif + +#ifndef CF_RETURNS_RETAINED +# if WX_HAS_CLANG_FEATURE(attribute_cf_returns_retained) +# define CF_RETURNS_RETAINED __attribute__((cf_returns_retained)) +# else +# define CF_RETURNS_RETAINED +# endif +#endif + #if ( !wxUSE_GUI && !wxOSX_USE_IPHONE ) || wxOSX_USE_COCOA_OR_CARBON // Carbon functions are currently still used in wxOSX/Cocoa too (including @@ -105,7 +121,9 @@ WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithCFData( CFDataRe WXDLLIMPEXP_CORE CGDataConsumerRef wxMacCGDataConsumerCreateWithCFData( CFMutableDataRef data ); WXDLLIMPEXP_CORE CGDataProviderRef wxMacCGDataProviderCreateWithMemoryBuffer( const wxMemoryBuffer& buf ); -CGColorSpaceRef WXDLLIMPEXP_CORE wxMacGetGenericRGBColorSpace(void); +WXDLLIMPEXP_CORE CGColorSpaceRef wxMacGetGenericRGBColorSpace(void); + +WXDLLIMPEXP_CORE double wxOSXGetMainScreenContentScaleFactor(); class wxWindowMac; // to @@ -242,7 +260,7 @@ public : virtual void GetPosition( int &x, int &y ) const = 0; virtual void GetSize( int &width, int &height ) const = 0; virtual void SetControlSize( wxWindowVariant variant ) = 0; - virtual float GetContentScaleFactor() const + virtual double GetContentScaleFactor() const { return 1.0; } @@ -265,6 +283,8 @@ public : virtual bool NeedsFrame() const; virtual void SetNeedsFrame( bool needs ); + + virtual void SetDrawingEnabled(bool enabled); virtual bool CanFocus() const = 0; // return true if successful @@ -284,13 +304,16 @@ public : virtual void SetCursor( const wxCursor & cursor ) = 0; virtual void CaptureMouse() = 0; virtual void ReleaseMouse() = 0; + + virtual void SetDropTarget( wxDropTarget * WXUNUSED(dropTarget) ) {} virtual wxInt32 GetValue() const = 0; virtual void SetValue( wxInt32 v ) = 0; virtual wxBitmap GetBitmap() const = 0; virtual void SetBitmap( const wxBitmap& bitmap ) = 0; virtual void SetBitmapPosition( wxDirection dir ) = 0; - virtual void SetupTabs( const wxNotebook ¬ebook ) =0; + virtual void SetupTabs( const wxNotebook& WXUNUSED(notebook) ) {} + virtual int TabHitTest( const wxPoint & WXUNUSED(pt), long *flags ) {*flags=1; return -1;}; virtual void GetBestRect( wxRect *r ) const = 0; virtual bool IsEnabled() const = 0; virtual void Enable( bool enable ) = 0; @@ -319,9 +342,16 @@ public : // static methods for associating native controls and their implementations + // finds the impl associated with this native control static wxWidgetImpl* FindFromWXWidget(WXWidget control); + // finds the impl associated with this native control, if the native control itself is not known + // also checks whether its parent is eg a registered scrollview, ie whether the control is a native subpart + // of a known control + static wxWidgetImpl* + FindBestFromWXWidget(WXWidget control); + static void RemoveAssociations( wxWidgetImpl* impl); static void Associate( WXWidget control, wxWidgetImpl *impl ); @@ -844,7 +874,7 @@ public : virtual void ScreenToWindow( int *x, int *y ) = 0; virtual void WindowToScreen( int *x, int *y ) = 0; - + virtual bool IsActive() = 0; wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } diff --git a/Externals/wxWidgets3/include/wx/osx/core/private/datetimectrl.h b/Externals/wxWidgets3/include/wx/osx/core/private/datetimectrl.h index 499ff1b94a..18778d7da5 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/private/datetimectrl.h +++ b/Externals/wxWidgets3/include/wx/osx/core/private/datetimectrl.h @@ -3,7 +3,6 @@ // Purpose: // Author: Vadim Zeitlin // Created: 2011-12-19 -// RCS-ID: $Id: datetimectrl.h 70071 2011-12-20 21:27:14Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/core/private/strconv_cf.h b/Externals/wxWidgets3/include/wx/osx/core/private/strconv_cf.h index 18eea2a0da..d22c73f72f 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/private/strconv_cf.h +++ b/Externals/wxWidgets3/include/wx/osx/core/private/strconv_cf.h @@ -4,7 +4,6 @@ // Author: David Elliott, Ryan Norton // Modified by: // Created: 2007-07-06 -// RCS-ID: $Id: strconv_cf.h 67215 2011-03-16 10:55:30Z SC $ // Copyright: (c) 2004 Ryan Norton // (c) 2007 David Elliott // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/osx/core/private/timer.h b/Externals/wxWidgets3/include/wx/osx/core/private/timer.h index ac5d34f4ac..2f191797d9 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/private/timer.h +++ b/Externals/wxWidgets3/include/wx/osx/core/private/timer.h @@ -3,7 +3,6 @@ // Purpose: wxTimer class based on core foundation // Author: Stefan Csomor // Created: 2008-07-16 -// RCS-ID: $Id: timer.h 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/core/stdpaths.h b/Externals/wxWidgets3/include/wx/osx/core/stdpaths.h index 67b7bffa4b..8ebe071e9c 100644 --- a/Externals/wxWidgets3/include/wx/osx/core/stdpaths.h +++ b/Externals/wxWidgets3/include/wx/osx/core/stdpaths.h @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004-10-27 -// RCS-ID: $Id: stdpaths.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -35,7 +34,6 @@ typedef __CFBundle * wxCFBundleRef; class WXDLLIMPEXP_BASE wxStandardPathsCF : public wxStandardPathsCFBase { public: - wxStandardPathsCF(); virtual ~wxStandardPathsCF(); // wxMac specific: allow user to specify a different bundle @@ -57,6 +55,10 @@ public: virtual wxString GetDocumentsDir() const; protected: + // Ctor is protected, use wxStandardPaths::Get() instead of instantiating + // objects of this class directly. + wxStandardPathsCF(); + // this function can be called with any of CFBundleCopyXXXURL function // pointer as parameter wxString GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const; diff --git a/Externals/wxWidgets3/include/wx/osx/cursor.h b/Externals/wxWidgets3/include/wx/osx/cursor.h index 024130c863..0dcf5be22d 100644 --- a/Externals/wxWidgets3/include/wx/osx/cursor.h +++ b/Externals/wxWidgets3/include/wx/osx/cursor.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: cursor.h 62771 2009-12-03 17:20:15Z PC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dataform.h b/Externals/wxWidgets3/include/wx/osx/dataform.h index 91cfcbc939..a9c7ba9e3c 100644 --- a/Externals/wxWidgets3/include/wx/osx/dataform.h +++ b/Externals/wxWidgets3/include/wx/osx/dataform.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor (lifted from dnd.h) // Modified by: // Created: 10/21/99 -// RCS-ID: $Id: dataform.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1999 Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dataobj.h b/Externals/wxWidgets3/include/wx/osx/dataobj.h index c21b53b1b2..45a73f289f 100644 --- a/Externals/wxWidgets3/include/wx/osx/dataobj.h +++ b/Externals/wxWidgets3/include/wx/osx/dataobj.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor (adapted from Robert Roebling's gtk port) // Modified by: // Created: 10/21/99 -// RCS-ID: $Id: dataobj.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -25,12 +24,16 @@ public: #endif virtual bool IsSupportedFormat( const wxDataFormat& format, Direction dir = Get ) const; - void AddToPasteboard( void * pasteboardRef , int itemID ); + void AddToPasteboard( void * pasteboardRef , wxIntPtr itemID ); // returns true if the passed in format is present in the pasteboard static bool IsFormatInPasteboard( void * pasteboardRef, const wxDataFormat &dataFormat ); // returns true if any of the accepted formats of this dataobj is in the pasteboard bool HasDataInPasteboard( void * pasteboardRef ); bool GetFromPasteboard( void * pasteboardRef ); + +#if wxOSX_USE_COCOA + virtual void AddSupportedTypes( void* cfarray); +#endif }; #endif // _WX_MAC_DATAOBJ_H_ diff --git a/Externals/wxWidgets3/include/wx/osx/dataobj2.h b/Externals/wxWidgets3/include/wx/osx/dataobj2.h index da97266641..dec7fe50bf 100644 --- a/Externals/wxWidgets3/include/wx/osx/dataobj2.h +++ b/Externals/wxWidgets3/include/wx/osx/dataobj2.h @@ -4,7 +4,6 @@ // Author: David Webster (adapted from Robert Roebling's gtk port // Modified by: // Created: 10/21/99 -// RCS-ID: $Id: dataobj2.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998, 1999 Vadim Zeitlin, Robert Roebling // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dataview.h b/Externals/wxWidgets3/include/wx/osx/dataview.h index f54188e3df..cffb3bf35f 100644 --- a/Externals/wxWidgets3/include/wx/osx/dataview.h +++ b/Externals/wxWidgets3/include/wx/osx/dataview.h @@ -2,7 +2,6 @@ // Name: wx/osx/dataview.h // Purpose: wxDataViewCtrl native implementation header for OSX // Author: -// Id: $Id: dataview.h 70496 2012-02-02 14:19:30Z VZ $ // Copyright: (c) 2009 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -300,6 +299,8 @@ private: wxDataViewColumnPtrArrayType m_ColumnPtrs; // all column pointers are stored in an array + wxDataViewModelNotifier* m_ModelNotifier; // stores the model notifier for the control (does not own the notifier) + // wxWidget internal stuff: DECLARE_DYNAMIC_CLASS(wxDataViewCtrl) DECLARE_NO_COPY_CLASS(wxDataViewCtrl) diff --git a/Externals/wxWidgets3/include/wx/osx/datectrl.h b/Externals/wxWidgets3/include/wx/osx/datectrl.h index 026361aa2f..555ba68e99 100644 --- a/Externals/wxWidgets3/include/wx/osx/datectrl.h +++ b/Externals/wxWidgets3/include/wx/osx/datectrl.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxOSX-specific wxDatePickerCtrl class. // Author: Vadim Zeitlin // Created: 2011-12-18 -// RCS-ID: $Id: datectrl.h 70071 2011-12-20 21:27:14Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/datetimectrl.h b/Externals/wxWidgets3/include/wx/osx/datetimectrl.h index 2184229b12..9993970125 100644 --- a/Externals/wxWidgets3/include/wx/osx/datetimectrl.h +++ b/Externals/wxWidgets3/include/wx/osx/datetimectrl.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxOSX-specific wxDateTimePickerCtrl class. // Author: Vadim Zeitlin // Created: 2011-12-18 -// RCS-ID: $Id: datetimectrl.h 70071 2011-12-20 21:27:14Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dc.h b/Externals/wxWidgets3/include/wx/osx/dc.h index fca6654137..84bb59c077 100644 --- a/Externals/wxWidgets3/include/wx/osx/dc.h +++ b/Externals/wxWidgets3/include/wx/osx/dc.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dc.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dcclient.h b/Externals/wxWidgets3/include/wx/osx/dcclient.h index 6c078c8414..fca62cf35b 100644 --- a/Externals/wxWidgets3/include/wx/osx/dcclient.h +++ b/Externals/wxWidgets3/include/wx/osx/dcclient.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dcclient.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dcmemory.h b/Externals/wxWidgets3/include/wx/osx/dcmemory.h index ac671151d4..bace3c5a95 100644 --- a/Externals/wxWidgets3/include/wx/osx/dcmemory.h +++ b/Externals/wxWidgets3/include/wx/osx/dcmemory.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dcmemory.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dcprint.h b/Externals/wxWidgets3/include/wx/osx/dcprint.h index fadd05979c..ec9f785167 100644 --- a/Externals/wxWidgets3/include/wx/osx/dcprint.h +++ b/Externals/wxWidgets3/include/wx/osx/dcprint.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dcprint.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dcscreen.h b/Externals/wxWidgets3/include/wx/osx/dcscreen.h index be12a5d597..374f0efcd8 100644 --- a/Externals/wxWidgets3/include/wx/osx/dcscreen.h +++ b/Externals/wxWidgets3/include/wx/osx/dcscreen.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dcscreen.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dialog.h b/Externals/wxWidgets3/include/wx/osx/dialog.h index 6fbb1bba6d..3b0b724fb8 100644 --- a/Externals/wxWidgets3/include/wx/osx/dialog.h +++ b/Externals/wxWidgets3/include/wx/osx/dialog.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dialog.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dirdlg.h b/Externals/wxWidgets3/include/wx/osx/dirdlg.h index 1ea6fd2739..f355f604e8 100644 --- a/Externals/wxWidgets3/include/wx/osx/dirdlg.h +++ b/Externals/wxWidgets3/include/wx/osx/dirdlg.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dirdlg.h 67896 2011-06-09 00:28:28Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -12,10 +11,29 @@ #ifndef _WX_DIRDLG_H_ #define _WX_DIRDLG_H_ +#if wxOSX_USE_COCOA + DECLARE_WXCOCOA_OBJC_CLASS(NSOpenPanel); +#endif + class WXDLLIMPEXP_CORE wxDirDialog : public wxDirDialogBase { public: + wxDirDialog() { Init(); } + wxDirDialog(wxWindow *parent, + const wxString& message = wxDirSelectorPromptStr, + const wxString& defaultPath = wxT(""), + long style = wxDD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& name = wxDirDialogNameStr) + { + Init(); + + Create(parent,message,defaultPath,style,pos,size,name); + } + + void Create(wxWindow *parent, const wxString& message = wxDirSelectorPromptStr, const wxString& defaultPath = wxT(""), long style = wxDD_DEFAULT_STYLE, @@ -34,14 +52,19 @@ public: virtual void ModalFinishedCallback(void* panel, int returnCode); #endif -protected: - - DECLARE_DYNAMIC_CLASS(wxDirDialog) - +private: #if wxOSX_USE_COCOA + // Create and initialize NSOpenPanel that we use in both ShowModal() and + // ShowWindowModal(). + WX_NSOpenPanel OSXCreatePanel() const; + WX_NSObject m_sheetDelegate; #endif + + // Common part of all ctors. + void Init(); + + DECLARE_DYNAMIC_CLASS(wxDirDialog) }; -#endif - // _WX_DIRDLG_H_ +#endif // _WX_DIRDLG_H_ diff --git a/Externals/wxWidgets3/include/wx/osx/dnd.h b/Externals/wxWidgets3/include/wx/osx/dnd.h index 9899d8981f..7cd8ed2242 100644 --- a/Externals/wxWidgets3/include/wx/osx/dnd.h +++ b/Externals/wxWidgets3/include/wx/osx/dnd.h @@ -2,7 +2,6 @@ // Name: wx/osx/dnd.h // Purpose: Declaration of the wxDropTarget, wxDropSource class etc. // Author: Stefan Csomor -// RCS-ID: $Id: dnd.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 1998 Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dvrenderer.h b/Externals/wxWidgets3/include/wx/osx/dvrenderer.h index 86704ce5e7..d7ded78464 100644 --- a/Externals/wxWidgets3/include/wx/osx/dvrenderer.h +++ b/Externals/wxWidgets3/include/wx/osx/dvrenderer.h @@ -3,7 +3,6 @@ // Purpose: wxDataViewRenderer for OS X wxDataViewCtrl implementations // Author: Vadim Zeitlin // Created: 2009-11-07 (extracted from wx/osx/dataview.h) -// RCS-ID: $Id: dvrenderer.h 66403 2010-12-19 15:02:56Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/dvrenderers.h b/Externals/wxWidgets3/include/wx/osx/dvrenderers.h index caa99b5710..d046b1a851 100644 --- a/Externals/wxWidgets3/include/wx/osx/dvrenderers.h +++ b/Externals/wxWidgets3/include/wx/osx/dvrenderers.h @@ -3,7 +3,6 @@ // Purpose: All OS X wxDataViewCtrl renderer classes // Author: Vadim Zeitlin // Created: 2009-11-07 (extracted from wx/osx/dataview.h) -// RCS-ID: $Id: dvrenderers.h 64140 2010-04-25 21:33:16Z FM $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -103,6 +102,12 @@ public: wxString GetChoice(size_t index) const { return m_choices[index]; } const wxArrayString& GetChoices() const { return m_choices; } +#if wxOSX_USE_COCOA + virtual void OSXOnCellChanged(NSObject *value, + const wxDataViewItem& item, + unsigned col); +#endif // Cocoa + private: wxArrayString m_choices; diff --git a/Externals/wxWidgets3/include/wx/osx/evtloop.h b/Externals/wxWidgets3/include/wx/osx/evtloop.h index 26c75a7ac5..995a713701 100644 --- a/Externals/wxWidgets3/include/wx/osx/evtloop.h +++ b/Externals/wxWidgets3/include/wx/osx/evtloop.h @@ -6,7 +6,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2006-01-12 -// RCS-ID: $Id: evtloop.h 67724 2011-05-11 06:46:07Z SC $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -14,87 +13,6 @@ #ifndef _WX_OSX_EVTLOOP_H_ #define _WX_OSX_EVTLOOP_H_ -DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoop ); -DECLARE_WXOSX_OPAQUE_CFREF( CFRunLoopObserver ); - -class WXDLLIMPEXP_BASE wxCFEventLoop : public wxEventLoopBase -{ -public: - wxCFEventLoop(); - virtual ~wxCFEventLoop(); - - // enters a loop calling OnNextIteration(), Pending() and Dispatch() and - // terminating when Exit() is called - virtual int Run(); - - // sets the "should exit" flag and wakes up the loop so that it terminates - // soon - virtual void Exit(int rc = 0); - - // return true if any events are available - virtual bool Pending() const; - - // dispatch a single event, return false if we should exit from the loop - virtual bool Dispatch(); - - // same as Dispatch() but doesn't wait for longer than the specified (in - // ms) timeout, return true if an event was processed, false if we should - // exit the loop or -1 if timeout expired - virtual int DispatchTimeout(unsigned long timeout); - - // implement this to wake up the loop: usually done by posting a dummy event - // to it (can be called from non main thread) - virtual void WakeUp(); - - virtual bool YieldFor(long eventsToProcess); - -#if wxUSE_EVENTLOOP_SOURCE - virtual wxEventLoopSource * - AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags); -#endif // wxUSE_EVENTLOOP_SOURCE - - -protected: - void CommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity); - void DefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity); - - static void OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info); - static void OSXDefaultModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info); - - // get the currently executing CFRunLoop - virtual CFRunLoopRef CFGetCurrentRunLoop() const; - - virtual int DoDispatchTimeout(unsigned long timeout); - - virtual void DoRun(); - - virtual void DoStop(); - - // should we exit the loop? - bool m_shouldExit; - - // the loop exit code - int m_exitcode; - - // cfrunloop - CFRunLoopRef m_runLoop; - - // common modes runloop observer - CFRunLoopObserverRef m_commonModeRunLoopObserver; - - // default mode runloop observer - CFRunLoopObserverRef m_defaultModeRunLoopObserver; - -private: - // process all already pending events and dispatch a new one (blocking - // until it appears in the event queue if necessary) - // - // returns the return value of DoDispatchTimeout() - int DoProcessEvents(); -}; - -#if wxUSE_GUI - #ifdef __WXOSX_COCOA__ #include "wx/osx/cocoa/evtloop.h" #else @@ -109,17 +27,18 @@ class WXDLLIMPEXP_CORE wxModalEventLoop : public wxGUIEventLoop public: wxModalEventLoop(wxWindow *modalWindow); wxModalEventLoop(WXWindow modalNativeWindow); - + +#ifdef __WXOSX_COCOA__ + // skip wxGUIEventLoop to avoid missing Enter/Exit notifications + int Run() { return wxCFEventLoop::Run(); } +#endif protected: - virtual void DoRun(); - - virtual void DoStop(); + virtual void OSXDoRun(); + virtual void OSXDoStop(); // (in case) the modal window for this event loop wxNonOwnedWindow* m_modalWindow; WXWindow m_modalNativeWindow; }; -#endif // wxUSE_GUI - #endif // _WX_OSX_EVTLOOP_H_ diff --git a/Externals/wxWidgets3/include/wx/osx/evtloopsrc.h b/Externals/wxWidgets3/include/wx/osx/evtloopsrc.h index 3f599fc05e..291ce0f1e4 100644 --- a/Externals/wxWidgets3/include/wx/osx/evtloopsrc.h +++ b/Externals/wxWidgets3/include/wx/osx/evtloopsrc.h @@ -3,7 +3,6 @@ // Purpose: wxCFEventLoopSource class // Author: Vadim Zeitlin // Created: 2009-10-21 -// RCS-ID: $Id: evtloopsrc.h 64140 2010-04-25 21:33:16Z FM $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -11,28 +10,32 @@ #ifndef _WX_OSX_EVTLOOPSRC_H_ #define _WX_OSX_EVTLOOPSRC_H_ -typedef struct __CFFileDescriptor *CFFileDescriptorRef; +typedef struct __CFSocket* CFSocketRef; // ---------------------------------------------------------------------------- // wxCFEventLoopSource: CoreFoundation-based wxEventLoopSource for OS X // ---------------------------------------------------------------------------- -class wxCFEventLoopSource : public wxEventLoopSource +class WXDLLIMPEXP_BASE wxCFEventLoopSource : public wxEventLoopSource { public: + // Create a new source in uninitialized state, call InitSocketRef() later + // to associate it with the socket it is going to use. wxCFEventLoopSource(wxEventLoopSourceHandler *handler, int flags) : wxEventLoopSource(handler, flags) { - m_cffd = NULL; + m_cfSocket = NULL; } - // we take ownership of this CFFileDescriptorRef - void SetFileDescriptor(CFFileDescriptorRef cffd); + // Finish initialization of the event loop source by providing the + // associated socket. This object takes ownership of it and will release it. + void InitSourceSocket(CFSocketRef cfSocket); + // Destructor deletes the associated socket. virtual ~wxCFEventLoopSource(); private: - CFFileDescriptorRef m_cffd; + CFSocketRef m_cfSocket; wxDECLARE_NO_COPY_CLASS(wxCFEventLoopSource); }; diff --git a/Externals/wxWidgets3/include/wx/osx/filedlg.h b/Externals/wxWidgets3/include/wx/osx/filedlg.h index 6dbc0cb50c..10342fa8a8 100644 --- a/Externals/wxWidgets3/include/wx/osx/filedlg.h +++ b/Externals/wxWidgets3/include/wx/osx/filedlg.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: filedlg.h 67896 2011-06-09 00:28:28Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -31,7 +30,23 @@ protected: wxArrayString m_paths; public: + wxFileDialog() { Init(); } wxFileDialog(wxWindow *parent, + const wxString& message = wxFileSelectorPromptStr, + const wxString& defaultDir = wxEmptyString, + const wxString& defaultFile = wxEmptyString, + const wxString& wildCard = wxFileSelectorDefaultWildcardStr, + long style = wxFD_DEFAULT_STYLE, + const wxPoint& pos = wxDefaultPosition, + const wxSize& sz = wxDefaultSize, + const wxString& name = wxFileDialogNameStr) + { + Init(); + + Create(parent,message,defaultDir,defaultFile,wildCard,style,pos,sz,name); + } + + void Create(wxWindow *parent, const wxString& message = wxFileSelectorPromptStr, const wxString& defaultDir = wxEmptyString, const wxString& defaultFile = wxEmptyString, @@ -87,6 +102,10 @@ protected: WX_NSObject m_delegate; WX_NSObject m_sheetDelegate; #endif + +private: + // Common part of all ctors. + void Init(); }; #endif // _WX_FILEDLG_H_ diff --git a/Externals/wxWidgets3/include/wx/osx/font.h b/Externals/wxWidgets3/include/wx/osx/font.h index e1fe572e58..3bec30a891 100644 --- a/Externals/wxWidgets3/include/wx/osx/font.h +++ b/Externals/wxWidgets3/include/wx/osx/font.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: font.h 70445 2012-01-23 11:28:21Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -37,6 +36,20 @@ public: // ctors and such wxFont() { } + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + wxFont( wxOSXSystemFont systemFont ); #if wxOSX_USE_COCOA @@ -79,19 +92,6 @@ public: SetPixelSize(pixelSize); } - wxFont(int pointSize, - wxFontFamily family, - int flags = wxFONTFLAG_DEFAULT, - const wxString& face = wxEmptyString, - wxFontEncoding encoding = wxFONTENCODING_DEFAULT) - { - Create(pointSize, family, - GetStyleFromFlags(flags), - GetWeightFromFlags(flags), - GetUnderlinedFromFlags(flags), - face, encoding); - } - bool Create(int size, wxFontFamily family, wxFontStyle style, @@ -121,6 +121,8 @@ public: virtual wxFontEncoding GetEncoding() const; virtual const wxNativeFontInfo *GetNativeFontInfo() const; + virtual bool IsFixedWidth() const; + virtual void SetPointSize(int pointSize); virtual void SetFamily(wxFontFamily family); virtual void SetStyle(wxFontStyle style); diff --git a/Externals/wxWidgets3/include/wx/osx/fontdlg.h b/Externals/wxWidgets3/include/wx/osx/fontdlg.h index 966a8fa937..e271578cdf 100644 --- a/Externals/wxWidgets3/include/wx/osx/fontdlg.h +++ b/Externals/wxWidgets3/include/wx/osx/fontdlg.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 2004-09-25 -// RCS-ID: $Id: fontdlg.h 70497 2012-02-02 14:19:34Z VZ $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -124,25 +123,25 @@ public: /// Respond to colour change void OnColourChanged(wxCommandEvent& event); - /// wxEVT_COMMAND_LISTBOX_SELECTED event handler for wxID_FONTDIALOG_FACENAME + /// wxEVT_LISTBOX event handler for wxID_FONTDIALOG_FACENAME void OnFontdialogFacenameSelected( wxCommandEvent& event ); - /// wxEVT_COMMAND_SPINCTRL_UPDATED event handler for wxID_FONTDIALOG_FONTSIZE + /// wxEVT_SPINCTRL event handler for wxID_FONTDIALOG_FONTSIZE void OnFontdialogFontsizeUpdated( wxSpinEvent& event ); - /// wxEVT_COMMAND_TEXT_UPDATED event handler for wxID_FONTDIALOG_FONTSIZE + /// wxEVT_TEXT event handler for wxID_FONTDIALOG_FONTSIZE void OnFontdialogFontsizeTextUpdated( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_BOLD + /// wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_BOLD void OnFontdialogBoldClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_ITALIC + /// wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_ITALIC void OnFontdialogItalicClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_CHECKBOX_CLICKED event handler for wxID_FONTDIALOG_UNDERLINED + /// wxEVT_CHECKBOX event handler for wxID_FONTDIALOG_UNDERLINED void OnFontdialogUnderlinedClick( wxCommandEvent& event ); - /// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_OK + /// wxEVT_BUTTON event handler for wxID_OK void OnOkClick( wxCommandEvent& event ); /// Should we show tooltips? diff --git a/Externals/wxWidgets3/include/wx/osx/frame.h b/Externals/wxWidgets3/include/wx/osx/frame.h index ca6ffb51da..5902dc0c9c 100644 --- a/Externals/wxWidgets3/include/wx/osx/frame.h +++ b/Externals/wxWidgets3/include/wx/osx/frame.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: frame.h 70765 2012-03-01 15:04:42Z JS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/gauge.h b/Externals/wxWidgets3/include/wx/osx/gauge.h index 3e64fbb1c3..692c3b587a 100644 --- a/Externals/wxWidgets3/include/wx/osx/gauge.h +++ b/Externals/wxWidgets3/include/wx/osx/gauge.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: gauge.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/glcanvas.h b/Externals/wxWidgets3/include/wx/osx/glcanvas.h index 80973fea3a..1789a900f0 100644 --- a/Externals/wxWidgets3/include/wx/osx/glcanvas.h +++ b/Externals/wxWidgets3/include/wx/osx/glcanvas.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: glcanvas.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/helpxxxx.h b/Externals/wxWidgets3/include/wx/osx/helpxxxx.h index 1995c7d5f3..9a9fe4c67f 100644 --- a/Externals/wxWidgets3/include/wx/osx/helpxxxx.h +++ b/Externals/wxWidgets3/include/wx/osx/helpxxxx.h @@ -5,7 +5,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: helpxxxx.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/icon.h b/Externals/wxWidgets3/include/wx/osx/icon.h index 9053ffd1b5..bc6b721db6 100644 --- a/Externals/wxWidgets3/include/wx/osx/icon.h +++ b/Externals/wxWidgets3/include/wx/osx/icon.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: icon.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/iphone/chkconf.h b/Externals/wxWidgets3/include/wx/osx/iphone/chkconf.h index c402458f67..ffdc6b90ab 100644 --- a/Externals/wxWidgets3/include/wx/osx/iphone/chkconf.h +++ b/Externals/wxWidgets3/include/wx/osx/iphone/chkconf.h @@ -4,7 +4,6 @@ * Author: Stefan Csomor * Modified by: * Created: 2008-07-30 - * RCS-ID: $Id: chkconf.h 69818 2011-11-25 14:37:03Z SC $ * Copyright: (c) Stefan Csomor * Licence: wxWindows licence */ @@ -20,7 +19,7 @@ * under a certain platform */ -#define wxOSX_USE_CORE_TEXT 0 +#define wxOSX_USE_CORE_TEXT 1 #define wxOSX_USE_ATSU_TEXT 0 #define wxHAS_OPENGL_ES diff --git a/Externals/wxWidgets3/include/wx/osx/iphone/private.h b/Externals/wxWidgets3/include/wx/osx/iphone/private.h index 03ead77125..e21dd388b0 100644 --- a/Externals/wxWidgets3/include/wx/osx/iphone/private.h +++ b/Externals/wxWidgets3/include/wx/osx/iphone/private.h @@ -6,7 +6,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: private.h 67233 2011-03-18 15:45:51Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -18,6 +17,11 @@ #import #endif +#include +#include +#include + + #if wxUSE_GUI OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage( @@ -56,7 +60,7 @@ public : virtual void GetPosition( int &x, int &y ) const; virtual void GetSize( int &width, int &height ) const; virtual void SetControlSize( wxWindowVariant variant ); - virtual float GetContentScaleFactor() const ; + virtual double GetContentScaleFactor() const ; virtual void SetNeedsDisplay( const wxRect* where = NULL ); virtual bool GetNeedsDisplay() const; diff --git a/Externals/wxWidgets3/include/wx/osx/iphone/private/textimpl.h b/Externals/wxWidgets3/include/wx/osx/iphone/private/textimpl.h index df1662ea02..7c9e5fd109 100644 --- a/Externals/wxWidgets3/include/wx/osx/iphone/private/textimpl.h +++ b/Externals/wxWidgets3/include/wx/osx/iphone/private/textimpl.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 03/02/99 -// RCS-ID: $Id: textimpl.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/joystick.h b/Externals/wxWidgets3/include/wx/osx/joystick.h index d9d2f06481..e5f834390a 100644 --- a/Externals/wxWidgets3/include/wx/osx/joystick.h +++ b/Externals/wxWidgets3/include/wx/osx/joystick.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: joystick.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/listbox.h b/Externals/wxWidgets3/include/wx/osx/listbox.h index 700ca7b815..60f4199e74 100644 --- a/Externals/wxWidgets3/include/wx/osx/listbox.h +++ b/Externals/wxWidgets3/include/wx/osx/listbox.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: listbox.h 65940 2010-10-28 10:27:32Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/listctrl.h b/Externals/wxWidgets3/include/wx/osx/listctrl.h index b0412f25f7..9f2fdfe984 100644 --- a/Externals/wxWidgets3/include/wx/osx/listctrl.h +++ b/Externals/wxWidgets3/include/wx/osx/listctrl.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: listctrl.h 70290 2012-01-08 00:55:22Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -291,9 +290,6 @@ class WXDLLIMPEXP_CORE wxListCtrl: public wxListCtrlBase // return the icon for the given item and column. virtual int OnGetItemColumnImage(long item, long column) const; - // return the attribute for the item (may return NULL if none) - virtual wxListItemAttr *OnGetItemAttr(long item) const; - /* Why should we need this function? Leave for now. * We might need it because item data may have changed, * but the display needs refreshing (in string callback mode) diff --git a/Externals/wxWidgets3/include/wx/osx/mdi.h b/Externals/wxWidgets3/include/wx/osx/mdi.h index 91d7b444a5..7a859d198d 100644 --- a/Externals/wxWidgets3/include/wx/osx/mdi.h +++ b/Externals/wxWidgets3/include/wx/osx/mdi.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes // Created: 1998-01-01 -// RCS-ID: $Id: mdi.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Stefan Csomor // (c) 2008 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/osx/menu.h b/Externals/wxWidgets3/include/wx/osx/menu.h index 6429ca657d..3ef7699599 100644 --- a/Externals/wxWidgets3/include/wx/osx/menu.h +++ b/Externals/wxWidgets3/include/wx/osx/menu.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: menu.h 70350 2012-01-15 13:41:17Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -33,8 +32,6 @@ public: virtual ~wxMenu(); - virtual void Attach(wxMenuBarBase *menubar) ; - virtual void Break(); virtual void SetTitle(const wxString& title); @@ -77,17 +74,14 @@ private: // common part of all ctors void Init(); - // common part of Append/Insert (behaves as Append is pos == (size_t)-1) + // common part of Do{Append,Insert}(): behaves as Append if pos == -1 bool DoInsertOrAppend(wxMenuItem *item, size_t pos = (size_t)-1); - // terminate the current radio group, if any - void EndRadioGroup(); - // Common part of HandleMenu{Opened,Closed}(). void DoHandleMenuOpenedOrClosed(wxEventType evtType); - // if TRUE, insert a breal before appending the next item + // if TRUE, insert a break before appending the next item bool m_doBreak; // in this menu rearranging of menu items (esp hiding) is allowed @@ -96,9 +90,6 @@ private: // don't trigger native events bool m_noEventsMode; - // the position of the first item in the current radio group or -1 - int m_startRadioGroup; - wxMenuImpl* m_peer; DECLARE_DYNAMIC_CLASS(wxMenu) diff --git a/Externals/wxWidgets3/include/wx/osx/menuitem.h b/Externals/wxWidgets3/include/wx/osx/menuitem.h index a72f1831ca..69dc7e7bcb 100644 --- a/Externals/wxWidgets3/include/wx/osx/menuitem.h +++ b/Externals/wxWidgets3/include/wx/osx/menuitem.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 11.11.97 -// RCS-ID: $Id: menuitem.h 66904 2011-02-16 16:37:24Z SC $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -46,16 +45,32 @@ public: virtual void SetBitmap(const wxBitmap& bitmap) ; virtual const wxBitmap& GetBitmap() const { return m_bitmap; } + + // Implementation only from now on. + // update the os specific representation void UpdateItemBitmap() ; void UpdateItemText() ; void UpdateItemStatus() ; // mark item as belonging to the given radio group - void SetAsRadioGroupStart(); + void SetAsRadioGroupStart(bool start = true); void SetRadioGroupStart(int start); void SetRadioGroupEnd(int end); + // return true if this is the starting item of a radio group + bool IsRadioGroupStart() const; + + // get the start of the radio group this item belongs to: should not be + // called for the starting radio group item itself because it doesn't have + // this information + int GetRadioGroupStart() const; + + // get the end of the radio group this item belongs to: should be only + // called for the starting radio group item, i.e. if IsRadioGroupStart() is + // true + int GetRadioGroupEnd() const; + wxMenuItemImpl* GetPeer() { return m_peer; } private: void UncheckRadio() ; diff --git a/Externals/wxWidgets3/include/wx/osx/metafile.h b/Externals/wxWidgets3/include/wx/osx/metafile.h index 2a7e13e252..973a5736a4 100644 --- a/Externals/wxWidgets3/include/wx/osx/metafile.h +++ b/Externals/wxWidgets3/include/wx/osx/metafile.h @@ -6,7 +6,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: metafile.h 70710 2012-02-27 15:37:24Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/minifram.h b/Externals/wxWidgets3/include/wx/osx/minifram.h index 8b7b67e3de..00fe6e474a 100644 --- a/Externals/wxWidgets3/include/wx/osx/minifram.h +++ b/Externals/wxWidgets3/include/wx/osx/minifram.h @@ -6,7 +6,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: minifram.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/msgdlg.h b/Externals/wxWidgets3/include/wx/osx/msgdlg.h index 173cab4994..871d32f940 100644 --- a/Externals/wxWidgets3/include/wx/osx/msgdlg.h +++ b/Externals/wxWidgets3/include/wx/osx/msgdlg.h @@ -5,7 +5,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: msgdlg.h 68537 2011-08-04 22:53:42Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/nonownedwnd.h b/Externals/wxWidgets3/include/wx/osx/nonownedwnd.h index b6b014f30b..edc3f04e62 100644 --- a/Externals/wxWidgets3/include/wx/osx/nonownedwnd.h +++ b/Externals/wxWidgets3/include/wx/osx/nonownedwnd.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2008-03-24 -// RCS-ID: $Id: nonownedwnd.h 70488 2012-01-31 17:39:39Z SC $ // Copyright: (c) 2008 Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -65,7 +64,7 @@ public: virtual void UnsubclassWin(); virtual wxPoint GetClientAreaOrigin() const; - + // implement base class pure virtuals virtual bool SetTransparent(wxByte alpha); @@ -105,7 +104,7 @@ public: #if wxOSX_USE_COCOA_OR_IPHONE // override the base class method to return an NSWindow instead of NSView - virtual void *OSXGetViewOrWindow() const { return GetWXWindow(); } + virtual void *OSXGetViewOrWindow() const; #endif // Cocoa // osx specific event handling common for all osx-ports diff --git a/Externals/wxWidgets3/include/wx/osx/notebook.h b/Externals/wxWidgets3/include/wx/osx/notebook.h index 62a1accc33..7e0ac72291 100644 --- a/Externals/wxWidgets3/include/wx/osx/notebook.h +++ b/Externals/wxWidgets3/include/wx/osx/notebook.h @@ -3,7 +3,6 @@ // Purpose: MSW/GTK compatible notebook (a.k.a. property sheet) // Author: Stefan Csomor // Modified by: -// RCS-ID: $Id: notebook.h 68810 2011-08-21 14:08:49Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/palette.h b/Externals/wxWidgets3/include/wx/osx/palette.h index 3f10196a17..86e014f80f 100644 --- a/Externals/wxWidgets3/include/wx/osx/palette.h +++ b/Externals/wxWidgets3/include/wx/osx/palette.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: palette.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/pen.h b/Externals/wxWidgets3/include/wx/osx/pen.h index cf8091f5f8..391344850c 100644 --- a/Externals/wxWidgets3/include/wx/osx/pen.h +++ b/Externals/wxWidgets3/include/wx/osx/pen.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: pen.h 58739 2009-02-07 23:23:18Z KO $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/pnghand.h b/Externals/wxWidgets3/include/wx/osx/pnghand.h index 135725528b..c040521337 100644 --- a/Externals/wxWidgets3/include/wx/osx/pnghand.h +++ b/Externals/wxWidgets3/include/wx/osx/pnghand.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: pnghand.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/popupwin.h b/Externals/wxWidgets3/include/wx/osx/popupwin.h index 3027d5f26c..ac42cd64dd 100644 --- a/Externals/wxWidgets3/include/wx/osx/popupwin.h +++ b/Externals/wxWidgets3/include/wx/osx/popupwin.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: -// RCS-ID: $Id: popupwin.h 70848 2012-03-09 05:50:58Z PC $ // Copyright: (c) 2006 Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -27,8 +26,6 @@ public: bool Create(wxWindow *parent, int flags = wxBORDER_NONE); - virtual bool Show(bool show = true); - DECLARE_DYNAMIC_CLASS_NO_COPY(wxPopupWindow) }; diff --git a/Externals/wxWidgets3/include/wx/osx/printdlg.h b/Externals/wxWidgets3/include/wx/osx/printdlg.h index ab87b870e0..d2601eccbe 100644 --- a/Externals/wxWidgets3/include/wx/osx/printdlg.h +++ b/Externals/wxWidgets3/include/wx/osx/printdlg.h @@ -6,7 +6,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: printdlg.h 70636 2012-02-20 21:55:55Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/printmac.h b/Externals/wxWidgets3/include/wx/osx/printmac.h index 6017955bfe..fb68fd8d5f 100644 --- a/Externals/wxWidgets3/include/wx/osx/printmac.h +++ b/Externals/wxWidgets3/include/wx/osx/printmac.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: printmac.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/private/glgrab.h b/Externals/wxWidgets3/include/wx/osx/private/glgrab.h index 3ec2df8f4e..a3ceabe689 100644 --- a/Externals/wxWidgets3/include/wx/osx/private/glgrab.h +++ b/Externals/wxWidgets3/include/wx/osx/private/glgrab.h @@ -4,7 +4,7 @@ extern "C" { #endif - CGImageRef grabViaOpenGL(CGDirectDisplayID display, + CF_RETURNS_RETAINED CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect); #if defined __cplusplus diff --git a/Externals/wxWidgets3/include/wx/osx/radiobox.h b/Externals/wxWidgets3/include/wx/osx/radiobox.h index 5ca8856e20..f591a7df9b 100644 --- a/Externals/wxWidgets3/include/wx/osx/radiobox.h +++ b/Externals/wxWidgets3/include/wx/osx/radiobox.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: radiobox.h 69544 2011-10-26 05:39:18Z RD $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/radiobut.h b/Externals/wxWidgets3/include/wx/osx/radiobut.h index ded6f4b832..649a544c3c 100644 --- a/Externals/wxWidgets3/include/wx/osx/radiobut.h +++ b/Externals/wxWidgets3/include/wx/osx/radiobut.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: radiobut.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/scrolbar.h b/Externals/wxWidgets3/include/wx/osx/scrolbar.h index 79698bee52..2115ca5479 100644 --- a/Externals/wxWidgets3/include/wx/osx/scrolbar.h +++ b/Externals/wxWidgets3/include/wx/osx/scrolbar.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: scrolbar.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/setup0.h b/Externals/wxWidgets3/include/wx/osx/setup0.h index 46bad79d19..cbcd58af13 100644 --- a/Externals/wxWidgets3/include/wx/osx/setup0.h +++ b/Externals/wxWidgets3/include/wx/osx/setup0.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Stefan Csomor // Created: 1998-01-01 -// RCS-ID: $Id: setup0.h 70395 2012-01-19 08:55:41Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -152,7 +151,7 @@ // In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If // this causes problems (e.g. link errors), set this to 0. You may need to set // this to 0 if using templates (at least for VC++). This switch is currently -// ignored for mingw / cygwin / CodeWarrior +// ignored for MinGW/Cygwin. // // Default is 0 // @@ -268,6 +267,17 @@ // Recommended setting: 1 if you want to support multiple languages #define wxUSE_PRINTF_POS_PARAMS 1 +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but must +// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using +// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS +// support that results in crashes when any TLS variables are used. So if you +// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set +// this to 0. +// +// Default is 1, but set to 0 if the scenario above is applicable. +#define wxUSE_COMPILER_TLS 1 // ---------------------------------------------------------------------------- // Interoperability with the standard library. @@ -1088,6 +1098,20 @@ // Recommended setting: 1 #define wxUSE_NOTIFICATION_MESSAGE 1 +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#ifdef __WXOSX_IPHONE__ +#define wxUSE_PREFERENCES_EDITOR 0 +#else +#define wxUSE_PREFERENCES_EDITOR 1 +#endif + // wxRichToolTip is a customizable tooltip class which has more functionality // than the stock (but native, unlike this class) wxToolTip. // @@ -1501,19 +1525,6 @@ // Mac-specific settings // ---------------------------------------------------------------------------- -// override some settings for Metrowerks -// -// VZ: isn't this file only used when building with Metrowerks anyhow? -// CS: no, it is also used by the Xcode projects -#ifdef __MWERKS__ - #undef wxUSE_DEBUG_CONTEXT - #define wxUSE_DEBUG_CONTEXT 1 - - #undef wxUSE_STD_IOSTREAM - // CS: I have to set this to 0 now, as shared builds are having problems - #define wxUSE_STD_IOSTREAM 0 -#endif - #undef wxUSE_GRAPHICS_CONTEXT #define wxUSE_GRAPHICS_CONTEXT 1 diff --git a/Externals/wxWidgets3/include/wx/osx/slider.h b/Externals/wxWidgets3/include/wx/osx/slider.h index 2984b3948a..bd99512dca 100644 --- a/Externals/wxWidgets3/include/wx/osx/slider.h +++ b/Externals/wxWidgets3/include/wx/osx/slider.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: slider.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/sound.h b/Externals/wxWidgets3/include/wx/osx/sound.h index 45538773d0..f406537927 100644 --- a/Externals/wxWidgets3/include/wx/osx/sound.h +++ b/Externals/wxWidgets3/include/wx/osx/sound.h @@ -5,7 +5,6 @@ // Author: Ryan Norton, Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: sound.h 69178 2011-09-21 15:08:02Z VZ $ // Copyright: (c) Ryan Norton, Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/spinbutt.h b/Externals/wxWidgets3/include/wx/osx/spinbutt.h index a02abcb94d..b294851f96 100644 --- a/Externals/wxWidgets3/include/wx/osx/spinbutt.h +++ b/Externals/wxWidgets3/include/wx/osx/spinbutt.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: spinbutt.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/srchctrl.h b/Externals/wxWidgets3/include/wx/osx/srchctrl.h index 3477c25e25..ee926cf5f4 100644 --- a/Externals/wxWidgets3/include/wx/osx/srchctrl.h +++ b/Externals/wxWidgets3/include/wx/osx/srchctrl.h @@ -3,7 +3,6 @@ // Purpose: mac carbon wxSearchCtrl class // Author: Vince Harron // Created: 2006-02-19 -// RCS-ID: $Id: srchctrl.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: Vince Harron // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/statbox.h b/Externals/wxWidgets3/include/wx/osx/statbox.h index cdbdead32e..5b5f049c58 100644 --- a/Externals/wxWidgets3/include/wx/osx/statbox.h +++ b/Externals/wxWidgets3/include/wx/osx/statbox.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: statbox.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/statline.h b/Externals/wxWidgets3/include/wx/osx/statline.h index 8b2628fa13..bd94398239 100644 --- a/Externals/wxWidgets3/include/wx/osx/statline.h +++ b/Externals/wxWidgets3/include/wx/osx/statline.h @@ -3,7 +3,6 @@ // Purpose: a generic wxStaticLine class used for mac before adaptation // Author: Vadim Zeitlin // Created: 28.06.99 -// Version: $Id: statline.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/stattext.h b/Externals/wxWidgets3/include/wx/osx/stattext.h index 18372b9500..3b4b9b6637 100644 --- a/Externals/wxWidgets3/include/wx/osx/stattext.h +++ b/Externals/wxWidgets3/include/wx/osx/stattext.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: stattext.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/statusbr.h b/Externals/wxWidgets3/include/wx/osx/statusbr.h index ea90f0a649..74ae67758c 100644 --- a/Externals/wxWidgets3/include/wx/osx/statusbr.h +++ b/Externals/wxWidgets3/include/wx/osx/statusbr.h @@ -5,7 +5,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: statusbr.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/taskbarosx.h b/Externals/wxWidgets3/include/wx/osx/taskbarosx.h index dba4a86bb1..7d13df747e 100644 --- a/Externals/wxWidgets3/include/wx/osx/taskbarosx.h +++ b/Externals/wxWidgets3/include/wx/osx/taskbarosx.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 04/04/2003 -// RCS-ID: $Id: taskbarosx.h 67084 2011-02-28 10:12:06Z SC $ // Copyright: (c) Ryan Norton, 2003 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// @@ -19,21 +18,7 @@ class WXDLLIMPEXP_ADV wxTaskBarIcon : public wxTaskBarIconBase { DECLARE_DYNAMIC_CLASS_NO_COPY(wxTaskBarIcon) public: - // type of taskbar item to create (currently only DOCK is implemented) - enum wxTaskBarIconType - { - DOCK -#if wxOSX_USE_COCOA - , CUSTOM_STATUSITEM -#endif -#if wxOSX_USE_COCOA - , DEFAULT_TYPE = CUSTOM_STATUSITEM -#else - , DEFAULT_TYPE = DOCK -#endif - }; - - wxTaskBarIcon(wxTaskBarIconType iconType = DEFAULT_TYPE); + wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE); virtual ~wxTaskBarIcon(); // returns true if the taskbaricon is in the global menubar diff --git a/Externals/wxWidgets3/include/wx/osx/textctrl.h b/Externals/wxWidgets3/include/wx/osx/textctrl.h index 70e0863c35..53604bab7b 100644 --- a/Externals/wxWidgets3/include/wx/osx/textctrl.h +++ b/Externals/wxWidgets3/include/wx/osx/textctrl.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: textctrl.h 70355 2012-01-15 15:54:53Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/textentry.h b/Externals/wxWidgets3/include/wx/osx/textentry.h index 7a6a66f58b..2362cae8af 100644 --- a/Externals/wxWidgets3/include/wx/osx/textentry.h +++ b/Externals/wxWidgets3/include/wx/osx/textentry.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Kevin Ollivier // Created: 1998-01-01 -// RCS-ID: $Id: textentry.h 67526 2011-04-17 23:14:15Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -80,6 +79,8 @@ public: virtual void SetSelection(long from, long to); virtual void SetEditable(bool editable); + virtual bool SendMaxLenEvent(); + // Implementation // -------------- diff --git a/Externals/wxWidgets3/include/wx/osx/tglbtn.h b/Externals/wxWidgets3/include/wx/osx/tglbtn.h index e68a2ba60c..eaa48e8b81 100644 --- a/Externals/wxWidgets3/include/wx/osx/tglbtn.h +++ b/Externals/wxWidgets3/include/wx/osx/tglbtn.h @@ -5,7 +5,6 @@ // Author: Stefan Csomor // Modified by: // Created: 08.02.01 -// RCS-ID: $Id: tglbtn.h 67949 2011-06-16 00:43:22Z RD $ // Copyright: (c) 2004 Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/timectrl.h b/Externals/wxWidgets3/include/wx/osx/timectrl.h index 2d093acd54..6673fcce38 100644 --- a/Externals/wxWidgets3/include/wx/osx/timectrl.h +++ b/Externals/wxWidgets3/include/wx/osx/timectrl.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxOSX-specific wxTimePickerCtrl class. // Author: Vadim Zeitlin // Created: 2011-12-18 -// RCS-ID: $Id: timectrl.h 70071 2011-12-20 21:27:14Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/toolbar.h b/Externals/wxWidgets3/include/wx/osx/toolbar.h index f4a21982a6..2cbd0d7c6a 100644 --- a/Externals/wxWidgets3/include/wx/osx/toolbar.h +++ b/Externals/wxWidgets3/include/wx/osx/toolbar.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: toolbar.h 70854 2012-03-10 00:01:09Z RD $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -29,7 +28,7 @@ class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase inline wxToolBar(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER|wxTB_HORIZONTAL, + long style = wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr) { Init(); @@ -38,7 +37,7 @@ class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase virtual ~wxToolBar(); bool Create(wxWindow *parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxNO_BORDER|wxTB_HORIZONTAL, + long style = wxTB_HORIZONTAL, const wxString& name = wxToolBarNameStr); virtual void SetWindowStyleFlag(long style); @@ -72,6 +71,10 @@ class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase #endif #if wxOSX_USE_NATIVE_TOOLBAR + // make all tools selectable + void OSXSetSelectableTools(bool set); + void OSXSelectTool(int toolId); + bool MacInstallNativeToolbar(bool usesNative); void MacUninstallNativeToolbar(); bool MacWantsNativeToolbar(); diff --git a/Externals/wxWidgets3/include/wx/osx/tooltip.h b/Externals/wxWidgets3/include/wx/osx/tooltip.h index a9b8467b45..f05122ba00 100644 --- a/Externals/wxWidgets3/include/wx/osx/tooltip.h +++ b/Externals/wxWidgets3/include/wx/osx/tooltip.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 31.01.99 -// RCS-ID: $Id: tooltip.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 1999 Robert Roebling, Vadim Zeitlin, Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/osx/toplevel.h b/Externals/wxWidgets3/include/wx/osx/toplevel.h index afe1f1d80f..73b218fe75 100644 --- a/Externals/wxWidgets3/include/wx/osx/toplevel.h +++ b/Externals/wxWidgets3/include/wx/osx/toplevel.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 20.09.01 -// RCS-ID: $Id: toplevel.h 70295 2012-01-08 14:52:47Z VZ $ // Copyright: (c) 2001 Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -74,6 +73,9 @@ public: virtual void SetTitle( const wxString& title); virtual wxString GetTitle() const; + virtual void SetLabel(const wxString& label) { SetTitle( label ); } + virtual wxString GetLabel() const { return GetTitle(); } + virtual void OSXSetModified(bool modified); virtual bool OSXIsModified() const; diff --git a/Externals/wxWidgets3/include/wx/osx/treectrl.h b/Externals/wxWidgets3/include/wx/osx/treectrl.h index 090111624f..587325b85a 100644 --- a/Externals/wxWidgets3/include/wx/osx/treectrl.h +++ b/Externals/wxWidgets3/include/wx/osx/treectrl.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: treectrl.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -236,20 +235,20 @@ protected: }; /* - wxEVT_COMMAND_TREE_BEGIN_DRAG, - wxEVT_COMMAND_TREE_BEGIN_RDRAG, - wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, - wxEVT_COMMAND_TREE_END_LABEL_EDIT, - wxEVT_COMMAND_TREE_DELETE_ITEM, - wxEVT_COMMAND_TREE_GET_INFO, - wxEVT_COMMAND_TREE_SET_INFO, - wxEVT_COMMAND_TREE_ITEM_EXPANDED, - wxEVT_COMMAND_TREE_ITEM_EXPANDING, - wxEVT_COMMAND_TREE_ITEM_COLLAPSED, - wxEVT_COMMAND_TREE_ITEM_COLLAPSING, - wxEVT_COMMAND_TREE_SEL_CHANGED, - wxEVT_COMMAND_TREE_SEL_CHANGING, - wxEVT_COMMAND_TREE_KEY_DOWN + wxEVT_TREE_BEGIN_DRAG, + wxEVT_TREE_BEGIN_RDRAG, + wxEVT_TREE_BEGIN_LABEL_EDIT, + wxEVT_TREE_END_LABEL_EDIT, + wxEVT_TREE_DELETE_ITEM, + wxEVT_TREE_GET_INFO, + wxEVT_TREE_SET_INFO, + wxEVT_TREE_ITEM_EXPANDED, + wxEVT_TREE_ITEM_EXPANDING, + wxEVT_TREE_ITEM_COLLAPSED, + wxEVT_TREE_ITEM_COLLAPSING, + wxEVT_TREE_SEL_CHANGED, + wxEVT_TREE_SEL_CHANGING, + wxEVT_TREE_KEY_DOWN */ class WXDLLIMPEXP_CORE wxTreeEvent: public wxCommandEvent @@ -272,20 +271,36 @@ public: typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); -#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_GET_INFO(id, fn) { wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SET_INFO(id, fn) { wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, -#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_DRAG(id, fn) { wxEVT_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_RDRAG(id, fn) { wxEVT_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) { wxEVT_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_END_LABEL_EDIT(id, fn) { wxEVT_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_DELETE_ITEM(id, fn) { wxEVT_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_GET_INFO(id, fn) { wxEVT_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SET_INFO(id, fn) { wxEVT_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_EXPANDED(id, fn) { wxEVT_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_EXPANDING(id, fn) { wxEVT_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_COLLAPSED(id, fn) { wxEVT_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_ITEM_COLLAPSING(id, fn) { wxEVT_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SEL_CHANGED(id, fn) { wxEVT_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_SEL_CHANGING(id, fn) { wxEVT_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, +#define EVT_TREE_KEY_DOWN(id, fn) { wxEVT_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxTreeEventFunction) & fn, NULL }, + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREE_BEGIN_DRAG wxEVT_TREE_BEGIN_DRAG +#define wxEVT_COMMAND_TREE_BEGIN_RDRAG wxEVT_TREE_BEGIN_RDRAG +#define wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT wxEVT_TREE_BEGIN_LABEL_EDIT +#define wxEVT_COMMAND_TREE_END_LABEL_EDIT wxEVT_TREE_END_LABEL_EDIT +#define wxEVT_COMMAND_TREE_DELETE_ITEM wxEVT_TREE_DELETE_ITEM +#define wxEVT_COMMAND_TREE_GET_INFO wxEVT_TREE_GET_INFO +#define wxEVT_COMMAND_TREE_SET_INFO wxEVT_TREE_SET_INFO +#define wxEVT_COMMAND_TREE_ITEM_EXPANDED wxEVT_TREE_ITEM_EXPANDED +#define wxEVT_COMMAND_TREE_ITEM_EXPANDING wxEVT_TREE_ITEM_EXPANDING +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSED wxEVT_TREE_ITEM_COLLAPSED +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSING wxEVT_TREE_ITEM_COLLAPSING +#define wxEVT_COMMAND_TREE_SEL_CHANGED wxEVT_TREE_SEL_CHANGED +#define wxEVT_COMMAND_TREE_SEL_CHANGING wxEVT_TREE_SEL_CHANGING +#define wxEVT_COMMAND_TREE_KEY_DOWN wxEVT_TREE_KEY_DOWN #endif // _WX_TREECTRL_H_ diff --git a/Externals/wxWidgets3/include/wx/osx/webview_webkit.h b/Externals/wxWidgets3/include/wx/osx/webview_webkit.h index d0a93e653e..803f8b0b29 100644 --- a/Externals/wxWidgets3/include/wx/osx/webview_webkit.h +++ b/Externals/wxWidgets3/include/wx/osx/webview_webkit.h @@ -5,7 +5,6 @@ // Author: Jethro Grassie / Kevin Ollivier / Marianne Gagnon // Modified by: // Created: 2004-4-16 -// RCS-ID: $Id: webview_webkit.h 69074 2011-09-12 18:35:39Z SJL $ // Copyright: (c) Jethro Grassie / Kevin Ollivier / Marianne Gagnon // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -21,6 +20,8 @@ #include "wx/control.h" #include "wx/webview.h" +#include "wx/osx/core/objcid.h" + // ---------------------------------------------------------------------------- // Web Kit Control // ---------------------------------------------------------------------------- @@ -52,15 +53,11 @@ public: virtual bool CanGoForward() const; virtual void GoBack(); virtual void GoForward(); - virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT); + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); virtual void Stop(); virtual wxString GetPageSource() const; virtual wxString GetPageText() const; - //We do not want to hide the other overloads - using wxWebView::SetPage; - virtual void SetPage(const wxString& html, const wxString& baseUrl); - virtual void Print(); virtual void LoadURL(const wxString& url); @@ -74,20 +71,28 @@ public: virtual bool CanSetZoomType(wxWebViewZoomType type) const; virtual bool IsBusy() const { return m_busy; } - + //History functions virtual void ClearHistory(); virtual void EnableHistory(bool enable = true); virtual wxVector > GetBackwardHistory(); virtual wxVector > GetForwardHistory(); virtual void LoadHistoryItem(wxSharedPtr item); - + //Undo / redo functionality virtual bool CanUndo() const; virtual bool CanRedo() const; virtual void Undo(); virtual void Redo(); + //Find function + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) + { + wxUnusedVar(text); + wxUnusedVar(flags); + return wxNOT_FOUND; + } + //Clipboard functions virtual bool CanCut() const { return true; } virtual bool CanCopy() const { return true; } @@ -95,11 +100,11 @@ public: virtual void Cut(); virtual void Copy(); virtual void Paste(); - + //Editing functions virtual void SetEditable(bool enable = true); virtual bool IsEditable() const; - + //Selection virtual void DeleteSelection(); virtual bool HasSelection() const; @@ -107,12 +112,14 @@ public: virtual wxString GetSelectedText() const; virtual wxString GetSelectedSource() const; virtual void ClearSelection(); - + void RunScript(const wxString& javascript); - + //Virtual Filesystem Support virtual void RegisterHandler(wxSharedPtr handler); + virtual void* GetNativeBackend() const { return m_webView; } + // ---- methods not from the parent (common) interface bool CanGetPageSource() const; @@ -141,6 +148,8 @@ public: bool m_busy; protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + DECLARE_EVENT_TABLE() void MacVisibilityChanged(); @@ -149,7 +158,7 @@ private: wxWindowID m_windowID; wxString m_pageTitle; - struct objc_object *m_webView; + wxObjCID m_webView; // we may use this later to setup our own mouse events, // so leave it in for now. @@ -158,6 +167,20 @@ private: //TODO: look into using DECLARE_WXCOCOA_OBJC_CLASS rather than this. }; -#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT +class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryWebKit : public wxWebViewFactory +{ +public: + virtual wxWebView* Create() { return new wxWebViewWebKit; } + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { return new wxWebViewWebKit(parent, id, url, pos, size, style, name); } +}; + +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT #endif // _WX_WEBKIT_H_ diff --git a/Externals/wxWidgets3/include/wx/osx/webviewhistoryitem_webkit.h b/Externals/wxWidgets3/include/wx/osx/webviewhistoryitem_webkit.h index 05976803f5..f1c2d5f655 100644 --- a/Externals/wxWidgets3/include/wx/osx/webviewhistoryitem_webkit.h +++ b/Externals/wxWidgets3/include/wx/osx/webviewhistoryitem_webkit.h @@ -2,7 +2,6 @@ // Name: include/wx/osx/webviewhistoryitem.h // Purpose: wxWebViewHistoryItem header for OSX // Author: Steven Lamerton -// Id: $Id: webviewhistoryitem_webkit.h 69074 2011-09-12 18:35:39Z SJL $ // Copyright: (c) 2011 Steven Lamerton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -15,6 +14,8 @@ #if wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT && (defined(__WXOSX_COCOA__) \ || defined(__WXOSX_CARBON__)) +#include "wx/osx/core/objcid.h" + class WXDLLIMPEXP_WEBVIEW wxWebViewHistoryItem { public: @@ -27,9 +28,9 @@ public: private: wxString m_url, m_title; - struct objc_object *m_histItem; + wxObjCID m_histItem; }; -#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT #endif // _WX_OSX_WEBVIEWHISTORYITEM_H_ diff --git a/Externals/wxWidgets3/include/wx/osx/window.h b/Externals/wxWidgets3/include/wx/osx/window.h index 1ac3916a8c..623493aa1e 100644 --- a/Externals/wxWidgets3/include/wx/osx/window.h +++ b/Externals/wxWidgets3/include/wx/osx/window.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: window.h 70765 2012-03-01 15:04:42Z JS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -55,6 +54,8 @@ public: long style = 0, const wxString& name = wxPanelNameStr ); + virtual void SendSizeEvent(int flags = 0); + // implement base class pure virtuals virtual void SetLabel( const wxString& label ); virtual wxString GetLabel() const; @@ -95,7 +96,7 @@ public: virtual int GetCharHeight() const; virtual int GetCharWidth() const; - + public: virtual void SetScrollbar( int orient, int pos, int thumbVisible, int range, bool refresh = true ); @@ -259,7 +260,10 @@ public: // optimization to avoid creating a user pane in wxWindow::Create if we already know // we will replace it with our own peer void DontCreatePeer(); - + + // return true unless DontCreatePeer() had been called + bool ShouldCreatePeer() const; + // sets the native implementation wrapper, can replace an existing peer, use peer = NULL to // release existing peer void SetPeer(wxOSXWidgetImpl* peer); @@ -273,7 +277,7 @@ public: // // this is useful for a few Cocoa function which can work with either views // or windows indiscriminately, e.g. for setting NSViewAnimationTargetKey - virtual void *OSXGetViewOrWindow() const { return GetHandle(); } + virtual void *OSXGetViewOrWindow() const; #endif // Cocoa void * MacGetCGContextRef() { return m_cgContextRef ; } @@ -283,10 +287,11 @@ public: virtual bool OSXHandleClicked( double timestampsec ); virtual bool OSXHandleKeyEvent( wxKeyEvent& event ); + virtual void OSXSimulateFocusEvents(); bool IsNativeWindowWrapper() const { return m_isNativeWindowWrapper; } - float GetContentScaleFactor() const ; + double GetContentScaleFactor() const ; // internal response to size events virtual void MacOnInternalSize() {} diff --git a/Externals/wxWidgets3/include/wx/overlay.h b/Externals/wxWidgets3/include/wx/overlay.h index 7f29b4fc71..adde26db86 100644 --- a/Externals/wxWidgets3/include/wx/overlay.h +++ b/Externals/wxWidgets3/include/wx/overlay.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2006-10-20 -// RCS-ID: $Id: overlay.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/ownerdrw.h b/Externals/wxWidgets3/include/wx/ownerdrw.h index 37a525844e..b25f5cc71a 100644 --- a/Externals/wxWidgets3/include/wx/ownerdrw.h +++ b/Externals/wxWidgets3/include/wx/ownerdrw.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: Marcin Malich // Created: 11.11.97 -// RCS-ID: $Id: ownerdrw.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/palette.h b/Externals/wxWidgets3/include/wx/palette.h index 4c29f23b98..85bf7dd689 100644 --- a/Externals/wxWidgets3/include/wx/palette.h +++ b/Externals/wxWidgets3/include/wx/palette.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: palette.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/panel.h b/Externals/wxWidgets3/include/wx/panel.h index 18c7aacd47..11fc2c6416 100644 --- a/Externals/wxWidgets3/include/wx/panel.h +++ b/Externals/wxWidgets3/include/wx/panel.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: panel.h 69378 2011-10-11 17:07:43Z VZ $ // Copyright: (c) Julian Smart // (c) 2011 Vadim Zeitlin // Licence: wxWindows Licence diff --git a/Externals/wxWidgets3/include/wx/paper.h b/Externals/wxWidgets3/include/wx/paper.h index 89dfe20d3c..d50d549804 100644 --- a/Externals/wxWidgets3/include/wx/paper.h +++ b/Externals/wxWidgets3/include/wx/paper.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: paper.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/pen.h b/Externals/wxWidgets3/include/wx/pen.h index 75147dcf37..e55b046eff 100644 --- a/Externals/wxWidgets3/include/wx/pen.h +++ b/Externals/wxWidgets3/include/wx/pen.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: pen.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -32,15 +31,14 @@ enum wxPenStyle wxPENSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK, wxPENSTYLE_STIPPLE = wxSTIPPLE, - wxPENSTYLE_BDIAGONAL_HATCH = wxBDIAGONAL_HATCH, - wxPENSTYLE_CROSSDIAG_HATCH = wxCROSSDIAG_HATCH, - wxPENSTYLE_FDIAGONAL_HATCH = wxFDIAGONAL_HATCH, - wxPENSTYLE_CROSS_HATCH = wxCROSS_HATCH, - wxPENSTYLE_HORIZONTAL_HATCH = wxHORIZONTAL_HATCH, - wxPENSTYLE_VERTICAL_HATCH = wxVERTICAL_HATCH, - - wxPENSTYLE_FIRST_HATCH = wxFIRST_HATCH, - wxPENSTYLE_LAST_HATCH = wxLAST_HATCH + wxPENSTYLE_BDIAGONAL_HATCH = wxHATCHSTYLE_BDIAGONAL, + wxPENSTYLE_CROSSDIAG_HATCH = wxHATCHSTYLE_CROSSDIAG, + wxPENSTYLE_FDIAGONAL_HATCH = wxHATCHSTYLE_FDIAGONAL, + wxPENSTYLE_CROSS_HATCH = wxHATCHSTYLE_CROSS, + wxPENSTYLE_HORIZONTAL_HATCH = wxHATCHSTYLE_HORIZONTAL, + wxPENSTYLE_VERTICAL_HATCH = wxHATCHSTYLE_VERTICAL, + wxPENSTYLE_FIRST_HATCH = wxHATCHSTYLE_FIRST, + wxPENSTYLE_LAST_HATCH = wxHATCHSTYLE_LAST }; enum wxPenJoin diff --git a/Externals/wxWidgets3/include/wx/persist.h b/Externals/wxWidgets3/include/wx/persist.h index 2ac6a4423e..45ed61eb9e 100644 --- a/Externals/wxWidgets3/include/wx/persist.h +++ b/Externals/wxWidgets3/include/wx/persist.h @@ -3,7 +3,6 @@ // Purpose: common classes for persistence support // Author: Vadim Zeitlin // Created: 2009-01-18 -// RCS-ID: $Id: persist.h 69583 2011-10-30 10:08:18Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/persist/bookctrl.h b/Externals/wxWidgets3/include/wx/persist/bookctrl.h index e01b19eaec..38eee262e9 100644 --- a/Externals/wxWidgets3/include/wx/persist/bookctrl.h +++ b/Externals/wxWidgets3/include/wx/persist/bookctrl.h @@ -3,7 +3,6 @@ // Purpose: persistence support for wxBookCtrl // Author: Vadim Zeitlin // Created: 2009-01-19 -// RCS-ID: $Id: bookctrl.h 58529 2009-01-30 21:38:29Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/persist/splitter.h b/Externals/wxWidgets3/include/wx/persist/splitter.h index 5f8fe34158..d8369c3783 100644 --- a/Externals/wxWidgets3/include/wx/persist/splitter.h +++ b/Externals/wxWidgets3/include/wx/persist/splitter.h @@ -3,7 +3,6 @@ // Purpose: Persistence support for wxSplitterWindow. // Author: Vadim Zeitlin // Created: 2011-08-31 -// RCS-ID: $Id: splitter.h 69582 2011-10-30 10:08:14Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/persist/toplevel.h b/Externals/wxWidgets3/include/wx/persist/toplevel.h index 34b4890625..7d79f23460 100644 --- a/Externals/wxWidgets3/include/wx/persist/toplevel.h +++ b/Externals/wxWidgets3/include/wx/persist/toplevel.h @@ -3,7 +3,6 @@ // Purpose: persistence support for wxTLW // Author: Vadim Zeitlin // Created: 2009-01-19 -// RCS-ID: $Id: toplevel.h 58529 2009-01-30 21:38:29Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/persist/treebook.h b/Externals/wxWidgets3/include/wx/persist/treebook.h index 0156fb8b94..1c0ba94631 100644 --- a/Externals/wxWidgets3/include/wx/persist/treebook.h +++ b/Externals/wxWidgets3/include/wx/persist/treebook.h @@ -3,7 +3,6 @@ // Purpose: persistence support for wxBookCtrl // Author: Vadim Zeitlin // Created: 2009-01-19 -// RCS-ID: $Id: treebook.h 58529 2009-01-30 21:38:29Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/persist/window.h b/Externals/wxWidgets3/include/wx/persist/window.h index 08d0e54c9a..279e11d26d 100644 --- a/Externals/wxWidgets3/include/wx/persist/window.h +++ b/Externals/wxWidgets3/include/wx/persist/window.h @@ -3,7 +3,6 @@ // Purpose: wxPersistentWindow declaration // Author: Vadim Zeitlin // Created: 2009-01-23 -// RCS-ID: $Id: window.h 59262 2009-03-02 12:10:40Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/pickerbase.h b/Externals/wxWidgets3/include/wx/pickerbase.h index ff5c86f0de..3c761da876 100644 --- a/Externals/wxWidgets3/include/wx/pickerbase.h +++ b/Externals/wxWidgets3/include/wx/pickerbase.h @@ -5,7 +5,6 @@ // Modified by: // Created: 14/4/2006 // Copyright: (c) Vadim Zeitlin, Francesco Montorsi -// RCS-ID: $Id: pickerbase.h 68921 2011-08-27 14:11:25Z VZ $ // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -106,6 +105,11 @@ public: // public API wxControl *GetPickerCtrl() { return m_picker; } + void SetTextCtrl(wxTextCtrl* text) + { m_text = text; } + void SetPickerCtrl(wxControl* picker) + { m_picker = picker; } + // methods that derived class must/may override virtual void UpdatePickerFromTextCtrl() = 0; virtual void UpdateTextCtrlFromPicker() = 0; diff --git a/Externals/wxWidgets3/include/wx/platform.h b/Externals/wxWidgets3/include/wx/platform.h index 74ad218a3a..53b04e522d 100644 --- a/Externals/wxWidgets3/include/wx/platform.h +++ b/Externals/wxWidgets3/include/wx/platform.h @@ -4,7 +4,6 @@ * Author: Vadim Zeitlin * Modified by: * Created: 29.10.01 (extracted from wx/defs.h) -* RCS-ID: $Id: platform.h 70757 2012-02-29 22:40:24Z VZ $ * Copyright: (c) 1997-2001 Vadim Zeitlin * Licence: wxWindows licence */ @@ -14,16 +13,6 @@ #ifndef _WX_PLATFORM_H_ #define _WX_PLATFORM_H_ - - -/* - Codewarrior doesn't define any Windows symbols until some headers - are included -*/ -#ifdef __MWERKS__ -# include -#endif - #ifdef __WXMAC_XCODE__ # include # include @@ -37,6 +26,12 @@ # ifndef MAC_OS_X_VERSION_10_6 # define MAC_OS_X_VERSION_10_6 1060 # endif +# ifndef MAC_OS_X_VERSION_10_7 +# define MAC_OS_X_VERSION_10_7 1070 +# endif +# ifndef MAC_OS_X_VERSION_10_8 +# define MAC_OS_X_VERSION_10_8 1080 +# endif # include "wx/osx/config_xcode.h" # ifndef __WXOSX__ # define __WXOSX__ 1 @@ -47,14 +42,20 @@ #endif /* - first define Windows symbols if they're not defined on the command line: we - can autodetect everything we need if _WIN32 is defined + We use __WINDOWS__ as our main identification symbol for Microsoft Windows + but it's actually not predefined directly by any commonly used compilers + (only Watcom defines it itself and it's not supported any longer), so we + define it ourselves if any of the following macros is defined: + + - MSVC _WIN32 (notice that this is also defined under Win64) + - Borland __WIN32__ + - Our __WXMSW__ which selects Windows as platform automatically */ -#if defined(__CYGWIN__) && defined(__WINDOWS__) -# ifndef __WXMSW__ -# define __WXMSW__ -# endif -#endif +#if defined(_WIN32) || defined(__WIN32__) || defined(__WXMSW__) +# ifndef __WINDOWS__ +# define __WINDOWS__ +# endif /* !__WINDOWS__ */ +#endif /* Any standard symbol indicating Windows */ #if defined(_WIN64) # ifndef _WIN32 @@ -71,14 +72,12 @@ # endif /* !__WIN64__ */ #endif /* _WIN64 */ -#if (defined(_WIN32) || defined(WIN32) || defined(__NT__) || defined(__WXWINCE__)) \ - && !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) -# ifndef __WXMSW__ -# define __WXMSW__ -# endif -#endif /* Win32 */ +#if defined(__WINDOWS__) + /* Select wxMSW under Windows if no other port is specified. */ +# if !defined(__WXMSW__) && !defined(__WXMOTIF__) && !defined(__WXGTK__) && !defined(__WXX11__) +# define __WXMSW__ +# endif -#if defined(__WXMSW__) # if !defined(__WINDOWS__) # define __WINDOWS__ # endif @@ -94,7 +93,25 @@ # ifndef __WIN32__ # define __WIN32__ # endif -#endif /* __WXMSW__ */ +#endif /* __WINDOWS__ */ + +/* Don't use widget toolkit specific code in non-GUI code */ +#if defined(wxUSE_GUI) && !wxUSE_GUI +# ifdef __WXMSW__ +# undef __WXMSW__ +# endif +# ifdef __WXGTK__ +# undef __WXGTK__ +# endif +#endif + +#if defined(__WXGTK__) && defined(__WINDOWS__) + +# ifdef __WXMSW__ +# undef __WXMSW__ +# endif + +#endif /* __WXGTK__ && __WINDOWS__ */ /* detect MS SmartPhone */ #if defined( WIN32_PLATFORM_WFSP ) @@ -154,24 +171,18 @@ # include "wx/android/config_android.h" #endif +#include "wx/compiler.h" + /* Include wx/setup.h for the Unix platform defines generated by configure and the library compilation options Note that it must be included before defining hardware symbols below as they - could be already defined by configure + could be already defined by configure but it must be included after defining + the compiler macros above as msvc/wx/setup.h relies on them under Windows. */ #include "wx/setup.h" -#ifdef __GCCXML__ - /* - we're using gccxml to create an XML representation of the entire - wxWidgets interface; use a special setup_gccxml.h file to fix some - of the stuff #defined by the real setup.h - */ - #include "wx/setup_gccxml.h" -#endif - /* Convenience for any optional classes that use the wxAnyButton base class. */ @@ -236,11 +247,6 @@ # endif #endif /* wxUSE_UNICODE */ -#if defined( __MWERKS__ ) && !defined(__INTEL__) -/* otherwise MSL headers bring in WIN32 dependant APIs */ -#undef UNICODE -#endif - /* test for old versions of Borland C, normally need at least 5.82, Turbo @@ -279,25 +285,6 @@ # define wxCOMPILER_BROKEN_CONCAT_OPER #endif /* __BORLANDC__ */ -/* - Define Watcom-specific macros. -*/ -#ifndef __WATCOMC__ -# define wxWATCOM_VERSION(major,minor) 0 -# define wxCHECK_WATCOM_VERSION(major,minor) 0 -# define wxONLY_WATCOM_EARLIER_THAN(major,minor) 0 -# define WX_WATCOM_ONLY_CODE( x ) -#else -# if __WATCOMC__ < 1200 -# error "Only Open Watcom is supported in this release" -# endif - -# define wxWATCOM_VERSION(major,minor) ( major * 100 + minor * 10 + 1100 ) -# define wxCHECK_WATCOM_VERSION(major,minor) ( __WATCOMC__ >= wxWATCOM_VERSION(major,minor) ) -# define wxONLY_WATCOM_EARLIER_THAN(major,minor) ( __WATCOMC__ < wxWATCOM_VERSION(major,minor) ) -# define WX_WATCOM_ONLY_CODE( x ) x -#endif - /* OS: first of all, test for MS-DOS platform. We must do this before testing for Unix, because DJGPP compiler defines __unix__ under MS-DOS @@ -347,12 +334,6 @@ # endif # endif /* SGI */ -# if defined(__SUNPRO_CC) -# ifndef __SUNCC__ -# define __SUNCC__ __SUNPRO_CC -# endif /* Sun CC */ -# endif /* Sun CC */ - # ifdef __EMX__ # define OS2EMX_PLAIN_CHAR # endif @@ -397,17 +378,6 @@ # endif # endif -/* - OS: Classic Mac OS - */ -#elif defined(applec) || \ - defined(THINK_C) || \ - (defined(__MWERKS__) && !defined(__INTEL__)) - /* MacOS */ -# if !defined(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG) -# define wxSIZE_T_IS_ULONG -# endif - /* OS: OS/2 */ @@ -432,61 +402,22 @@ # define wxSIZE_T_IS_UINT /* - OS: Otherwise it must be Windows + OS: Windows */ -#else /* Windows */ -# ifndef __WINDOWS__ -# define __WINDOWS__ -# endif /* Windows */ +#elif defined(__WINDOWS__) /* to be changed for Win64! */ # ifndef __WIN32__ # error "__WIN32__ should be defined for Win32 and Win64, Win16 is not supported" # endif - /* - define another standard symbol for Microsoft Visual C++: the standard - one (_MSC_VER) is also defined by Metrowerks compiler - */ -# if defined(_MSC_VER) && !defined(__MWERKS__) -# define __VISUALC__ _MSC_VER - - /* - define special symbols for different VC version instead of writing tests - for magic numbers such as 1200, 1300 &c repeatedly - */ -# if __VISUALC__ < 1100 -# error "This Visual C++ version is too old and not supported any longer." -# elif __VISUALC__ < 1200 -# define __VISUALC5__ -# elif __VISUALC__ < 1300 -# define __VISUALC6__ -# elif __VISUALC__ < 1400 -# define __VISUALC7__ -# elif __VISUALC__ < 1500 -# define __VISUALC8__ -# elif __VISUALC__ < 1600 -# define __VISUALC9__ -# elif __VISUALC__ < 1700 -# define __VISUALC10__ -# elif __VISUALC__ < 1800 -# define __VISUALC11__ -# else -# pragma message("Please update wx/platform.h to recognize this VC++ version") -# endif - -# elif defined(__BCPLUSPLUS__) && !defined(__BORLANDC__) -# define __BORLANDC__ -# elif defined(__WATCOMC__) -# elif defined(__SC__) -# define __SYMANTECC__ -# endif /* compiler */ - /* 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(wxSIZE_T_IS_UINT) && !defined(wxSIZE_T_IS_ULONG) && !defined(__WIN64__) # define wxSIZE_T_IS_UINT # endif +#else +# error "Unknown platform." #endif /* OS */ /* @@ -501,18 +432,6 @@ # define __X__ #endif -#ifdef __SC__ -# ifdef __DMC__ -# define __DIGITALMARS__ -# else -# define __SYMANTEC__ -# endif -#endif - -#ifdef __INTEL_COMPILER -# define __INTELC__ -#endif - /* We get "Large Files (ILP32) not supported in strict ANSI mode." #error from HP-UX standard headers when compiling with g++ without this: @@ -528,69 +447,23 @@ # include "wx/msw/libraries.h" #endif -/* - This macro can be used to test the gcc version and can be used like this: - -# if wxCHECK_GCC_VERSION(3, 1) - ... we have gcc 3.1 or later ... -# else - ... no gcc at all or gcc < 3.1 ... -# endif -*/ -#if defined(__GNUC__) && defined(__GNUC_MINOR__) - #define wxCHECK_GCC_VERSION( major, minor ) \ - ( ( __GNUC__ > (major) ) \ - || ( __GNUC__ == (major) && __GNUC_MINOR__ >= (minor) ) ) -#else - #define wxCHECK_GCC_VERSION( major, minor ) 0 -#endif - #if defined(__BORLANDC__) || (defined(__GNUC__) && __GNUC__ < 3) #define wxNEEDS_CHARPP #endif -/* - This macro can be used to test the Visual C++ version. -*/ -#ifndef __VISUALC__ -# define wxVISUALC_VERSION(major) 0 -# define wxCHECK_VISUALC_VERSION(major) 0 -#else -# define wxVISUALC_VERSION(major) ( (6 + major) * 100 ) -# define wxCHECK_VISUALC_VERSION(major) ( __VISUALC__ >= wxVISUALC_VERSION(major) ) -#endif - -/* - This macro can be used to check that the version of mingw32 compiler is - at least maj.min - */ #if ( defined( __GNUWIN32__ ) || defined( __MINGW32__ ) || \ ( defined( __CYGWIN__ ) && defined( __WINDOWS__ ) ) || \ wxCHECK_WATCOM_VERSION(1,0) ) && \ !defined(__DOS__) && \ !defined(__WXPM__) && \ !defined(__WXMOTIF__) && \ - !defined(__WXGTK__) && \ !defined(__WXX11__) # include "wx/msw/gccpriv.h" #else # undef wxCHECK_W32API_VERSION # define wxCHECK_W32API_VERSION(maj, min) (0) -# undef wxCHECK_MINGW32_VERSION -# define wxCHECK_MINGW32_VERSION(maj, min) (0) #endif -/** - This is similar to wxCHECK_GCC_VERSION but for Sun CC compiler. - */ -#ifdef __SUNCC__ - /* - __SUNCC__ is 0xVRP where V is major version, R release and P patch level - */ - #define wxCHECK_SUNCC_VERSION(maj, min) (__SUNCC__ >= (((maj)<<8) | ((min)<<4))) -#else - #define wxCHECK_SUNCC_VERSION(maj, min) (0) -#endif /* Handle Darwin gcc universal compilation. Don't do this in an Apple- @@ -644,8 +517,7 @@ checking for any OS X port (Carbon and Cocoa) and __WXMAC__ is an old name for it. */ -#if defined(__WXOSX_CARBON__) || defined(__WXOSX_COCOA__) || defined(__WXOSX_IPHONE__) \ - || (defined(__DARWIN__) && !wxUSE_GUI) +#if defined(__WXOSX_CARBON__) || defined(__WXOSX_COCOA__) || defined(__WXOSX_IPHONE__) # ifndef __WXOSX__ # define __WXOSX__ 1 # endif @@ -684,6 +556,12 @@ # ifndef MAC_OS_X_VERSION_10_6 # define MAC_OS_X_VERSION_10_6 1060 # endif +# ifndef MAC_OS_X_VERSION_10_7 +# define MAC_OS_X_VERSION_10_7 1070 +# endif +# ifndef MAC_OS_X_VERSION_10_8 +# define MAC_OS_X_VERSION_10_8 1080 +# endif # else # error "only mach-o configurations are supported" # endif @@ -770,7 +648,7 @@ /* Choose which method we will use for updating menus * - in OnIdle, or when we receive a wxEVT_MENU_OPEN event. - * Presently, only Windows and GTK+ support wxEVT_MENU_OPEN. + * Presently, only Windows, OS X and GTK+ support wxEVT_MENU_OPEN. */ #ifndef wxUSE_IDLEMENUUPDATES # if (defined(__WXMSW__) || defined(__WXGTK__) || defined(__WXOSX__)) && !defined(__WXUNIVERSAL__) diff --git a/Externals/wxWidgets3/include/wx/platinfo.h b/Externals/wxWidgets3/include/wx/platinfo.h index 8adabba16b..f82080e587 100644 --- a/Externals/wxWidgets3/include/wx/platinfo.h +++ b/Externals/wxWidgets3/include/wx/platinfo.h @@ -4,7 +4,6 @@ // Author: Francesco Montorsi // Modified by: // Created: 07.07.2006 (based on wxToolkitInfo) -// RCS-ID: $Id: platinfo.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) 2006 Francesco Montorsi // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/popupwin.h b/Externals/wxWidgets3/include/wx/popupwin.h index e6ed10c4e3..6b61517f39 100644 --- a/Externals/wxWidgets3/include/wx/popupwin.h +++ b/Externals/wxWidgets3/include/wx/popupwin.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 06.01.01 -// RCS-ID: $Id: popupwin.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) 2001 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -130,7 +129,7 @@ protected: // get alerted when child gets deleted from under us void OnDestroy(wxWindowDestroyEvent& event); -#if defined(__WXMSW__) ||(defined(__WXMAC__) && wxOSX_USE_CARBON) +#if defined(__WXMSW__) ||(defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON) // Check if the mouse needs to be captured or released: we must release // when it's inside our window if we want the embedded controls to work. void OnIdle(wxIdleEvent& event); diff --git a/Externals/wxWidgets3/include/wx/position.h b/Externals/wxWidgets3/include/wx/position.h index 20776de396..bd324e2343 100644 --- a/Externals/wxWidgets3/include/wx/position.h +++ b/Externals/wxWidgets3/include/wx/position.h @@ -3,7 +3,6 @@ // Purpose: Common structure and methods for positional information. // Author: Vadim Zeitlin, Robin Dunn, Brad Anderson, Bryan Petty // Created: 2007-03-13 -// RCS-ID: $Id: position.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 2007 The wxWidgets Team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/power.h b/Externals/wxWidgets3/include/wx/power.h index ea3a11c9fc..17e81b6efb 100644 --- a/Externals/wxWidgets3/include/wx/power.h +++ b/Externals/wxWidgets3/include/wx/power.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2006-05-27 -// RCS-ID: $Id: power.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/preferences.h b/Externals/wxWidgets3/include/wx/preferences.h new file mode 100644 index 0000000000..7eee648289 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/preferences.h @@ -0,0 +1,145 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/preferences.h +// Purpose: Declaration of wxPreferencesEditor class. +// Author: Vaclav Slavik +// Created: 2013-02-19 +// Copyright: (c) 2013 Vaclav Slavik +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PREFERENCES_H_ +#define _WX_PREFERENCES_H_ + +#include "wx/defs.h" + +#if wxUSE_PREFERENCES_EDITOR + +#include "wx/bitmap.h" +#include "wx/vector.h" + +class WXDLLIMPEXP_FWD_CORE wxWindow; + +class wxPreferencesEditorImpl; + +#if defined(__WXOSX_COCOA__) + // GetLargeIcon() is used + #define wxHAS_PREF_EDITOR_ICONS + // Changes should be applied immediately + #define wxHAS_PREF_EDITOR_APPLY_IMMEDIATELY + // The dialog is shown non-modally. + #define wxHAS_PREF_EDITOR_MODELESS +#elif defined(__WXGTK__) + // Changes should be applied immediately + #define wxHAS_PREF_EDITOR_APPLY_IMMEDIATELY + // The dialog is shown non-modally. + #define wxHAS_PREF_EDITOR_MODELESS +#endif + +// ---------------------------------------------------------------------------- +// wxPreferencesEditor: Native preferences editing +// ---------------------------------------------------------------------------- + +// One page of a preferences window +class WXDLLIMPEXP_CORE wxPreferencesPage +{ +public: + wxPreferencesPage() {} + virtual ~wxPreferencesPage() {} + + // Name of the page, used e.g. for tabs + virtual wxString GetName() const = 0; + + // Return 32x32 icon used for the page. Currently only used on OS X, where + // implementation is required; unused on other platforms. Because of this, + // the method is only pure virtual on platforms that use it. +#ifdef wxHAS_PREF_EDITOR_ICONS + virtual wxBitmap GetLargeIcon() const = 0; +#else + virtual wxBitmap GetLargeIcon() const { return wxBitmap(); } +#endif + + // Create a window (usually a wxPanel) for this page. The caller takes + // ownership of the returned window. + virtual wxWindow *CreateWindow(wxWindow *parent) = 0; + + wxDECLARE_NO_COPY_CLASS(wxPreferencesPage); +}; + + +// Helper for implementing some common pages (General, Advanced) +class WXDLLIMPEXP_CORE wxStockPreferencesPage : public wxPreferencesPage +{ +public: + enum Kind + { + Kind_General, + Kind_Advanced + }; + + wxStockPreferencesPage(Kind kind) : m_kind(kind) {} + Kind GetKind() const { return m_kind; } + + virtual wxString GetName() const; +#ifdef __WXOSX_COCOA__ + virtual wxBitmap GetLargeIcon() const; +#endif + +private: + Kind m_kind; +}; + + +// Notice that this class does not inherit from wxWindow. +class WXDLLIMPEXP_CORE wxPreferencesEditor +{ +public: + // Ctor creates an empty editor, use AddPage() to add controls to it. + wxPreferencesEditor(const wxString& title = wxString()); + + // Dtor destroys the dialog if still shown. + virtual ~wxPreferencesEditor(); + + // Add a new page to the editor. The editor takes ownership of the page + // and won't delete it until it is destroyed itself. + void AddPage(wxPreferencesPage *page); + + // Show the preferences dialog or bring it to the top if it's already + // shown. Notice that this method may or may not block depending on the + // platform, i.e. depending on whether the dialog is modal or not. + virtual void Show(wxWindow* parent); + + // Hide the currently shown dialog, if any. This is typically used to + // dismiss the dialog if the object whose preferences it is editing was + // closed. + void Dismiss(); + + // Whether changes to values in the pages should be applied immediately + // (OS X, GTK+) or only when the user clicks OK/Apply (Windows) + static bool ShouldApplyChangesImmediately() + { +#ifdef wxHAS_PREF_EDITOR_APPLY_IMMEDIATELY + return true; +#else + return false; +#endif + } + + // Whether the dialog is shown modally, i.e. Show() blocks, or not. + static bool ShownModally() + { +#ifdef wxHAS_PREF_EDITOR_MODELESS + return false; +#else + return true; +#endif + } + +private: + wxPreferencesEditorImpl* m_impl; + + wxDECLARE_NO_COPY_CLASS(wxPreferencesEditor); +}; + +#endif // wxUSE_PREFERENCES_EDITOR + +#endif // _WX_PREFERENCES_H_ diff --git a/Externals/wxWidgets3/include/wx/print.h b/Externals/wxWidgets3/include/wx/print.h index 9d11bb741a..56ebcf6597 100644 --- a/Externals/wxWidgets3/include/wx/print.h +++ b/Externals/wxWidgets3/include/wx/print.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: print.h 54125 2008-06-11 19:17:41Z SC $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/printdlg.h b/Externals/wxWidgets3/include/wx/printdlg.h index 826fbca204..d7e7e4e267 100644 --- a/Externals/wxWidgets3/include/wx/printdlg.h +++ b/Externals/wxWidgets3/include/wx/printdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: printdlg.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/eventloopsourcesmanager.h b/Externals/wxWidgets3/include/wx/private/eventloopsourcesmanager.h new file mode 100644 index 0000000000..54ce5b0fce --- /dev/null +++ b/Externals/wxWidgets3/include/wx/private/eventloopsourcesmanager.h @@ -0,0 +1,25 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/eventloopsourcesmanager.h +// Purpose: declares wxEventLoopSourcesManagerBase class +// Author: Rob Bresalier +// Created: 2013-06-19 +// Copyright: (c) 2013 Rob Bresalier +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_EVENTLOOPSOURCESMANAGER_H_ +#define _WX_PRIVATE_EVENTLOOPSOURCESMANAGER_H_ + +// For pulling in the value of wxUSE_EVENTLOOP_SOURCE +#include "wx/evtloop.h" + +class WXDLLIMPEXP_BASE wxEventLoopSourcesManagerBase +{ +public: +#if wxUSE_EVENTLOOP_SOURCE + virtual wxEventLoopSource* + AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags) = 0; +#endif +}; + +#endif // _WX_PRIVATE_EVENTLOOPSOURCESMANAGER_H_ diff --git a/Externals/wxWidgets3/include/wx/private/fd.h b/Externals/wxWidgets3/include/wx/private/fd.h index 57a4c1b9b8..3f4a604c37 100644 --- a/Externals/wxWidgets3/include/wx/private/fd.h +++ b/Externals/wxWidgets3/include/wx/private/fd.h @@ -3,7 +3,6 @@ // Purpose: private stuff for working with file descriptors // Author: Vadim Zeitlin // Created: 2008-11-23 (moved from wx/unix/private.h) -// RCS-ID: $Id: fd.h 62790 2009-12-06 02:29:42Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/fdiodispatcher.h b/Externals/wxWidgets3/include/wx/private/fdiodispatcher.h index aef0dc88e0..0b85505cc0 100644 --- a/Externals/wxWidgets3/include/wx/private/fdiodispatcher.h +++ b/Externals/wxWidgets3/include/wx/private/fdiodispatcher.h @@ -4,7 +4,6 @@ // Authors: Lukasz Michalski // Created: December 2006 // Copyright: (c) Lukasz Michalski -// RCS-ID: $Id: fdiodispatcher.h 61686 2009-08-17 23:02:29Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/fdioeventloopsourcehandler.h b/Externals/wxWidgets3/include/wx/private/fdioeventloopsourcehandler.h new file mode 100644 index 0000000000..f457a09e5c --- /dev/null +++ b/Externals/wxWidgets3/include/wx/private/fdioeventloopsourcehandler.h @@ -0,0 +1,38 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/fdioeventloopsourcehandler.h +// Purpose: declares wxFDIOEventLoopSourceHandler class +// Author: Rob Bresalier, Vadim Zeitlin +// Created: 2013-06-13 (extracted from src/unix/evtloopunix.cpp) +// Copyright: (c) 2009 Vadim Zeitlin +// (c) 2013 Rob Bresalier +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H +#define _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H + +#include "wx/evtloopsrc.h" + +// This class is a temporary bridge between event loop sources and +// FDIODispatcher. It is going to be removed soon, when all subject interfaces +// are modified +class wxFDIOEventLoopSourceHandler : public wxFDIOHandler +{ +public: + wxEXPLICIT wxFDIOEventLoopSourceHandler(wxEventLoopSourceHandler* handler) + : m_handler(handler) + { + } + + // Just forward to the real handler. + virtual void OnReadWaiting() { m_handler->OnReadWaiting(); } + virtual void OnWriteWaiting() { m_handler->OnWriteWaiting(); } + virtual void OnExceptionWaiting() { m_handler->OnExceptionWaiting(); } + +protected: + wxEventLoopSourceHandler* const m_handler; + + wxDECLARE_NO_COPY_CLASS(wxFDIOEventLoopSourceHandler); +}; + +#endif // _WX_PRIVATE_FDIO_EVENT_LOOP_SOURCE_HANDLER_H diff --git a/Externals/wxWidgets3/include/wx/private/fdiohandler.h b/Externals/wxWidgets3/include/wx/private/fdiohandler.h index e7fa5efbd2..94e36490cd 100644 --- a/Externals/wxWidgets3/include/wx/private/fdiohandler.h +++ b/Externals/wxWidgets3/include/wx/private/fdiohandler.h @@ -3,7 +3,6 @@ // Purpose: declares wxFDIOHandler class // Author: Vadim Zeitlin // Created: 2009-08-17 -// RCS-ID: $Id: fdiohandler.h 64140 2010-04-25 21:33:16Z FM $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/fdiomanager.h b/Externals/wxWidgets3/include/wx/private/fdiomanager.h index 46b6996280..0721886f35 100644 --- a/Externals/wxWidgets3/include/wx/private/fdiomanager.h +++ b/Externals/wxWidgets3/include/wx/private/fdiomanager.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxFDIOManager // Author: Vadim Zeitlin // Created: 2009-08-17 -// RCS-ID: $Id: fdiomanager.h 64140 2010-04-25 21:33:16Z FM $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/fileback.h b/Externals/wxWidgets3/include/wx/private/fileback.h index a65b3419c9..aaf5ab4afb 100644 --- a/Externals/wxWidgets3/include/wx/private/fileback.h +++ b/Externals/wxWidgets3/include/wx/private/fileback.h @@ -2,7 +2,6 @@ // Name: wx/private/fileback.h // Purpose: Back an input stream with memory or a file // Author: Mike Wetherell -// RCS-ID: $Id: fileback.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 2006 Mike Wetherell // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/filename.h b/Externals/wxWidgets3/include/wx/private/filename.h index d2ac7c2c55..a4ed481020 100644 --- a/Externals/wxWidgets3/include/wx/private/filename.h +++ b/Externals/wxWidgets3/include/wx/private/filename.h @@ -4,7 +4,6 @@ // Author: Mike Wetherell // Modified by: // Created: 2006-10-22 -// RCS-ID: $Id: filename.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 2006 Mike Wetherell // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/flagscheck.h b/Externals/wxWidgets3/include/wx/private/flagscheck.h index 742eb02e87..3e3d9fbaae 100644 --- a/Externals/wxWidgets3/include/wx/private/flagscheck.h +++ b/Externals/wxWidgets3/include/wx/private/flagscheck.h @@ -3,7 +3,6 @@ // Purpose: helpers for checking that (bit)flags don't overlap // Author: Vaclav Slavik // Created: 2008-02-21 -// RCS-ID: $Id: flagscheck.h 59016 2009-02-19 05:34:25Z PC $ // Copyright: (c) 2008 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/fontmgr.h b/Externals/wxWidgets3/include/wx/private/fontmgr.h index e29ac1eece..c00270a6b1 100644 --- a/Externals/wxWidgets3/include/wx/private/fontmgr.h +++ b/Externals/wxWidgets3/include/wx/private/fontmgr.h @@ -3,7 +3,6 @@ // Purpose: font management for ports that don't have their own // Author: Vaclav Slavik // Created: 2006-11-18 -// RCS-ID: $Id: fontmgr.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com) // (c) 2006 REA Elektronik GmbH // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/private/fswatcher.h b/Externals/wxWidgets3/include/wx/private/fswatcher.h index 8f6f72ed47..cfffba4a89 100644 --- a/Externals/wxWidgets3/include/wx/private/fswatcher.h +++ b/Externals/wxWidgets3/include/wx/private/fswatcher.h @@ -3,7 +3,6 @@ // Purpose: File system watcher impl classes // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id: fswatcher.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -49,8 +48,13 @@ public: virtual bool Add(const wxFSWatchInfo& winfo) { - wxCHECK_MSG( m_watches.find(winfo.GetPath()) == m_watches.end(), false, - "Path '%s' is already watched"); + if ( m_watches.find(winfo.GetPath()) != m_watches.end() ) + { + wxLogTrace(wxTRACE_FSWATCHER, + "Path '%s' is already watched", winfo.GetPath()); + // This can happen if a dir is watched, then a parent tree added + return true; + } // construct watch entry wxSharedPtr watch(new wxFSWatchEntry(winfo)); @@ -66,8 +70,13 @@ public: virtual bool Remove(const wxFSWatchInfo& winfo) { wxFSWatchEntries::iterator it = m_watches.find(winfo.GetPath()); - wxCHECK_MSG( it != m_watches.end(), false, "Path '%s' is not watched"); - + if ( it == m_watches.end() ) + { + wxLogTrace(wxTRACE_FSWATCHER, + "Path '%s' is not watched", winfo.GetPath()); + // This can happen if a dir is watched, then a parent tree added + return true; + } wxSharedPtr watch = it->second; m_watches.erase(it); return DoRemove(watch); @@ -79,6 +88,12 @@ public: return true; } + // Check whether any filespec matches the file's ext (if present) + bool MatchesFilespec(const wxFileName& fn, const wxString& filespec) const + { + return filespec.empty() || wxMatchWild(filespec, fn.GetFullName()); + } + protected: virtual bool DoAdd(wxSharedPtr watch) = 0; diff --git a/Externals/wxWidgets3/include/wx/private/graphics.h b/Externals/wxWidgets3/include/wx/private/graphics.h index 5d87cacc8f..a5f303dd47 100644 --- a/Externals/wxWidgets3/include/wx/private/graphics.h +++ b/Externals/wxWidgets3/include/wx/private/graphics.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Stefan Csomor -// RCS-ID: $Id: graphics.h 67232 2011-03-18 15:10:15Z DS $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -28,6 +27,18 @@ class WXDLLIMPEXP_CORE wxGraphicsObjectRefData : public wxObjectRefData wxGraphicsRenderer* m_renderer; } ; +class WXDLLIMPEXP_CORE wxGraphicsBitmapData : public wxGraphicsObjectRefData +{ +public : + wxGraphicsBitmapData( wxGraphicsRenderer* renderer) : + wxGraphicsObjectRefData(renderer) {} + + virtual ~wxGraphicsBitmapData() {} + + // returns the native representation + virtual void * GetNativeBitmap() const = 0; +} ; + class WXDLLIMPEXP_CORE wxGraphicsMatrixData : public wxGraphicsObjectRefData { public : diff --git a/Externals/wxWidgets3/include/wx/private/markupparser.h b/Externals/wxWidgets3/include/wx/private/markupparser.h index 46da973b80..855d92ad05 100644 --- a/Externals/wxWidgets3/include/wx/private/markupparser.h +++ b/Externals/wxWidgets3/include/wx/private/markupparser.h @@ -3,7 +3,6 @@ // Purpose: Classes for parsing simple markup. // Author: Vadim Zeitlin // Created: 2011-02-16 -// RCS-ID: $Id: markupparser.h 67076 2011-02-27 18:36:52Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/markupparserattr.h b/Externals/wxWidgets3/include/wx/private/markupparserattr.h index 1cce2f8cce..d433879daf 100644 --- a/Externals/wxWidgets3/include/wx/private/markupparserattr.h +++ b/Externals/wxWidgets3/include/wx/private/markupparserattr.h @@ -3,7 +3,6 @@ // Purpose: Classes mapping markup attributes to wxFont/wxColour. // Author: Vadim Zeitlin // Created: 2011-02-18 -// RCS-ID: $Id: markupparserattr.h 70447 2012-01-23 11:28:32Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/overlay.h b/Externals/wxWidgets3/include/wx/private/overlay.h index 6b85653a87..1149701f7c 100644 --- a/Externals/wxWidgets3/include/wx/private/overlay.h +++ b/Externals/wxWidgets3/include/wx/private/overlay.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2006-10-20 -// RCS-ID: $Id: overlay.h 54125 2008-06-11 19:17:41Z SC $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/pipestream.h b/Externals/wxWidgets3/include/wx/private/pipestream.h new file mode 100644 index 0000000000..f14d9aba79 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/private/pipestream.h @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/pipestream.h +// Purpose: Declares wxPipeInputStream and wxPipeOutputStream. +// Author: Vadim Zeitlin +// Modified by: Rob Bresalier +// Created: 2013-04-27 +// Copyright: (c) 2003 Vadim Zeitlin +// (c) 2013 Rob Bresalier +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_PIPESTREAM_H_ +#define _WX_PRIVATE_PIPESTREAM_H_ + +#include "wx/platform.h" + +// wxPipeInputStream is a platform-dependent input stream class (i.e. deriving, +// possible indirectly, from wxInputStream) for reading from a pipe, i.e. a +// pipe FD under Unix or a pipe HANDLE under MSW. It provides a single extra +// IsOpened() method. +// +// wxPipeOutputStream is similar but has no additional methods at all. +#ifdef __UNIX__ + #include "wx/unix/private/pipestream.h" +#elif defined(__WINDOWS__) && !defined(__WXWINCE__) + #include "wx/msw/private/pipestream.h" +#endif + +#endif // _WX_PRIVATE_PIPESTREAM_H_ diff --git a/Externals/wxWidgets3/include/wx/private/preferences.h b/Externals/wxWidgets3/include/wx/private/preferences.h new file mode 100644 index 0000000000..8b926450b9 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/private/preferences.h @@ -0,0 +1,40 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/preferences.h +// Purpose: wxPreferencesEditorImpl declaration. +// Author: Vaclav Slavik +// Created: 2013-02-19 +// Copyright: (c) 2013 Vaclav Slavik +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_PREFERENCES_H_ +#define _WX_PRIVATE_PREFERENCES_H_ + +#include "wx/preferences.h" + +#if wxUSE_TOOLBAR && defined(__WXOSX_COCOA__) && wxOSX_USE_NATIVE_TOOLBAR + #define wxHAS_PREF_EDITOR_NATIVE +#endif + +// ---------------------------------------------------------------------------- +// wxPreferencesEditorImpl: defines wxPreferencesEditor implementation. +// ---------------------------------------------------------------------------- + +class wxPreferencesEditorImpl +{ +public: + // This is implemented in a platform-specific way. + static wxPreferencesEditorImpl* Create(const wxString& title); + + // These methods simply mirror the public wxPreferencesEditor ones. + virtual void AddPage(wxPreferencesPage* page) = 0; + virtual void Show(wxWindow* parent) = 0; + virtual void Dismiss() = 0; + + virtual ~wxPreferencesEditorImpl() {} + +protected: + wxPreferencesEditorImpl() {} +}; + +#endif // _WX_PRIVATE_PREFERENCES_H_ diff --git a/Externals/wxWidgets3/include/wx/private/richtooltip.h b/Externals/wxWidgets3/include/wx/private/richtooltip.h index 1334778e56..89ce193fa4 100644 --- a/Externals/wxWidgets3/include/wx/private/richtooltip.h +++ b/Externals/wxWidgets3/include/wx/private/richtooltip.h @@ -3,7 +3,6 @@ // Purpose: wxRichToolTipImpl declaration. // Author: Vadim Zeitlin // Created: 2011-10-18 -// RCS-ID: $Id: richtooltip.h 69463 2011-10-18 21:57:02Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -29,11 +28,12 @@ public: const wxColour& colEnd) = 0; virtual void SetCustomIcon(const wxIcon& icon) = 0; virtual void SetStandardIcon(int icon) = 0; - virtual void SetTimeout(unsigned milliseconds) = 0; + virtual void SetTimeout(unsigned milliseconds, + unsigned millisecondsShowdelay = 0) = 0; virtual void SetTipKind(wxTipKind tipKind) = 0; virtual void SetTitleFont(const wxFont& font) = 0; - virtual void ShowFor(wxWindow* win) = 0; + virtual void ShowFor(wxWindow* win, const wxRect* rect = NULL) = 0; virtual ~wxRichToolTipImpl() { } diff --git a/Externals/wxWidgets3/include/wx/private/sckaddr.h b/Externals/wxWidgets3/include/wx/private/sckaddr.h index cebd608d0e..ba2063ed9e 100644 --- a/Externals/wxWidgets3/include/wx/private/sckaddr.h +++ b/Externals/wxWidgets3/include/wx/private/sckaddr.h @@ -3,7 +3,6 @@ // Purpose: wxSockAddressImpl // Author: Vadim Zeitlin // Created: 2008-12-28 -// RCS-ID: $Id: sckaddr.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/selectdispatcher.h b/Externals/wxWidgets3/include/wx/private/selectdispatcher.h index 1e573277ef..644377739f 100644 --- a/Externals/wxWidgets3/include/wx/private/selectdispatcher.h +++ b/Externals/wxWidgets3/include/wx/private/selectdispatcher.h @@ -4,7 +4,6 @@ // Authors: Lukasz Michalski and Vadim Zeitlin // Created: December 2006 // Copyright: (c) Lukasz Michalski -// RCS-ID: $Id: selectdispatcher.h 63716 2010-03-20 12:45:28Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/socket.h b/Externals/wxWidgets3/include/wx/private/socket.h index 1664066d65..973b764f7d 100644 --- a/Externals/wxWidgets3/include/wx/private/socket.h +++ b/Externals/wxWidgets3/include/wx/private/socket.h @@ -3,7 +3,6 @@ // Purpose: wxSocketImpl and related declarations // Authors: Guilhem Lavaux, Vadim Zeitlin // Created: April 1997 -// RCS-ID: $Id: socket.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1997 Guilhem Lavaux // (c) 2008 Vadim Zeitlin // Licence: wxWindows licence @@ -51,7 +50,7 @@ having been defined in sys/types.h" when winsock.h is included later and doesn't seem to be necessary anyhow. It's not needed under Mac neither. */ -#if !defined(__WXMAC__) && !defined(__CYGWIN__) && !defined(__WXWINCE__) +#if !defined(__WXMAC__) && !defined(__WXMSW__) && !defined(__WXWINCE__) #include #endif @@ -79,10 +78,6 @@ // define some symbols which winsock.h defines but traditional BSD headers // don't -#ifndef __WINDOWS__ - #define SOCKET int -#endif - #ifndef INVALID_SOCKET #define INVALID_SOCKET (-1) #endif @@ -293,7 +288,7 @@ public: // TODO: make these fields protected and provide accessors for those of // them that wxSocketBase really needs //protected: - SOCKET m_fd; + wxSOCKET_T m_fd; int m_initialRecvBufferSize; int m_initialSendBufferSize; diff --git a/Externals/wxWidgets3/include/wx/private/streamtempinput.h b/Externals/wxWidgets3/include/wx/private/streamtempinput.h new file mode 100644 index 0000000000..df937cf574 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/private/streamtempinput.h @@ -0,0 +1,134 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/streamtempinput.h +// Purpose: defines wxStreamTempInputBuffer which is used by Unix and MSW +// implementations of wxExecute; this file is only used by the +// library and never by the user code +// Author: Vadim Zeitlin +// Modified by: Rob Bresalier +// Created: 2013-05-04 +// Copyright: (c) 2002 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_STREAMTEMPINPUT_H +#define _WX_PRIVATE_STREAMTEMPINPUT_H + +#include "wx/private/pipestream.h" + +// ---------------------------------------------------------------------------- +// wxStreamTempInputBuffer +// ---------------------------------------------------------------------------- + +/* + wxStreamTempInputBuffer is a hack which we need to solve the problem of + executing a child process synchronously with IO redirecting: when we do + this, the child writes to a pipe we open to it but when the pipe buffer + (which has finite capacity, e.g. commonly just 4Kb) becomes full we have to + read data from it because the child blocks in its write() until then and if + it blocks we are never going to return from wxExecute() so we dead lock. + + So here is the fix: we now read the output as soon as it appears into a temp + buffer (wxStreamTempInputBuffer object) and later just stuff it back into + the stream when the process terminates. See supporting code in wxExecute() + itself as well. + + Note that this is horribly inefficient for large amounts of output (count + the number of times we copy the data around) and so a better API is badly + needed! However it's not easy to devise a way to do this keeping backwards + compatibility with the existing wxExecute(wxEXEC_SYNC)... +*/ +class wxStreamTempInputBuffer +{ +public: + wxStreamTempInputBuffer() + { + m_stream = NULL; + m_buffer = NULL; + m_size = 0; + } + + // call to associate a stream with this buffer, otherwise nothing happens + // at all + void Init(wxPipeInputStream *stream) + { + wxASSERT_MSG( !m_stream, wxS("Can only initialize once") ); + + m_stream = stream; + } + + // check for input on our stream and cache it in our buffer if any + // + // return true if anything was done + bool Update() + { + if ( !m_stream || !m_stream->CanRead() ) + return false; + + // realloc in blocks of 4Kb: this is the default (and minimal) buffer + // size of the Unix pipes so it should be the optimal step + // + // NB: don't use "static int" in this inline function, some compilers + // (e.g. IBM xlC) don't like it + enum { incSize = 4096 }; + + void *buf = realloc(m_buffer, m_size + incSize); + if ( !buf ) + return false; + + m_buffer = buf; + m_stream->Read((char *)m_buffer + m_size, incSize); + m_size += m_stream->LastRead(); + + return true; + } + + // check if can continue reading from the stream, this is used to disable + // the callback once we can't read anything more + bool Eof() const + { + // If we have no stream, always return true as we can't read any more. + return !m_stream || m_stream->Eof(); + } + + // read everything remaining until the EOF, this should only be called once + // the child process terminates and we know that no more data is coming + bool ReadAll() + { + while ( !Eof() ) + { + if ( !Update() ) + return false; + } + + return true; + } + + // dtor puts the data buffered during this object lifetime into the + // associated stream + ~wxStreamTempInputBuffer() + { + if ( m_buffer ) + { + m_stream->Ungetch(m_buffer, m_size); + free(m_buffer); + } + } + + const void *GetBuffer() const { return m_buffer; } + + size_t GetSize() const { return m_size; } + +private: + // the stream we're buffering, if NULL we don't do anything at all + wxPipeInputStream *m_stream; + + // the buffer of size m_size (NULL if m_size == 0) + void *m_buffer; + + // the size of the buffer + size_t m_size; + + wxDECLARE_NO_COPY_CLASS(wxStreamTempInputBuffer); +}; + +#endif // _WX_PRIVATE_STREAMTEMPINPUT_H diff --git a/Externals/wxWidgets3/include/wx/private/textmeasure.h b/Externals/wxWidgets3/include/wx/private/textmeasure.h new file mode 100644 index 0000000000..69fbf85ab2 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/private/textmeasure.h @@ -0,0 +1,174 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/private/textmeasure.h +// Purpose: declaration of wxTextMeasure class +// Author: Manuel Martin +// Created: 2012-10-05 +// Copyright: (c) 1997-2012 wxWidgets team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_PRIVATE_TEXTMEASURE_H_ +#define _WX_PRIVATE_TEXTMEASURE_H_ + +class WXDLLIMPEXP_FWD_CORE wxDC; +class WXDLLIMPEXP_FWD_CORE wxFont; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +// ---------------------------------------------------------------------------- +// wxTextMeasure: class used to measure text extent. +// ---------------------------------------------------------------------------- + +class wxTextMeasureBase +{ +public: + // The first ctor argument must be non-NULL, i.e. each object of this class + // is associated with either a valid wxDC or a valid wxWindow. The font can + // be NULL to use the current DC/window font or can be specified explicitly. + wxTextMeasureBase(const wxDC *dc, const wxFont *theFont); + wxTextMeasureBase(const wxWindow *win, const wxFont *theFont); + + // Even though this class is not supposed to be used polymorphically, give + // it a virtual dtor to avoid compiler warnings. + virtual ~wxTextMeasureBase() { } + + + // Return the extent of a single line string. + void GetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL); + + // The same for a multiline (with '\n') string. + void GetMultiLineTextExtent(const wxString& text, + wxCoord *width, + wxCoord *height, + wxCoord *heightOneLine = NULL); + + // Find the dimensions of the largest string. + wxSize GetLargestStringExtent(size_t n, const wxString* strings); + wxSize GetLargestStringExtent(const wxArrayString& strings) + { + return GetLargestStringExtent(strings.size(), &strings[0]); + } + + // Fill the array with the widths for each "0..N" substrings for N from 1 + // to text.length(). + // + // The scaleX argument is the horizontal scale used by wxDC and is only + // used in the generic implementation. + bool GetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX); + + + // These functions are called by our public methods before and after each + // call to DoGetTextExtent(). Derived classes may override them to prepare + // for -- possibly several -- subsequent calls to DoGetTextExtent(). + // + // As these calls must be always paired, they're never called directly but + // only by our friend MeasuringGuard class. + // + // NB: They're public only to allow VC6 to compile this code, there doesn't + // seem to be any way to give MeasuringGuard access to them (FIXME-VC6) + virtual void BeginMeasuring() { } + virtual void EndMeasuring() { } + + // This is another method which is only used by MeasuringGuard. + bool IsUsingDCImpl() const { return m_useDCImpl; } + +protected: + // RAII wrapper for the two methods above. + class MeasuringGuard + { + public: + MeasuringGuard(wxTextMeasureBase& tm) : m_tm(tm) + { + // BeginMeasuring() should only be called if we have a native DC, + // so don't call it if we delegate to a DC of unknown type. + if ( !m_tm.IsUsingDCImpl() ) + m_tm.BeginMeasuring(); + } + + ~MeasuringGuard() + { + if ( !m_tm.IsUsingDCImpl() ) + m_tm.EndMeasuring(); + } + + private: + wxTextMeasureBase& m_tm; + }; + + + // The main function of this class, to be implemented in platform-specific + // way used by all our public methods. + // + // The width and height pointers here are never NULL and the input string + // is not empty. + virtual void DoGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL) = 0; + + // The real implementation of GetPartialTextExtents(). + // + // On input, widths array contains text.length() zero elements and the text + // is guaranteed to be non-empty. + virtual bool DoGetPartialTextExtents(const wxString& text, + wxArrayInt& widths, + double scaleX) = 0; + + // Call either DoGetTextExtent() or wxDC::GetTextExtent() depending on the + // value of m_useDCImpl. + // + // This must be always used instead of calling DoGetTextExtent() directly! + void CallGetTextExtent(const wxString& string, + wxCoord *width, + wxCoord *height, + wxCoord *descent = NULL, + wxCoord *externalLeading = NULL); + + // Return a valid font: if one was given to us in the ctor, use this one, + // otherwise use the current font of the associated wxDC or wxWindow. + wxFont GetFont() const; + + + // Exactly one of m_dc and m_win is non-NULL for any given object of this + // class. + const wxDC* const m_dc; + const wxWindow* const m_win; + + // If this is true, simply forward to wxDC::GetTextExtent() from our + // CallGetTextExtent() instead of calling our own DoGetTextExtent(). + // + // We need this because our DoGetTextExtent() typically only works with + // native DCs, i.e. those having an HDC under Windows or using Pango under + // GTK+. However wxTextMeasure object can be constructed for any wxDC, not + // necessarily a native one and in this case we must call back into the DC + // implementation of text measuring itself. + bool m_useDCImpl; + + // This one can be NULL or not. + const wxFont* const m_font; + + wxDECLARE_NO_COPY_CLASS(wxTextMeasureBase); +}; + +// Include the platform dependant class declaration, if any. +#if defined(__WXGTK20__) + #include "wx/gtk/private/textmeasure.h" +#elif defined(__WXMSW__) + #include "wx/msw/private/textmeasure.h" +#else // no platform-specific implementation of wxTextMeasure yet + #include "wx/generic/private/textmeasure.h" + + #define wxUSE_GENERIC_TEXTMEASURE 1 +#endif + +#ifndef wxUSE_GENERIC_TEXTMEASURE + #define wxUSE_GENERIC_TEXTMEASURE 0 +#endif + +#endif // _WX_PRIVATE_TEXTMEASURE_H_ diff --git a/Externals/wxWidgets3/include/wx/private/threadinfo.h b/Externals/wxWidgets3/include/wx/private/threadinfo.h index 5a3b433871..27a71674b0 100644 --- a/Externals/wxWidgets3/include/wx/private/threadinfo.h +++ b/Externals/wxWidgets3/include/wx/private/threadinfo.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxThreadSpecificInfo: thread-specific information // Author: Vadim Zeitlin // Created: 2009-07-13 -// RCS-ID: $Id: threadinfo.h 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -11,25 +10,30 @@ #ifndef _WX_PRIVATE_THREADINFO_H_ #define _WX_PRIVATE_THREADINFO_H_ -#if wxUSE_THREADS - -#include "wx/tls.h" +#include "wx/defs.h" class WXDLLIMPEXP_FWD_BASE wxLog; +#if wxUSE_INTL +#include "wx/hashset.h" +WX_DECLARE_HASH_SET(wxString, wxStringHash, wxStringEqual, + wxLocaleUntranslatedStrings); +#endif + + // ---------------------------------------------------------------------------- // wxThreadSpecificInfo: contains all thread-specific information used by wx // ---------------------------------------------------------------------------- -// currently the only thread-specific information we use is the active wxLog -// target but more could be added in the future (e.g. current wxLocale would be -// a likely candidate) and we will group all of them in this struct to avoid -// consuming more TLS slots than necessary as there is only a limited number of -// them - -// NB: this must be a POD to be stored in TLS -struct wxThreadSpecificInfo +// Group all thread-specific information we use (e.g. the active wxLog target) +// a in this class to avoid consuming more TLS slots than necessary as there is +// only a limited number of them. +class wxThreadSpecificInfo { +public: + // Return this thread's instance. + static wxThreadSpecificInfo& Get(); + // the thread-specific logger or NULL if the thread is using the global one // (this is not used for the main thread which always uses the global // logger) @@ -42,13 +46,24 @@ struct wxThreadSpecificInfo // because the default, for 0-initialized struct, should be to enable // logging bool loggingDisabled; + +#if wxUSE_INTL + // Storage for wxTranslations::GetUntranslatedString() + wxLocaleUntranslatedStrings untranslatedStrings; +#endif + +#if wxUSE_THREADS + // Cleans up storage for the current thread. Should be called when a thread + // is being destroyed. If it's not called, the only bad thing that happens + // is that the memory is deallocated later, on process termination. + static void ThreadCleanUp(); +#endif + +private: + wxThreadSpecificInfo() : logger(NULL), loggingDisabled(false) {} }; -// currently this is defined in src/common/log.cpp -extern wxTLS_TYPE(wxThreadSpecificInfo) wxThreadInfoVar; -#define wxThreadInfo wxTLS_VALUE(wxThreadInfoVar) - -#endif // wxUSE_THREADS +#define wxThreadInfo wxThreadSpecificInfo::Get() #endif // _WX_PRIVATE_THREADINFO_H_ diff --git a/Externals/wxWidgets3/include/wx/private/timer.h b/Externals/wxWidgets3/include/wx/private/timer.h index d345d3fcb3..5f4ce0d511 100644 --- a/Externals/wxWidgets3/include/wx/private/timer.h +++ b/Externals/wxWidgets3/include/wx/private/timer.h @@ -3,7 +3,6 @@ // Purpose: Base class for wxTimer implementations // Author: Lukasz Michalski // Created: 31.10.2006 -// RCS-ID: $Id: timer.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2006-2007 wxWidgets dev team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/window.h b/Externals/wxWidgets3/include/wx/private/window.h index ab4c5533f1..1192fb97b2 100644 --- a/Externals/wxWidgets3/include/wx/private/window.h +++ b/Externals/wxWidgets3/include/wx/private/window.h @@ -3,7 +3,6 @@ // Purpose: misc wxWindow helpers // Author: Vaclav Slavik // Created: 2010-01-21 -// RCS-ID: $Id: window.h 63251 2010-01-24 11:51:09Z VS $ // Copyright: (c) 2010 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/private/wxprintf.h b/Externals/wxWidgets3/include/wx/private/wxprintf.h index 0bb0098cb5..00013c193a 100644 --- a/Externals/wxWidgets3/include/wx/private/wxprintf.h +++ b/Externals/wxWidgets3/include/wx/private/wxprintf.h @@ -4,7 +4,6 @@ // Author: Ove Kaven // Modified by: Ron Lee, Francesco Montorsi // Created: 09/04/99 -// RCS-ID: $Id: wxprintf.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) wxWidgets copyright // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -22,11 +21,6 @@ #include -#if defined(__MWERKS__) && __MSL__ >= 0x6000 -namespace std {} -using namespace std ; -#endif - // prefer snprintf over sprintf #if defined(__VISUALC__) || \ (defined(__BORLANDC__) && __BORLANDC__ >= 0x540) diff --git a/Externals/wxWidgets3/include/wx/prntbase.h b/Externals/wxWidgets3/include/wx/prntbase.h index 8b71a0658f..a6f22fa098 100644 --- a/Externals/wxWidgets3/include/wx/prntbase.h +++ b/Externals/wxWidgets3/include/wx/prntbase.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: prntbase.h 68026 2011-06-22 22:58:07Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -40,6 +39,8 @@ class WXDLLIMPEXP_FWD_CORE wxPreviewFrame; class WXDLLIMPEXP_FWD_CORE wxPrintFactory; class WXDLLIMPEXP_FWD_CORE wxPrintNativeDataBase; class WXDLLIMPEXP_FWD_CORE wxPrintPreview; +class WXDLLIMPEXP_FWD_CORE wxPrintAbortDialog; +class WXDLLIMPEXP_FWD_CORE wxStaticText; class wxPrintPageMaxCtrl; class wxPrintPageTextCtrl; @@ -188,7 +189,7 @@ public: wxPrinterBase(wxPrintDialogData *data = NULL); virtual ~wxPrinterBase(); - virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); + virtual wxPrintAbortDialog *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); virtual void ReportError(wxWindow *parent, wxPrintout *printout, const wxString& message); virtual wxPrintDialogData& GetPrintDialogData() const; @@ -228,7 +229,7 @@ public: wxPrinter(wxPrintDialogData *data = NULL); virtual ~wxPrinter(); - virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); + virtual wxPrintAbortDialog *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); virtual void ReportError(wxWindow *parent, wxPrintout *printout, const wxString& message); virtual bool Setup(wxWindow *parent); @@ -259,7 +260,7 @@ private: class WXDLLIMPEXP_CORE wxPrintout: public wxObject { public: - wxPrintout(const wxString& title = _("Printout")); + wxPrintout(const wxString& title = wxGetTranslation("Printout")); virtual ~wxPrintout(); virtual bool OnBeginDocument(int startPage, int endPage); @@ -391,7 +392,7 @@ class WXDLLIMPEXP_CORE wxPreviewFrame: public wxFrame public: wxPreviewFrame(wxPrintPreviewBase *preview, wxWindow *parent, - const wxString& title = _("Print Preview"), + const wxString& title = wxGetTranslation("Print Preview"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE | wxFRAME_FLOAT_ON_PARENT, @@ -733,18 +734,20 @@ class WXDLLIMPEXP_CORE wxPrintAbortDialog: public wxDialog { public: wxPrintAbortDialog(wxWindow *parent, - const wxString& title, + const wxString& documentTitle, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxT("dialog")) - : wxDialog(parent, wxID_ANY, title, pos, size, style, name) - { - } + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = wxT("dialog")); + + void SetProgress(int currentPage, int totalPages, + int currentCopy, int totalCopies); void OnCancel(wxCommandEvent& event); private: + wxStaticText *m_progress; + DECLARE_EVENT_TABLE() wxDECLARE_NO_COPY_CLASS(wxPrintAbortDialog); }; diff --git a/Externals/wxWidgets3/include/wx/process.h b/Externals/wxWidgets3/include/wx/process.h index 39b5b637f1..4c0018e6a6 100644 --- a/Externals/wxWidgets3/include/wx/process.h +++ b/Externals/wxWidgets3/include/wx/process.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: Vadim Zeitlin to check error codes, added Detach() method // Created: 24/06/98 -// RCS-ID: $Id: process.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 1998 Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -104,6 +103,15 @@ public: wxInputStream *errStream); #endif // wxUSE_STREAMS + // priority + // Sets the priority to the given value: see wxPRIORITY_XXX constants. + // + // NB: the priority can only be set before the process is created + void SetPriority(unsigned priority); + + // Get the current priority. + unsigned GetPriority() const { return m_priority; } + // implementation only - don't use! // -------------------------------- @@ -116,6 +124,8 @@ protected: int m_id; long m_pid; + unsigned m_priority; + #if wxUSE_STREAMS // these streams are connected to stdout, stderr and stdin of the child // process respectively (yes, m_inputStream corresponds to stdout -- very diff --git a/Externals/wxWidgets3/include/wx/progdlg.h b/Externals/wxWidgets3/include/wx/progdlg.h index e6d4132765..e17d37ea3e 100644 --- a/Externals/wxWidgets3/include/wx/progdlg.h +++ b/Externals/wxWidgets3/include/wx/progdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: progdlg.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/propdlg.h b/Externals/wxWidgets3/include/wx/propdlg.h index 4bad68bb32..1f91c6fbc3 100644 --- a/Externals/wxWidgets3/include/wx/propdlg.h +++ b/Externals/wxWidgets3/include/wx/propdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: propdlg.h 33948 2005-05-04 18:57:50Z JS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/protocol/file.h b/Externals/wxWidgets3/include/wx/protocol/file.h index c77a1f7dc8..fd44ce593a 100644 --- a/Externals/wxWidgets3/include/wx/protocol/file.h +++ b/Externals/wxWidgets3/include/wx/protocol/file.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: // Created: 1997 -// RCS-ID: $Id: file.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1997, 1998 Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/protocol/ftp.h b/Externals/wxWidgets3/include/wx/protocol/ftp.h index bae8c78fdc..a87a638066 100644 --- a/Externals/wxWidgets3/include/wx/protocol/ftp.h +++ b/Externals/wxWidgets3/include/wx/protocol/ftp.h @@ -5,7 +5,6 @@ // Modified by: Mark Johnson, wxWindows@mj10777.de // 20000917 : RmDir, GetLastResult, GetList // Created: 07/07/1997 -// RCS-ID: $Id: ftp.h 67384 2011-04-03 20:31:32Z DS $ // Copyright: (c) 1997, 1998 Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/protocol/http.h b/Externals/wxWidgets3/include/wx/protocol/http.h index d3fff96500..cfa2e6f944 100644 --- a/Externals/wxWidgets3/include/wx/protocol/http.h +++ b/Externals/wxWidgets3/include/wx/protocol/http.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: Simo Virokannas (authentication, Dec 2005) // Created: August 1997 -// RCS-ID: $Id: http.h 70408 2012-01-20 12:22:25Z VZ $ // Copyright: (c) 1997, 1998 Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -36,6 +35,7 @@ public: wxString GetHeader(const wxString& header) const; int GetResponse() const { return m_http_response; } + void SetMethod(const wxString& method) { m_method = method; } void SetHeader(const wxString& header, const wxString& h_data); bool SetPostText(const wxString& contentType, const wxString& data, @@ -51,19 +51,12 @@ public: wxDEPRECATED(void SetPostBuffer(const wxString& post_buf)); protected: - enum wxHTTP_Req - { - wxHTTP_GET, - wxHTTP_POST, - wxHTTP_HEAD - }; - typedef wxStringToStringHashMap::iterator wxHeaderIterator; typedef wxStringToStringHashMap::const_iterator wxHeaderConstIterator; typedef wxStringToStringHashMap::iterator wxCookieIterator; typedef wxStringToStringHashMap::const_iterator wxCookieConstIterator; - bool BuildRequest(const wxString& path, wxHTTP_Req req); + bool BuildRequest(const wxString& path, const wxString& method); void SendHeaders(); bool ParseHeaders(); @@ -81,6 +74,7 @@ protected: // internal variables: + wxString m_method; wxStringToStringHashMap m_cookies; wxStringToStringHashMap m_headers; diff --git a/Externals/wxWidgets3/include/wx/protocol/log.h b/Externals/wxWidgets3/include/wx/protocol/log.h index 700c94029d..df373b928f 100644 --- a/Externals/wxWidgets3/include/wx/protocol/log.h +++ b/Externals/wxWidgets3/include/wx/protocol/log.h @@ -3,7 +3,6 @@ // Purpose: wxProtocolLog class for logging network exchanges // Author: Troelsk, Vadim Zeitlin // Created: 2009-03-06 -// RCS-ID: $Id: log.h 59404 2009-03-07 13:58:39Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/protocol/protocol.h b/Externals/wxWidgets3/include/wx/protocol/protocol.h index 6664f9e875..e6a32ef55c 100644 --- a/Externals/wxWidgets3/include/wx/protocol/protocol.h +++ b/Externals/wxWidgets3/include/wx/protocol/protocol.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: // Created: 10/07/1997 -// RCS-ID: $Id: protocol.h 64532 2010-06-09 13:55:48Z FM $ // Copyright: (c) 1997, 1998 Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/ptr_scpd.h b/Externals/wxWidgets3/include/wx/ptr_scpd.h index cdc325ee56..76d8e42146 100644 --- a/Externals/wxWidgets3/include/wx/ptr_scpd.h +++ b/Externals/wxWidgets3/include/wx/ptr_scpd.h @@ -3,7 +3,6 @@ // Purpose: compatibility wrapper for wxScoped{Ptr,Array} // Author: Vadim Zeitlin // Created: 2009-02-03 -// RCS-ID: $Id: ptr_scpd.h 58643 2009-02-04 08:06:42Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/ptr_shrd.h b/Externals/wxWidgets3/include/wx/ptr_shrd.h index 90cd0fa968..635cfe36e0 100644 --- a/Externals/wxWidgets3/include/wx/ptr_shrd.h +++ b/Externals/wxWidgets3/include/wx/ptr_shrd.h @@ -3,7 +3,6 @@ // Purpose: compatibility wrapper for wx/sharedptr.h // Author: Vadim Zeitlin // Created: 2009-02-03 -// RCS-ID: $Id: ptr_shrd.h 58643 2009-02-04 08:06:42Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/quantize.h b/Externals/wxWidgets3/include/wx/quantize.h index dcc62d65f4..d323a3504c 100644 --- a/Externals/wxWidgets3/include/wx/quantize.h +++ b/Externals/wxWidgets3/include/wx/quantize.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 22/6/2000 -// RCS-ID: $Id: quantize.h 52834 2008-03-26 15:06:00Z FM $ // Copyright: (c) Julian Smart // Licence: ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/radiobox.h b/Externals/wxWidgets3/include/wx/radiobox.h index 7b7960c215..acfa9e8f8a 100644 --- a/Externals/wxWidgets3/include/wx/radiobox.h +++ b/Externals/wxWidgets3/include/wx/radiobox.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 10.09.00 -// RCS-ID: $Id: radiobox.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/radiobut.h b/Externals/wxWidgets3/include/wx/radiobut.h index d69ec49579..427787341e 100644 --- a/Externals/wxWidgets3/include/wx/radiobut.h +++ b/Externals/wxWidgets3/include/wx/radiobut.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 07.09.00 -// RCS-ID: $Id: radiobut.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/range.h b/Externals/wxWidgets3/include/wx/range.h index 47e835cb8a..d59646e12a 100644 --- a/Externals/wxWidgets3/include/wx/range.h +++ b/Externals/wxWidgets3/include/wx/range.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2011-01-07 -// RCS-ID: $Id: range.h 66625 2011-01-07 17:42:39Z SC $ // Copyright: (c) 2011 Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/rawbmp.h b/Externals/wxWidgets3/include/wx/rawbmp.h index 2fca1857d4..adcf81f398 100644 --- a/Externals/wxWidgets3/include/wx/rawbmp.h +++ b/Externals/wxWidgets3/include/wx/rawbmp.h @@ -4,7 +4,6 @@ // Author: Eric Kidd, Vadim Zeitlin // Modified by: // Created: 10.03.03 -// RCS-ID: $Id: rawbmp.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) 2002 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/rearrangectrl.h b/Externals/wxWidgets3/include/wx/rearrangectrl.h index 0e74187b14..b54b04fa11 100644 --- a/Externals/wxWidgets3/include/wx/rearrangectrl.h +++ b/Externals/wxWidgets3/include/wx/rearrangectrl.h @@ -3,7 +3,6 @@ // Purpose: various controls for rearranging the items interactively // Author: Vadim Zeitlin // Created: 2008-12-15 -// RCS-ID: $Id: rearrangectrl.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/recguard.h b/Externals/wxWidgets3/include/wx/recguard.h index 88af6fb72f..d7775b995b 100644 --- a/Externals/wxWidgets3/include/wx/recguard.h +++ b/Externals/wxWidgets3/include/wx/recguard.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 14.08.2003 -// RCS-ID: $Id: recguard.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/regex.h b/Externals/wxWidgets3/include/wx/regex.h index 6150130874..0b1836e344 100644 --- a/Externals/wxWidgets3/include/wx/regex.h +++ b/Externals/wxWidgets3/include/wx/regex.h @@ -4,7 +4,6 @@ // Author: Karsten Ballueder // Modified by: VZ at 13.07.01 (integrated to wxWin) // Created: 05.02.2000 -// RCS-ID: $Id: regex.h 57777 2009-01-02 17:29:32Z PC $ // Copyright: (c) 2000 Karsten Ballueder // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/region.h b/Externals/wxWidgets3/include/wx/region.h index c032903f3d..64a8e05532 100644 --- a/Externals/wxWidgets3/include/wx/region.h +++ b/Externals/wxWidgets3/include/wx/region.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: region.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/renderer.h b/Externals/wxWidgets3/include/wx/renderer.h index 9722ddecf9..97152e32e3 100644 --- a/Externals/wxWidgets3/include/wx/renderer.h +++ b/Externals/wxWidgets3/include/wx/renderer.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 20.07.2003 -// RCS-ID: $Id: renderer.h 65947 2010-10-30 15:57:32Z VS $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/richmsgdlg.h b/Externals/wxWidgets3/include/wx/richmsgdlg.h index 6d1ac376fd..1fbc96428f 100644 --- a/Externals/wxWidgets3/include/wx/richmsgdlg.h +++ b/Externals/wxWidgets3/include/wx/richmsgdlg.h @@ -3,7 +3,6 @@ // Purpose: wxRichMessageDialogBase // Author: Rickard Westerlund // Created: 2010-07-03 -// RCS-ID: $Id: richmsgdlg.h 70165 2011-12-29 14:42:13Z SN $ // Copyright: (c) 2010 wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -27,8 +26,8 @@ public: const wxString& caption, long style ) : wxGenericMessageDialog( parent, message, caption, style ), - m_detailsExpanderCollapsedLabel( _("&See details") ), - m_detailsExpanderExpandedLabel( _("&Hide details") ), + m_detailsExpanderCollapsedLabel( wxGetTranslation("&See details") ), + m_detailsExpanderExpandedLabel( wxGetTranslation("&Hide details") ), m_checkBoxValue( false ) { } diff --git a/Externals/wxWidgets3/include/wx/richtooltip.h b/Externals/wxWidgets3/include/wx/richtooltip.h index 0005edb8b1..1187e67ed1 100644 --- a/Externals/wxWidgets3/include/wx/richtooltip.h +++ b/Externals/wxWidgets3/include/wx/richtooltip.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxRichToolTip class. // Author: Vadim Zeitlin // Created: 2011-10-07 -// RCS-ID: $Id: richtooltip.h 69480 2011-10-19 21:53:10Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -76,7 +75,8 @@ public: // elapses but this method can be used to change this or also disable // hiding the tooltip automatically entirely by passing 0 in this parameter // (but doing this can result in native version not being used). - void SetTimeout(unsigned milliseconds); + // Optionally specify a show delay. + void SetTimeout(unsigned milliseconds, unsigned millisecondsShowdelay = 0); // Choose the tip kind, possibly none. By default the tip is positioned // automatically, as if wxTipKind_Auto was used. @@ -86,8 +86,8 @@ public: // or colour appropriate for the current platform. void SetTitleFont(const wxFont& font); - // Show the tooltip for the given window. - void ShowFor(wxWindow* win); + // Show the tooltip for the given window and optionally a specified area. + void ShowFor(wxWindow* win, const wxRect* rect = NULL); // Non-virtual dtor as this class is not supposed to be derived from. ~wxRichToolTip(); diff --git a/Externals/wxWidgets3/include/wx/rtti.h b/Externals/wxWidgets3/include/wx/rtti.h index 43e3939c41..51017baa2f 100644 --- a/Externals/wxWidgets3/include/wx/rtti.h +++ b/Externals/wxWidgets3/include/wx/rtti.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Ron Lee // Created: 01/02/97 -// RCS-ID: $Id: rtti.h 67879 2011-06-07 13:06:17Z VZ $ // Copyright: (c) 1997 Julian Smart // (c) 2001 Ron Lee // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/sashwin.h b/Externals/wxWidgets3/include/wx/sashwin.h index c99a94b4ab..21967a5c7e 100644 --- a/Externals/wxWidgets3/include/wx/sashwin.h +++ b/Externals/wxWidgets3/include/wx/sashwin.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: sashwin.h 33948 2005-05-04 18:57:50Z JS $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/sckaddr.h b/Externals/wxWidgets3/include/wx/sckaddr.h index 2c10fac890..4ceefdf35c 100644 --- a/Externals/wxWidgets3/include/wx/sckaddr.h +++ b/Externals/wxWidgets3/include/wx/sckaddr.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: Vadim Zeitlin to switch to wxSockAddressImpl implementation // Created: 26/04/1997 -// RCS-ID: $Id: sckaddr.h 59099 2009-02-22 23:38:52Z VZ $ // Copyright: (c) 1997, 1998 Guilhem Lavaux // (c) 2008, 2009 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/sckipc.h b/Externals/wxWidgets3/include/wx/sckipc.h index cffa67c674..3801da8cf9 100644 --- a/Externals/wxWidgets3/include/wx/sckipc.h +++ b/Externals/wxWidgets3/include/wx/sckipc.h @@ -6,7 +6,6 @@ // Guillermo Rodriguez (updated for wxSocket v2) Jan 2000 // (callbacks deprecated) Mar 2000 // Created: 1993 -// RCS-ID: $Id: sckipc.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart 1993 // (c) Guilhem Lavaux 1997, 1998 // (c) 2000 Guillermo Rodriguez diff --git a/Externals/wxWidgets3/include/wx/sckstrm.h b/Externals/wxWidgets3/include/wx/sckstrm.h index 09e6ebb0be..31f32706e9 100644 --- a/Externals/wxWidgets3/include/wx/sckstrm.h +++ b/Externals/wxWidgets3/include/wx/sckstrm.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: // Created: 17/07/97 -// RCS-ID: $Id: sckstrm.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/scopedarray.h b/Externals/wxWidgets3/include/wx/scopedarray.h index 11cc04130a..e6246a235e 100644 --- a/Externals/wxWidgets3/include/wx/scopedarray.h +++ b/Externals/wxWidgets3/include/wx/scopedarray.h @@ -3,7 +3,6 @@ // Purpose: scoped smart pointer class // Author: Vadim Zeitlin // Created: 2009-02-03 -// RCS-ID: $Id: scopedarray.h 70109 2011-12-24 15:43:14Z VZ $ // Copyright: (c) Jesse Lovelace and original Boost authors (see below) // (c) 2009 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/scopedptr.h b/Externals/wxWidgets3/include/wx/scopedptr.h index 84285ae40c..5cc0c0770d 100644 --- a/Externals/wxWidgets3/include/wx/scopedptr.h +++ b/Externals/wxWidgets3/include/wx/scopedptr.h @@ -3,7 +3,6 @@ // Purpose: scoped smart pointer class // Author: Jesse Lovelace // Created: 06/01/02 -// RCS-ID: $Id: scopedptr.h 64222 2010-05-06 05:43:01Z VS $ // Copyright: (c) Jesse Lovelace and original Boost authors (see below) // (c) 2009 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/scopeguard.h b/Externals/wxWidgets3/include/wx/scopeguard.h index c0c354536a..83bc1b5180 100644 --- a/Externals/wxWidgets3/include/wx/scopeguard.h +++ b/Externals/wxWidgets3/include/wx/scopeguard.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 03.07.2003 -// RCS-ID: $Id: scopeguard.h 67592 2011-04-24 13:14:47Z VS $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/scrolbar.h b/Externals/wxWidgets3/include/wx/scrolbar.h index 648f09fe0e..21f2d75a8a 100644 --- a/Externals/wxWidgets3/include/wx/scrolbar.h +++ b/Externals/wxWidgets3/include/wx/scrolbar.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: scrolbar.h 67254 2011-03-20 00:14:35Z DS $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/scrolwin.h b/Externals/wxWidgets3/include/wx/scrolwin.h index 8989d3738f..370969929e 100644 --- a/Externals/wxWidgets3/include/wx/scrolwin.h +++ b/Externals/wxWidgets3/include/wx/scrolwin.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 30.08.00 -// RCS-ID: $Id: scrolwin.h 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) 2000 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -37,6 +36,10 @@ enum wxScrollbarVisibility // // So we have // +// wxAnyScrollHelperBase +// | +// | +// \|/ // wxScrollHelperBase // | // | @@ -56,7 +59,51 @@ enum wxScrollbarVisibility // // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxScrollHelperBase +// This class allows reusing some of wxScrollHelperBase functionality in +// wxVarScrollHelperBase in wx/vscroll.h without duplicating its code. +class WXDLLIMPEXP_CORE wxAnyScrollHelperBase +{ +public: + wxEXPLICIT wxAnyScrollHelperBase(wxWindow* win); + virtual ~wxAnyScrollHelperBase() {} + + // Disable use of keyboard keys for scrolling. By default cursor movement + // keys (including Home, End, Page Up and Down) are used to scroll the + // window appropriately. If the derived class uses these keys for something + // else, e.g. changing the currently selected item, this function can be + // used to disable this behaviour as it's not only not necessary then but + // can actually be actively harmful if another object forwards a keyboard + // event corresponding to one of the above keys to us using + // ProcessWindowEvent() because the event will always be processed which + // can be undesirable. + void DisableKeyboardScrolling() { m_kbdScrollingEnabled = false; } + + // Override this function to draw the graphic (or just process EVT_PAINT) + virtual void OnDraw(wxDC& WXUNUSED(dc)) { } + + // change the DC origin according to the scroll position. + virtual void DoPrepareDC(wxDC& dc) = 0; + + // Simple accessor for the window that is really being scrolled. + wxWindow *GetTargetWindow() const { return m_targetWindow; } + + + // The methods called from the window event handlers. + void HandleOnChar(wxKeyEvent& event); + void HandleOnPaint(wxPaintEvent& event); + +protected: + // the window that receives the scroll events and the window to actually + // scroll, respectively + wxWindow *m_win, + *m_targetWindow; + + // whether cursor keys should scroll the window + bool m_kbdScrollingEnabled; +}; + +// This is the class containing the guts of (uniform) scrolling logic. +class WXDLLIMPEXP_CORE wxScrollHelperBase : public wxAnyScrollHelperBase { public: // ctor must be given the associated window @@ -101,24 +148,20 @@ public: DoShowScrollbars(horz, vert); } + // Test whether the specified scrollbar is shown. + virtual bool IsScrollbarShown(int orient) const = 0; + // Enable/disable Windows scrolling in either direction. If true, wxWidgets // scrolls the canvas and only a bit of the canvas is invalidated; no // Clear() is necessary. If false, the whole canvas is invalidated and a // Clear() is necessary. Disable for when the scroll increment is used to // actually scroll a non-constant distance + // + // Notice that calling this method with a false argument doesn't disable + // scrolling the window in this direction, it just changes the mechanism by + // which it is implemented to not use wxWindow::ScrollWindow(). virtual void EnableScrolling(bool x_scrolling, bool y_scrolling); - // Disable use of keyboard keys for scrolling. By default cursor movement - // keys (including Home, End, Page Up and Down) are used to scroll the - // window appropriately. If the derived class uses these keys for something - // else, e.g. changing the currently selected item, this function can be - // used to disable this behaviour as it's not only not necessary then but - // can actually be actively harmful if another object forwards a keyboard - // event corresponding to one of the above keys to us using - // ProcessWindowEvent() because the event will always be processed which - // can be undesirable. - void DisableKeyboardScrolling() { m_kbdScrollingEnabled = false; } - // Get the view start void GetViewStart(int *x, int *y) const { DoGetViewStart(x, y); } @@ -167,15 +210,10 @@ public: // child of it in order to scroll only a portion the area between the // scrollbars (spreadsheet: only cell area will move). void SetTargetWindow(wxWindow *target); - wxWindow *GetTargetWindow() const; void SetTargetRect(const wxRect& rect) { m_rectToScroll = rect; } wxRect GetTargetRect() const { return m_rectToScroll; } - // Override this function to draw the graphic (or just process EVT_PAINT) - virtual void OnDraw(wxDC& WXUNUSED(dc)) { } - - // change the DC origin according to the scroll position. virtual void DoPrepareDC(wxDC& dc); // are we generating the autoscroll events? @@ -195,8 +233,6 @@ public: // the methods to be called from the window event handlers void HandleOnScroll(wxScrollWinEvent& event); void HandleOnSize(wxSizeEvent& event); - void HandleOnPaint(wxPaintEvent& event); - void HandleOnChar(wxKeyEvent& event); void HandleOnMouseEnter(wxMouseEvent& event); void HandleOnMouseLeave(wxMouseEvent& event); #if wxUSE_MOUSEWHEEL @@ -252,10 +288,6 @@ protected: // delete the event handler we installed void DeleteEvtHandler(); - // calls wxScrollHelperEvtHandler::ResetDrawnFlag(), see explanation - // in wxScrollHelperEvtHandler::ProcessEvent() - void ResetDrawnFlag(); - // this function should be overridden to return the size available for // m_targetWindow inside m_win of the given size // @@ -276,13 +308,14 @@ protected: double m_scaleX; double m_scaleY; - wxWindow *m_win, - *m_targetWindow; - wxRect m_rectToScroll; wxTimer *m_timerAutoScroll; + // The number of pixels to scroll in horizontal and vertical directions + // respectively. + // + // If 0, means that the scrolling in the given direction is disabled. int m_xScrollPixelsPerLine; int m_yScrollPixelsPerLine; int m_xScrollPosition; @@ -295,8 +328,6 @@ protected: bool m_xScrollingEnabled; bool m_yScrollingEnabled; - bool m_kbdScrollingEnabled; - #if wxUSE_MOUSEWHEEL int m_wheelRotation; #endif // wxUSE_MOUSEWHEEL @@ -312,6 +343,8 @@ protected: public: \ virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); } \ virtual bool Layout() { return ScrollLayout(); } \ + virtual bool CanScroll(int orient) const \ + { return IsScrollbarShown(orient); } \ virtual void DoSetVirtualSize(int x, int y) \ { ScrollDoSetVirtualSize(x, y); } \ virtual wxSize GetBestVirtualSize() const \ @@ -376,24 +409,38 @@ public: this->MacSetClipChildren(true); #endif - this->Connect(wxEVT_PAINT, wxPaintEventHandler(wxScrolled::OnPaint)); - // by default, we're scrollable in both directions (but if one of the // styles is specified explicitly, we shouldn't add the other one // automatically) if ( !(style & (wxHSCROLL | wxVSCROLL)) ) style |= wxHSCROLL | wxVSCROLL; +#ifdef __WXOSX__ + bool retval = T::Create(parent, winid, pos, size, style, name); + if ( retval && (style & wxALWAYS_SHOW_SB) ) + ShowScrollbars(wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS); + return retval; +#else + if ( style & wxALWAYS_SHOW_SB ) + ShowScrollbars(wxSHOW_SB_ALWAYS, wxSHOW_SB_ALWAYS); + return T::Create(parent, winid, pos, size, style, name); +#endif } +#ifdef __WXMSW__ // we need to return a special WM_GETDLGCODE value to process just the // arrows but let the other navigation characters through -#ifdef __WXMSW__ virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) { return FilterMSWWindowProc(nMsg, T::MSWWindowProc(nMsg, wParam, lParam)); } + + // Take into account the scroll origin. + virtual void MSWAdjustBrushOrg(int* xOrg, int* yOrg) const + { + CalcUnscrolledPosition(*xOrg, *yOrg, xOrg, yOrg); + } #endif // __WXMSW__ WX_FORWARD_TO_SCROLL_HELPER() @@ -405,16 +452,6 @@ protected: } private: - // this is needed for wxEVT_PAINT processing hack described in - // wxScrollHelperEvtHandler::ProcessEvent() - void OnPaint(wxPaintEvent& event) - { - // the user code didn't really draw the window if we got here, so set - // this flag to try to call OnDraw() later - ResetDrawnFlag(); - event.Skip(); - } - // VC++ 6 gives warning for the declaration of template member function // without definition #ifndef __VISUALC6__ diff --git a/Externals/wxWidgets3/include/wx/selstore.h b/Externals/wxWidgets3/include/wx/selstore.h index 0c6aaa1a21..4361a11a9c 100644 --- a/Externals/wxWidgets3/include/wx/selstore.h +++ b/Externals/wxWidgets3/include/wx/selstore.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 08.06.03 (extracted from src/generic/listctrl.cpp) -// RCS-ID: $Id: selstore.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) 2000-2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/settings.h b/Externals/wxWidgets3/include/wx/settings.h index 7f4fd837f1..f90ae071ba 100644 --- a/Externals/wxWidgets3/include/wx/settings.h +++ b/Externals/wxWidgets3/include/wx/settings.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: settings.h 67018 2011-02-25 09:38:35Z JS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/setup_inc.h b/Externals/wxWidgets3/include/wx/setup_inc.h index 32b19dfbb8..7e1ec6f4b6 100644 --- a/Externals/wxWidgets3/include/wx/setup_inc.h +++ b/Externals/wxWidgets3/include/wx/setup_inc.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: -// RCS-ID: $Id: setup_inc.h 69463 2011-10-18 21:57:02Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -147,7 +146,7 @@ // In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If // this causes problems (e.g. link errors), set this to 0. You may need to set // this to 0 if using templates (at least for VC++). This switch is currently -// ignored for mingw / cygwin / CodeWarrior +// ignored for MinGW/Cygwin. // // Default is 0 // @@ -263,6 +262,17 @@ // Recommended setting: 1 if you want to support multiple languages #define wxUSE_PRINTF_POS_PARAMS 1 +// Enable the use of compiler-specific thread local storage keyword, if any. +// This is used for wxTLS_XXX() macros implementation and normally should use +// the compiler-provided support as it's simpler and more efficient, but must +// not use it if wxWidgets is used in a dynamically loaded Win32 (i.e. using +// LoadLibrary()/GetProcAddress()) as this triggers a bug in compiler TLS +// support that results in crashes when any TLS variables are used. So if you +// are building a Win32 DLL using wxWidgets that can be loaded dynamically, set +// this to 0. +// +// Default is 1, but set to 0 if the scenario above is applicable. +#define wxUSE_COMPILER_TLS 1 // ---------------------------------------------------------------------------- // Interoperability with the standard library. @@ -1083,6 +1093,16 @@ // Recommended setting: 1 #define wxUSE_NOTIFICATION_MESSAGE 1 +// wxPreferencesEditor provides a common API for different ways of presenting +// the standard "Preferences" or "Properties" dialog under different platforms +// (e.g. some use modal dialogs, some use modeless ones; some apply the changes +// immediately while others require an explicit "Apply" button). +// +// Default is 1. +// +// Recommended setting: 1 (but can be safely disabled if you don't use it) +#define wxUSE_PREFERENCES_EDITOR 1 + // wxRichToolTip is a customizable tooltip class which has more functionality // than the stock (but native, unlike this class) wxToolTip. // diff --git a/Externals/wxWidgets3/include/wx/setup_redirect.h b/Externals/wxWidgets3/include/wx/setup_redirect.h index 87a9c3d85a..7648c198ba 100644 --- a/Externals/wxWidgets3/include/wx/setup_redirect.h +++ b/Externals/wxWidgets3/include/wx/setup_redirect.h @@ -6,7 +6,6 @@ * whereby a setup.h is created under the lib directory. * * Copyright: (c) Vadim Zeitlin - * RCS-ID: $Id: setup_redirect.h 33948 2005-05-04 18:57:50Z JS $ * Licence: wxWindows Licence */ diff --git a/Externals/wxWidgets3/include/wx/sharedptr.h b/Externals/wxWidgets3/include/wx/sharedptr.h index 3c354f8f88..a9b6442c09 100644 --- a/Externals/wxWidgets3/include/wx/sharedptr.h +++ b/Externals/wxWidgets3/include/wx/sharedptr.h @@ -3,7 +3,6 @@ // Purpose: Shared pointer based on the counted_ptr<> template, which // is in the public domain // Author: Robert Roebling, Yonat Sharon -// RCS-ID: $Id: sharedptr.h 67232 2011-03-18 15:10:15Z DS $ // Copyright: Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -31,6 +30,14 @@ public: m_ref = new reftype(ptr); } + template + wxEXPLICIT wxSharedPtr(T* ptr, Deleter d) + : m_ref(NULL) + { + if (ptr) + m_ref = new reftype_with_deleter(ptr, d); + } + ~wxSharedPtr() { Release(); } wxSharedPtr(const wxSharedPtr& tocopy) { Acquire(tocopy.m_ref); } @@ -92,6 +99,14 @@ public: m_ref = new reftype(ptr); } + template + void reset(T* ptr, Deleter d) + { + Release(); + if (ptr) + m_ref = new reftype_with_deleter(ptr, d); + } + bool unique() const { return (m_ref ? m_ref->m_count == 1 : true); } long use_count() const { return (m_ref ? (long)m_ref->m_count : 0); } @@ -99,10 +114,24 @@ private: struct reftype { - reftype( T* ptr = NULL, unsigned count = 1 ) : m_ptr(ptr), m_count(count) {} + reftype(T* ptr) : m_ptr(ptr), m_count(1) {} + virtual ~reftype() {} + virtual void delete_ptr() { delete m_ptr; } + T* m_ptr; wxAtomicInt m_count; - }* m_ref; + }; + + template + struct reftype_with_deleter : public reftype + { + reftype_with_deleter(T* ptr, Deleter d) : reftype(ptr), m_deleter(d) {} + virtual void delete_ptr() { m_deleter(this->m_ptr); } + + Deleter m_deleter; + }; + + reftype* m_ref; void Acquire(reftype* ref) { @@ -115,10 +144,9 @@ private: { if (m_ref) { - wxAtomicDec( m_ref->m_count ); - if (m_ref->m_count == 0) + if (!wxAtomicDec( m_ref->m_count )) { - delete m_ref->m_ptr; + m_ref->delete_ptr(); delete m_ref; } m_ref = NULL; diff --git a/Externals/wxWidgets3/include/wx/simplebook.h b/Externals/wxWidgets3/include/wx/simplebook.h new file mode 100644 index 0000000000..d54ebc45b6 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/simplebook.h @@ -0,0 +1,212 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/simplebook.h +// Purpose: wxBookCtrlBase-derived class without any controller. +// Author: Vadim Zeitlin +// Created: 2012-08-21 +// Copyright: (c) 2012 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_SIMPLEBOOK_H_ +#define _WX_SIMPLEBOOK_H_ + +#include "wx/bookctrl.h" + +#if wxUSE_BOOKCTRL + +#include "wx/vector.h" + +// ---------------------------------------------------------------------------- +// wxSimplebook: a book control without any user-actionable controller. +// ---------------------------------------------------------------------------- + +// NB: This class doesn't use DLL export declaration as it's fully inline. + +class wxSimplebook : public wxBookCtrlBase +{ +public: + wxSimplebook() + { + Init(); + } + + wxSimplebook(wxWindow *parent, + wxWindowID winid = wxID_ANY, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxEmptyString) + : wxBookCtrlBase(parent, winid, pos, size, style | wxBK_TOP, name) + { + Init(); + } + + + // Methods specific to this class. + + // A method allowing to add a new page without any label (which is unused + // by this control) and show it immediately. + bool ShowNewPage(wxWindow* page) + { + return AddPage(page, wxString(), true /* select it */); + } + + + // Set effect to use for showing/hiding pages. + void SetEffects(wxShowEffect showEffect, wxShowEffect hideEffect) + { + m_showEffect = showEffect; + m_hideEffect = hideEffect; + } + + // Or the same effect for both of them. + void SetEffect(wxShowEffect effect) + { + SetEffects(effect, effect); + } + + // And the same for time outs. + void SetEffectsTimeouts(unsigned showTimeout, unsigned hideTimeout) + { + m_showTimeout = showTimeout; + m_hideTimeout = hideTimeout; + } + + void SetEffectTimeout(unsigned timeout) + { + SetEffectsTimeouts(timeout, timeout); + } + + + // Implement base class pure virtual methods. + + // Page management + virtual bool InsertPage(size_t n, + wxWindow *page, + const wxString& text, + bool bSelect = false, + int imageId = NO_IMAGE) + { + if ( !wxBookCtrlBase::InsertPage(n, page, text, bSelect, imageId) ) + return false; + + m_pageTexts.insert(m_pageTexts.begin() + n, text); + + if ( !DoSetSelectionAfterInsertion(n, bSelect) ) + page->Hide(); + + return true; + } + + virtual int SetSelection(size_t n) + { + return DoSetSelection(n, SetSelection_SendEvent); + } + + virtual int ChangeSelection(size_t n) + { + return DoSetSelection(n); + } + + // Neither labels nor images are supported but we still store the labels + // just in case the user code attaches some importance to them. + virtual bool SetPageText(size_t n, const wxString& strText) + { + wxCHECK_MSG( n < GetPageCount(), false, wxS("Invalid page") ); + + m_pageTexts[n] = strText; + + return true; + } + + virtual wxString GetPageText(size_t n) const + { + wxCHECK_MSG( n < GetPageCount(), wxString(), wxS("Invalid page") ); + + return m_pageTexts[n]; + } + + virtual bool SetPageImage(size_t WXUNUSED(n), int WXUNUSED(imageId)) + { + return false; + } + + virtual int GetPageImage(size_t WXUNUSED(n)) const + { + return NO_IMAGE; + } + +protected: + virtual void UpdateSelectedPage(size_t newsel) + { + m_selection = newsel; + } + + virtual wxBookCtrlEvent* CreatePageChangingEvent() const + { + return new wxBookCtrlEvent(wxEVT_BOOKCTRL_PAGE_CHANGING, + GetId()); + } + + virtual void MakeChangedEvent(wxBookCtrlEvent& event) + { + event.SetEventType(wxEVT_BOOKCTRL_PAGE_CHANGED); + } + + virtual wxWindow *DoRemovePage(size_t page) + { + wxWindow* const win = wxBookCtrlBase::DoRemovePage(page); + if ( win ) + { + m_pageTexts.erase(m_pageTexts.begin() + page); + + DoSetSelectionAfterRemoval(page); + } + + return win; + } + + virtual void DoSize() + { + wxWindow* const page = GetCurrentPage(); + if ( page ) + page->SetSize(GetPageRect()); + } + + virtual void DoShowPage(wxWindow* page, bool show) + { + if ( show ) + page->ShowWithEffect(m_showEffect, m_showTimeout); + else + page->HideWithEffect(m_hideEffect, m_hideTimeout); + } + +private: + void Init() + { + // We don't need any border as we don't have anything to separate the + // page contents from. + SetInternalBorder(0); + + // No effects by default. + m_showEffect = + m_hideEffect = wxSHOW_EFFECT_NONE; + + m_showTimeout = + m_hideTimeout = 0; + } + + wxVector m_pageTexts; + + wxShowEffect m_showEffect, + m_hideEffect; + + unsigned m_showTimeout, + m_hideTimeout; + + wxDECLARE_NO_COPY_CLASS(wxSimplebook); +}; + +#endif // wxUSE_BOOKCTRL + +#endif // _WX_SIMPLEBOOK_H_ diff --git a/Externals/wxWidgets3/include/wx/sizer.h b/Externals/wxWidgets3/include/wx/sizer.h index 249f2d8389..7d20b548c8 100644 --- a/Externals/wxWidgets3/include/wx/sizer.h +++ b/Externals/wxWidgets3/include/wx/sizer.h @@ -4,7 +4,6 @@ // Author: Robert Roebling and Robin Dunn // Modified by: Ron Lee, Vadim Zeitlin (wxSizerFlags) // Created: -// RCS-ID: $Id: sizer.h 69970 2011-12-10 04:34:06Z RD $ // Copyright: (c) Robin Dunn, Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -125,6 +124,10 @@ public: wxSizerFlags& Border(int direction, int borderInPixels) { + wxCHECK_MSG( !(direction & ~wxALL), *this, + wxS("direction must be a combination of wxDirection ") + wxS("enum values.") ); + m_flags &= ~wxALL; m_flags |= direction; @@ -311,6 +314,10 @@ public: { return m_minSize; } wxSize GetMinSizeWithBorder() const; + wxSize GetMaxSize() const + { return IsWindow() ? m_window->GetMaxSize() : wxDefaultSize; } + wxSize GetMaxSizeWithBorder() const; + void SetMinSize(const wxSize& size) { if ( IsWindow() ) @@ -436,6 +443,10 @@ protected: void DoSetSizer(wxSizer *sizer); void DoSetSpacer(const wxSize& size); + // Add the border specified for this item to the given size + // if it's != wxDefaultSize, just return wxDefaultSize otherwise. + wxSize AddBorderToSize(const wxSize& size) const; + // discriminated union: depending on m_kind one of the fields is valid enum { @@ -601,7 +612,7 @@ public: virtual void DeleteWindows(); // Inform sizer about the first direction that has been decided (by parent item) - // Returns true if it made use of the informtion (and recalculated min size) + // Returns true if it made use of the information (and recalculated min size) virtual bool InformFirstDirection( int WXUNUSED(direction), int WXUNUSED(size), int WXUNUSED(availableOtherDir) ) { return false; } @@ -703,6 +714,10 @@ public: void Show(bool show) { ShowItems(show); } + // This is the ShowItems() counterpart and returns true if any of the sizer + // items are shown. + virtual bool AreAnyItemsShown() const; + protected: wxSize m_size; wxSize m_minSize; @@ -798,7 +813,7 @@ protected: "Can't calculate number of cols if number of rows is not specified" ); - return (m_children.GetCount() + m_rows - 1) / m_rows; + return int(m_children.GetCount() + m_rows - 1) / m_rows; } int CalcRows() const @@ -809,7 +824,7 @@ protected: "Can't calculate number of cols if number of rows is not specified" ); - return (m_children.GetCount() + m_cols - 1) / m_cols; + return int(m_children.GetCount() + m_cols - 1) / m_cols; } private: @@ -1021,6 +1036,7 @@ public: // override to hide/show the static box as well virtual void ShowItems (bool show); + virtual bool AreAnyItemsShown() const; virtual bool Detach( wxWindow *window ); virtual bool Detach( wxSizer *sizer ) { return wxBoxSizer::Detach(sizer); } diff --git a/Externals/wxWidgets3/include/wx/slider.h b/Externals/wxWidgets3/include/wx/slider.h index e6d9f5e6ea..e3ab597b0c 100644 --- a/Externals/wxWidgets3/include/wx/slider.h +++ b/Externals/wxWidgets3/include/wx/slider.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 09.02.01 -// RCS-ID: $Id: slider.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) 1996-2001 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/snglinst.h b/Externals/wxWidgets3/include/wx/snglinst.h index 930209d4e5..61213a86cf 100644 --- a/Externals/wxWidgets3/include/wx/snglinst.h +++ b/Externals/wxWidgets3/include/wx/snglinst.h @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 08.06.01 -// RCS-ID: $Id: snglinst.h 61945 2009-09-16 12:38:00Z VZ $ // Copyright: (c) 2001 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/socket.h b/Externals/wxWidgets3/include/wx/socket.h index 4b69eb2440..35ff266216 100644 --- a/Externals/wxWidgets3/include/wx/socket.h +++ b/Externals/wxWidgets3/include/wx/socket.h @@ -4,7 +4,6 @@ // Authors: Guilhem Lavaux, Guillermo Rodriguez Garcia // Modified by: // Created: April 1997 -// RCS-ID: $Id: socket.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -30,6 +29,16 @@ class wxSocketImpl; // Types and constants // ------------------------------------------------------------------------ +// Define the type of native sockets. +#if defined(__WINDOWS__) + // Although socket descriptors are still 32 bit values, even under Win64, + // the socket type is 64 bit there. + typedef wxUIntPtr wxSOCKET_T; +#else + typedef int wxSOCKET_T; +#endif + + // Types of different socket notifications or events. // // NB: the values here should be consecutive and start with 0 as they are @@ -71,13 +80,17 @@ enum wxSocketError // socket options/flags bit masks enum { - wxSOCKET_NONE = 0, - wxSOCKET_NOWAIT = 1, - wxSOCKET_WAITALL = 2, - wxSOCKET_BLOCK = 4, - wxSOCKET_REUSEADDR = 8, - wxSOCKET_BROADCAST = 16, - wxSOCKET_NOBIND = 32 + wxSOCKET_NONE = 0x0000, + wxSOCKET_NOWAIT_READ = 0x0001, + wxSOCKET_NOWAIT_WRITE = 0x0002, + wxSOCKET_NOWAIT = wxSOCKET_NOWAIT_READ | wxSOCKET_NOWAIT_WRITE, + wxSOCKET_WAITALL_READ = 0x0004, + wxSOCKET_WAITALL_WRITE = 0x0008, + wxSOCKET_WAITALL = wxSOCKET_WAITALL_READ | wxSOCKET_WAITALL_WRITE, + wxSOCKET_BLOCK = 0x0010, + wxSOCKET_REUSEADDR = 0x0020, + wxSOCKET_BROADCAST = 0x0040, + wxSOCKET_NOBIND = 0x0080 }; typedef int wxSocketFlags; @@ -123,6 +136,8 @@ public: bool IsData() { return WaitForRead(0, 0); } bool IsDisconnected() const { return !IsConnected(); } wxUint32 LastCount() const { return m_lcount; } + wxUint32 LastReadCount() const { return m_lcount_read; } + wxUint32 LastWriteCount() const { return m_lcount_write; } wxSocketError LastError() const; void SaveState(); void RestoreState(); @@ -171,6 +186,8 @@ public: bool GetOption(int level, int optname, void *optval, int *optlen); bool SetOption(int level, int optname, const void *optval, int optlen); wxUint32 GetLastIOSize() const { return m_lcount; } + wxUint32 GetLastIOReadSize() const { return m_lcount_read; } + wxUint32 GetLastIOWriteSize() const { return m_lcount_write; } // event handling void *GetClientData() const { return m_clientData; } @@ -179,6 +196,9 @@ public: void SetNotify(wxSocketEventFlags flags); void Notify(bool notify); + // Get the underlying socket descriptor. + wxSOCKET_T GetSocket() const; + // initialize/shutdown the sockets (done automatically so there is no need // to call these functions usually) // @@ -254,6 +274,8 @@ private: bool m_writing; // busy writing? bool m_closed; // was the other end closed? wxUint32 m_lcount; // last IO transaction size + wxUint32 m_lcount_read; // last IO transaction size of Read() direction. + wxUint32 m_lcount_write; // last IO transaction size of Write() direction. unsigned long m_timeout; // IO timeout value in seconds // (TODO: remove, wxSocketImpl has it too) wxList m_states; // stack of states (TODO: remove!) diff --git a/Externals/wxWidgets3/include/wx/sound.h b/Externals/wxWidgets3/include/wx/sound.h index 863b1d3298..b81a11cb46 100644 --- a/Externals/wxWidgets3/include/wx/sound.h +++ b/Externals/wxWidgets3/include/wx/sound.h @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 2004/02/01 -// RCS-ID: $Id: sound.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2004, Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/spinbutt.h b/Externals/wxWidgets3/include/wx/spinbutt.h index ad0b12c8a2..cb11e29833 100644 --- a/Externals/wxWidgets3/include/wx/spinbutt.h +++ b/Externals/wxWidgets3/include/wx/spinbutt.h @@ -4,7 +4,6 @@ // Author: Julian Smart, Vadim Zeitlin // Modified by: // Created: 23.07.99 -// RCS-ID: $Id: spinbutt.h 66625 2011-01-07 17:42:39Z SC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/spinctrl.h b/Externals/wxWidgets3/include/wx/spinctrl.h index 19fce4df50..7a7b3a4bd9 100644 --- a/Externals/wxWidgets3/include/wx/spinctrl.h +++ b/Externals/wxWidgets3/include/wx/spinctrl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 22.07.99 -// RCS-ID: $Id: spinctrl.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -21,8 +20,8 @@ // Events class WXDLLIMPEXP_FWD_CORE wxSpinDoubleEvent; -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, wxSpinDoubleEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SPINCTRL, wxSpinEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SPINCTRLDOUBLE, wxSpinDoubleEvent); // ---------------------------------------------------------------------------- // A spin ctrl is a text control with a spin button which is usually used to @@ -51,6 +50,10 @@ public: virtual void SetSnapToTicks(bool snap_to_ticks) = 0; // void SetDigits(unsigned digits) - wxSpinCtrlDouble only + // The base for numbers display, e.g. 10 or 16. + virtual int GetBase() const = 0; + virtual bool SetBase(int base) = 0; + // Select text in the textctrl virtual void SetSelection(long from, long to) = 0; @@ -100,10 +103,10 @@ typedef void (wxEvtHandler::*wxSpinDoubleEventFunction)(wxSpinDoubleEvent&); // macros for handling spinctrl events #define EVT_SPINCTRL(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_SPINCTRL_UPDATED, id, wxSpinEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_SPINCTRL, id, wxSpinEventHandler(fn)) #define EVT_SPINCTRLDOUBLE(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, id, wxSpinDoubleEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_SPINCTRLDOUBLE, id, wxSpinDoubleEventHandler(fn)) // ---------------------------------------------------------------------------- // include the platform-dependent class implementation @@ -113,9 +116,7 @@ typedef void (wxEvtHandler::*wxSpinDoubleEventFunction)(wxSpinDoubleEvent&); // wxSpinCtrlDouble implementations or neither, define the appropriate symbols // and include the generic version if necessary to provide the missing class(es) -#if defined(__WXUNIVERSAL__) || \ - defined(__WXMOTIF__) || \ - defined(__WXCOCOA__) +#if defined(__WXUNIVERSAL__) // nothing, use generic controls #elif defined(__WXMSW__) #define wxHAS_NATIVE_SPINCTRL @@ -130,15 +131,25 @@ typedef void (wxEvtHandler::*wxSpinDoubleEventFunction)(wxSpinDoubleEvent&); #elif defined(__WXGTK__) #define wxHAS_NATIVE_SPINCTRL #include "wx/gtk1/spinctrl.h" -#elif defined(__WXMAC__) - #define wxHAS_NATIVE_SPINCTRL - #include "wx/osx/spinctrl.h" #endif // platform #if !defined(wxHAS_NATIVE_SPINCTRL) || !defined(wxHAS_NATIVE_SPINCTRLDOUBLE) #include "wx/generic/spinctlg.h" #endif +namespace wxPrivate +{ + +// This is an internal helper function currently used by all ports: return the +// string containing hexadecimal representation of the given number. +extern wxString wxSpinCtrlFormatAsHex(long val, long maxVal); + +} // namespace wxPrivate + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_SPINCTRL_UPDATED wxEVT_SPINCTRL +#define wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED wxEVT_SPINCTRLDOUBLE + #endif // wxUSE_SPINCTRL #endif // _WX_SPINCTRL_H_ diff --git a/Externals/wxWidgets3/include/wx/splash.h b/Externals/wxWidgets3/include/wx/splash.h index acd87fc136..e4fb0c21ee 100644 --- a/Externals/wxWidgets3/include/wx/splash.h +++ b/Externals/wxWidgets3/include/wx/splash.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: splash.h 33948 2005-05-04 18:57:50Z JS $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/splitter.h b/Externals/wxWidgets3/include/wx/splitter.h index 27b1fa41a3..f36d2923df 100644 --- a/Externals/wxWidgets3/include/wx/splitter.h +++ b/Externals/wxWidgets3/include/wx/splitter.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: splitter.h 58718 2009-02-07 18:59:25Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -37,10 +36,10 @@ class WXDLLIMPEXP_FWD_CORE wxSplitterEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, wxSplitterEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, wxSplitterEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, wxSplitterEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_SPLITTER_UNSPLIT, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_SASH_POS_CHANGED, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_SASH_POS_CHANGING, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_DOUBLECLICKED, wxSplitterEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_SPLITTER_UNSPLIT, wxSplitterEvent ); #include "wx/generic/splitter.h" diff --git a/Externals/wxWidgets3/include/wx/srchctrl.h b/Externals/wxWidgets3/include/wx/srchctrl.h index bae24ec5d1..3ca462258c 100644 --- a/Externals/wxWidgets3/include/wx/srchctrl.h +++ b/Externals/wxWidgets3/include/wx/srchctrl.h @@ -3,7 +3,6 @@ // Purpose: wxSearchCtrlBase class // Author: Vince Harron // Created: 2006-02-18 -// RCS-ID: $Id: srchctrl.h 68911 2011-08-27 12:13:23Z VZ $ // Copyright: (c) Vince Harron // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -42,8 +41,8 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxSearchCtrlNameStr[]; -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SEARCHCTRL_CANCEL_BTN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SEARCHCTRL_SEARCH_BTN, wxCommandEvent); // ---------------------------------------------------------------------------- // a search ctrl is a text control with a search button and a cancel button @@ -89,10 +88,14 @@ private: // ---------------------------------------------------------------------------- #define EVT_SEARCHCTRL_CANCEL_BTN(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, id, wxCommandEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_SEARCHCTRL_CANCEL_BTN, id, wxCommandEventHandler(fn)) #define EVT_SEARCHCTRL_SEARCH_BTN(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, id, wxCommandEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_SEARCHCTRL_SEARCH_BTN, id, wxCommandEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN wxEVT_SEARCHCTRL_CANCEL_BTN +#define wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN wxEVT_SEARCHCTRL_SEARCH_BTN #endif // wxUSE_SEARCHCTRL diff --git a/Externals/wxWidgets3/include/wx/sstream.h b/Externals/wxWidgets3/include/wx/sstream.h index 405af50f4e..b0b2290fbc 100644 --- a/Externals/wxWidgets3/include/wx/sstream.h +++ b/Externals/wxWidgets3/include/wx/sstream.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2004-09-19 -// RCS-ID: $Id: sstream.h 67968 2011-06-16 16:22:15Z VZ $ // Copyright: (c) 2004 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/stackwalk.h b/Externals/wxWidgets3/include/wx/stackwalk.h index 22cf370868..1133d6ef7c 100644 --- a/Externals/wxWidgets3/include/wx/stackwalk.h +++ b/Externals/wxWidgets3/include/wx/stackwalk.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-07 -// RCS-ID: $Id: stackwalk.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2004 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/statbmp.h b/Externals/wxWidgets3/include/wx/statbmp.h index d42ea8d804..e86f45b59c 100644 --- a/Externals/wxWidgets3/include/wx/statbmp.h +++ b/Externals/wxWidgets3/include/wx/statbmp.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 25.08.00 -// RCS-ID: $Id: statbmp.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 2000 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/statbox.h b/Externals/wxWidgets3/include/wx/statbox.h index c49a70ef31..d01f257969 100644 --- a/Externals/wxWidgets3/include/wx/statbox.h +++ b/Externals/wxWidgets3/include/wx/statbox.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: statbox.h 67280 2011-03-22 14:17:38Z DS $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,6 +16,7 @@ #if wxUSE_STATBOX #include "wx/control.h" +#include "wx/containr.h" extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[]; @@ -24,13 +24,12 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxStaticBoxNameStr[]; // wxStaticBox: a grouping box with a label // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxControl +class WXDLLIMPEXP_CORE wxStaticBoxBase : public wxNavigationEnabled { public: - wxStaticBoxBase() { } + wxStaticBoxBase(); // overridden base class virtuals - virtual bool AcceptsFocus() const { return false; } virtual bool HasTransparentBackground() { return true; } // implementation only: this is used by wxStaticBoxSizer to account for the diff --git a/Externals/wxWidgets3/include/wx/statline.h b/Externals/wxWidgets3/include/wx/statline.h index 148b96af48..4f9e0f1561 100644 --- a/Externals/wxWidgets3/include/wx/statline.h +++ b/Externals/wxWidgets3/include/wx/statline.h @@ -3,7 +3,6 @@ // Purpose: wxStaticLine class interface // Author: Vadim Zeitlin // Created: 28.06.99 -// Version: $Id: statline.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/stattext.h b/Externals/wxWidgets3/include/wx/stattext.h index a3165cc877..fa29077526 100644 --- a/Externals/wxWidgets3/include/wx/stattext.h +++ b/Externals/wxWidgets3/include/wx/stattext.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: stattext.h 70345 2012-01-15 01:05:28Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/statusbr.h b/Externals/wxWidgets3/include/wx/statusbr.h index f76eb72864..17e033ffc3 100644 --- a/Externals/wxWidgets3/include/wx/statusbr.h +++ b/Externals/wxWidgets3/include/wx/statusbr.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 05.02.00 -// RCS-ID: $Id: statusbr.h 70808 2012-03-04 20:31:42Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -45,6 +44,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxStatusBarNameStr[]; #define wxSB_NORMAL 0x0000 #define wxSB_FLAT 0x0001 #define wxSB_RAISED 0x0002 +#define wxSB_SUNKEN 0x0003 // ---------------------------------------------------------------------------- // wxStatusBarPane: an helper for wxStatusBar @@ -53,7 +53,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxStatusBarNameStr[]; class WXDLLIMPEXP_CORE wxStatusBarPane { public: - wxStatusBarPane(int style = wxSB_NORMAL, size_t width = 0) + wxStatusBarPane(int style = wxSB_NORMAL, int width = 0) : m_nStyle(style), m_nWidth(width) { m_bEllipsized = false; } @@ -119,7 +119,7 @@ public: // set the number of fields and call SetStatusWidths(widths) if widths are // given virtual void SetFieldsCount(int number = 1, const int *widths = NULL); - int GetFieldsCount() const { return m_panes.GetCount(); } + int GetFieldsCount() const { return (int)m_panes.GetCount(); } // field text // ---------- @@ -150,10 +150,7 @@ public: // field styles // ------------ - // Set the field style. Use either wxSB_NORMAL (default) for a standard 3D - // border around a field, wxSB_FLAT for no border around a field, so that it - // appears flat or wxSB_POPOUT to make the field appear raised. - // Setting field styles only works on wxMSW + // Set the field border style to one of wxSB_XXX values. virtual void SetStatusStyles(int n, const int styles[]); int GetStatusStyle(int n) const diff --git a/Externals/wxWidgets3/include/wx/stdpaths.h b/Externals/wxWidgets3/include/wx/stdpaths.h index 5288ae626a..9d92044457 100644 --- a/Externals/wxWidgets3/include/wx/stdpaths.h +++ b/Externals/wxWidgets3/include/wx/stdpaths.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2004-10-17 -// RCS-ID: $Id: stdpaths.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2004 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -142,9 +141,6 @@ public: virtual wxString GetTempDir() const; - // ctor for the base class - wxStandardPathsBase(); - // virtual dtor for the base class virtual ~wxStandardPathsBase(); @@ -158,6 +154,10 @@ public: protected: + // Ctor is protected as this is a base class which should never be created + // directly. + wxStandardPathsBase(); + // append the path component, with a leading path separator if a // path separator or dot (.) is not already at the end of dir static wxString AppendPathComponent(const wxString& dir, const wxString& component); @@ -210,6 +210,12 @@ public: virtual wxString GetPluginsDir() const { return m_prefix; } virtual wxString GetDocumentsDir() const { return m_prefix; } +protected: + // Ctor is protected because wxStandardPaths::Get() should always be used + // to access the global wxStandardPaths object of the correct type instead + // of creating one of a possibly wrong type yourself. + wxStandardPaths() { } + private: wxString m_prefix; }; diff --git a/Externals/wxWidgets3/include/wx/stdstream.h b/Externals/wxWidgets3/include/wx/stdstream.h index 4e3ab6dc65..73ac0ac260 100644 --- a/Externals/wxWidgets3/include/wx/stdstream.h +++ b/Externals/wxWidgets3/include/wx/stdstream.h @@ -4,7 +4,6 @@ // wxInputStream and wxOutputStream // Author: Jonathan Liu // Created: 2009-05-02 -// RCS-ID: $Id: stdstream.h 70515 2012-02-05 14:18:37Z VZ $ // Copyright: (c) 2009 Jonathan Liu // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/stockitem.h b/Externals/wxWidgets3/include/wx/stockitem.h index e174d05dc3..72d3e714d8 100644 --- a/Externals/wxWidgets3/include/wx/stockitem.h +++ b/Externals/wxWidgets3/include/wx/stockitem.h @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 2004-08-15 -// RCS-ID: $Id: stockitem.h 63383 2010-02-04 01:33:32Z VZ $ // Copyright: (c) Vaclav Slavik, 2004 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -73,7 +72,7 @@ WXDLLIMPEXP_CORE wxString wxGetStockHelpString(wxWindowID id, #ifdef __WXGTK20__ -// Translates stock ID to GTK+'s stock item string indentifier: +// Translates stock ID to GTK+'s stock item string identifier: WXDLLIMPEXP_CORE const char *wxGetStockGtkID(wxWindowID id); #endif diff --git a/Externals/wxWidgets3/include/wx/stopwatch.h b/Externals/wxWidgets3/include/wx/stopwatch.h index da5069e975..248f757520 100644 --- a/Externals/wxWidgets3/include/wx/stopwatch.h +++ b/Externals/wxWidgets3/include/wx/stopwatch.h @@ -4,7 +4,6 @@ // Author: Julian Smart (wxTimer), Sylvain Bougnoux (wxStopWatch), // Vadim Zeitlin (time functions, current wxStopWatch) // Created: 26.06.03 (extracted from wx/timer.h) -// RCS-ID: $Id: stopwatch.h 69838 2011-11-27 19:50:27Z VZ $ // Copyright: (c) 1998-2003 Julian Smart, Sylvain Bougnoux // (c) 2011 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/strconv.h b/Externals/wxWidgets3/include/wx/strconv.h index 26b5314ca5..3dc3752186 100644 --- a/Externals/wxWidgets3/include/wx/strconv.h +++ b/Externals/wxWidgets3/include/wx/strconv.h @@ -4,7 +4,6 @@ // Author: Ove Kaaven, Robert Roebling, Vadim Zeitlin // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: strconv.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) 1998 Ove Kaaven, Robert Roebling // (c) 1998-2006 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/stream.h b/Externals/wxWidgets3/include/wx/stream.h index 7103c8d970..0c380d6aaf 100644 --- a/Externals/wxWidgets3/include/wx/stream.h +++ b/Externals/wxWidgets3/include/wx/stream.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux, Guillermo Rodriguez Garcia, Vadim Zeitlin // Modified by: // Created: 11/07/98 -// RCS-ID: $Id: stream.h 68331 2011-07-22 16:16:00Z VZ $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -128,6 +127,11 @@ public: // it means that EOF has been reached. virtual wxInputStream& Read(void *buffer, size_t size); + // Read exactly the given number of bytes, unlike Read(), which may read + // less than the requested amount of data without returning an error, this + // method either reads all the data or returns false. + bool ReadAll(void *buffer, size_t size); + // copy the entire contents of this stream into streamOut, stopping only // when EOF is reached or an error occurs wxInputStream& Read(wxOutputStream& streamOut); @@ -233,6 +237,12 @@ public: void PutC(char c); virtual wxOutputStream& Write(const void *buffer, size_t size); + + // This is ReadAll() equivalent for Write(): it either writes exactly the + // given number of bytes or returns false, unlike Write() which can write + // less data than requested but still return without error. + bool WriteAll(const void *buffer, size_t size); + wxOutputStream& Write(wxInputStream& stream_in); virtual wxFileOffset SeekO(wxFileOffset pos, wxSeekMode mode = wxFromStart); @@ -270,16 +280,17 @@ class WXDLLIMPEXP_BASE wxCountingOutputStream : public wxOutputStream public: wxCountingOutputStream(); - wxFileOffset GetLength() const; + virtual wxFileOffset GetLength() const; bool Ok() const { return IsOk(); } - bool IsOk() const { return true; } + virtual bool IsOk() const { return true; } protected: virtual size_t OnSysWrite(const void *buffer, size_t size); virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); virtual wxFileOffset OnSysTell() const; - size_t m_currentPos; + size_t m_currentPos, + m_lastPos; DECLARE_DYNAMIC_CLASS(wxCountingOutputStream) wxDECLARE_NO_COPY_CLASS(wxCountingOutputStream); @@ -640,6 +651,54 @@ protected: inline wxStreamBuffer *wxBufferedOutputStream::OutputStreamBuffer() const { return m_o_streambuf; } #endif // WXWIN_COMPATIBILITY_2_6 +// --------------------------------------------------------------------------- +// wxWrapperInputStream: forwards all IO to another stream. +// --------------------------------------------------------------------------- + +class WXDLLIMPEXP_BASE wxWrapperInputStream : public wxFilterInputStream +{ +public: + // Constructor fully initializing the stream. The overload taking pointer + // takes ownership of the parent stream, the one taking reference does not. + // + // Notice that this class also has a default ctor but it's protected as the + // derived class is supposed to take care of calling InitParentStream() if + // it's used. + wxWrapperInputStream(wxInputStream& stream); + wxWrapperInputStream(wxInputStream* stream); + + // Override the base class methods to forward to the wrapped stream. + virtual wxFileOffset GetLength() const; + virtual bool IsSeekable() const; + +protected: + virtual size_t OnSysRead(void *buffer, size_t size); + virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; + + // Ensure that our own last error is the same as that of the real stream. + // + // This method is const because the error must be updated even from const + // methods (in other words, it really should have been mutable in the first + // place). + void SynchronizeLastError() const + { + const_cast(this)-> + Reset(m_parent_i_stream->GetLastError()); + } + + // Default constructor, use InitParentStream() later. + wxWrapperInputStream(); + + // Set up the wrapped stream for an object initialized using the default + // constructor. The ownership logic is the same as above. + void InitParentStream(wxInputStream& stream); + void InitParentStream(wxInputStream* stream); + + wxDECLARE_NO_COPY_CLASS(wxWrapperInputStream); +}; + + #endif // wxUSE_STREAMS #endif // _WX_WXSTREAM_H__ diff --git a/Externals/wxWidgets3/include/wx/string.h b/Externals/wxWidgets3/include/wx/string.h index 930e822d25..ef1a8d9aa8 100644 --- a/Externals/wxWidgets3/include/wx/string.h +++ b/Externals/wxWidgets3/include/wx/string.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: string.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -43,10 +42,6 @@ # include #endif -#ifdef HAVE_STRCASECMP_IN_STRINGS_H - #include // for strcasecmp() -#endif // HAVE_STRCASECMP_IN_STRINGS_H - #include "wx/wxcrtbase.h" // for wxChar, wxStrlen() etc. #include "wx/strvararg.h" #include "wx/buffer.h" // for wxCharBuffer @@ -134,69 +129,18 @@ namespace wxPrivate // backwards compatibility only. // checks whether the passed in pointer is NULL and if the string is empty -wxDEPRECATED( inline bool IsEmpty(const char *p) ); +wxDEPRECATED_MSG("use wxIsEmpty() instead") inline bool IsEmpty(const char *p) { return (!p || !*p); } // safe version of strlen() (returns 0 if passed NULL pointer) -wxDEPRECATED( inline size_t Strlen(const char *psz) ); +wxDEPRECATED_MSG("use wxStrlen() instead") inline size_t Strlen(const char *psz) { return psz ? strlen(psz) : 0; } // portable strcasecmp/_stricmp -wxDEPRECATED( inline int Stricmp(const char *psz1, const char *psz2) ); +wxDEPRECATED_MSG("use wxStricmp() instead") inline int Stricmp(const char *psz1, const char *psz2) -{ -#if defined(__VISUALC__) && defined(__WXWINCE__) - register char c1, c2; - do { - c1 = tolower(*psz1++); - c2 = tolower(*psz2++); - } while ( c1 && (c1 == c2) ); - - return c1 - c2; -#elif defined(__VISUALC__) || ( defined(__MWERKS__) && defined(__INTEL__) ) - return _stricmp(psz1, psz2); -#elif defined(__SC__) - return _stricmp(psz1, psz2); -#elif defined(__BORLANDC__) - return stricmp(psz1, psz2); -#elif defined(__WATCOMC__) - return stricmp(psz1, psz2); -#elif defined(__DJGPP__) - return stricmp(psz1, psz2); -#elif defined(__EMX__) - return stricmp(psz1, psz2); -#elif defined(__WXPM__) - return stricmp(psz1, psz2); -#elif defined(HAVE_STRCASECMP_IN_STRING_H) || \ - defined(HAVE_STRCASECMP_IN_STRINGS_H) || \ - defined(__GNUWIN32__) - return strcasecmp(psz1, psz2); -#elif defined(__MWERKS__) && !defined(__INTEL__) - register char c1, c2; - do { - c1 = tolower(*psz1++); - c2 = tolower(*psz2++); - } while ( c1 && (c1 == c2) ); - - return c1 - c2; -#else - // almost all compilers/libraries provide this function (unfortunately under - // different names), that's why we don't implement our own which will surely - // be more efficient than this code (uncomment to use): - /* - register char c1, c2; - do { - c1 = tolower(*psz1++); - c2 = tolower(*psz2++); - } while ( c1 && (c1 == c2) ); - - return c1 - c2; - */ - - #error "Please define string case-insensitive compare for your OS/compiler" -#endif // OS/compiler -} + { return wxCRT_StricmpA(psz1, psz2); } #endif // WXWIN_COMPATIBILITY_2_8 @@ -897,7 +841,7 @@ public: public: \ WX_DEFINE_ITERATOR_CATEGORY(WX_STR_ITERATOR_TAG) \ typedef wxUniChar value_type; \ - typedef int difference_type; \ + typedef ptrdiff_t difference_type; \ typedef reference_type reference; \ typedef pointer_type pointer; \ \ @@ -1150,6 +1094,25 @@ public: #undef WX_STR_ITERATOR_TAG #undef WX_STR_ITERATOR_IMPL + // This method is mostly used by wxWidgets itself and return the offset of + // the given iterator in bytes relative to the start of the buffer + // representing the current string contents in the current locale encoding. + // + // It is inefficient as it involves converting part of the string to this + // encoding (and also unsafe as it simply returns 0 if the conversion fails) + // and so should be avoided if possible, wx itself only uses it to implement + // backwards-compatible API. + ptrdiff_t IterOffsetInMBStr(const const_iterator& i) const + { + const wxString str(begin(), i); + + // This is logically equivalent to strlen(str.mb_str()) but avoids + // actually converting the string to multibyte and just computes the + // length that it would have after conversion. + size_t ofs = wxConvLibc.FromWChar(NULL, 0, str.wc_str(), str.length()); + return ofs == wxCONV_FAILED ? 0 : static_cast(ofs); + } + friend class iterator; friend class const_iterator; @@ -2613,9 +2576,21 @@ public: return *this; } + // This is a non-standard-compliant overload taking the first "len" + // characters of the source string. wxString& assign(const wxString& str, size_t len) { +#if wxUSE_STRING_POS_CACHE + // It is legal to pass len > str.length() to wxStringImpl::assign() but + // by restricting it here we save some work for that function so it's not + // really less efficient and, at the same time, ensure that we don't + // cache invalid length. + const size_t lenSrc = str.length(); + if ( len > lenSrc ) + len = lenSrc; + wxSTRING_SET_CACHED_LENGTH(len); +#endif // wxUSE_STRING_POS_CACHE m_impl.assign(str.m_impl, 0, str.LenToImpl(len)); @@ -2657,7 +2632,7 @@ public: wxString& assign(const char *sz, size_t n) { - wxSTRING_SET_CACHED_LENGTH(n); + wxSTRING_INVALIDATE_CACHE(); SubstrBufFromMB str(ImplStr(sz, n)); m_impl.assign(str.data, str.len); @@ -3473,7 +3448,7 @@ private: void DoUngetWriteBuf(size_t nLen) { - wxSTRING_SET_CACHED_LENGTH(nLen); + wxSTRING_INVALIDATE_CACHE(); m_impl.DoUngetWriteBuf(nLen); } diff --git a/Externals/wxWidgets3/include/wx/stringimpl.h b/Externals/wxWidgets3/include/wx/stringimpl.h index fd611454ca..50d4af9c64 100644 --- a/Externals/wxWidgets3/include/wx/stringimpl.h +++ b/Externals/wxWidgets3/include/wx/stringimpl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: stringimpl.h 67343 2011-03-30 14:16:04Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/stringops.h b/Externals/wxWidgets3/include/wx/stringops.h index cb37ac4f99..301a7bf843 100644 --- a/Externals/wxWidgets3/include/wx/stringops.h +++ b/Externals/wxWidgets3/include/wx/stringops.h @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 2007-04-16 -// RCS-ID: $Id: stringops.h 59795 2009-03-23 23:11:55Z VZ $ // Copyright: (c) 2007 REA Elektronik GmbH // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/strvararg.h b/Externals/wxWidgets3/include/wx/strvararg.h index 78f44579db..dc566e9443 100644 --- a/Externals/wxWidgets3/include/wx/strvararg.h +++ b/Externals/wxWidgets3/include/wx/strvararg.h @@ -3,7 +3,6 @@ // Purpose: macros for implementing type-safe vararg passing of strings // Author: Vaclav Slavik // Created: 2007-02-19 -// RCS-ID: $Id: strvararg.h 67760 2011-05-17 22:12:39Z VZ $ // Copyright: (c) 2007 REA Elektronik GmbH // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -309,14 +308,13 @@ struct wxFormatStringArgumentFinder // the correct type (one of wxFormatString::Arg_XXX or-combination in // 'expected_mask'). #define wxASSERT_ARG_TYPE(fmt, index, expected_mask) \ - do \ - { \ + wxSTATEMENT_MACRO_BEGIN \ if ( !fmt ) \ break; \ const int argtype = fmt->GetArgumentType(index); \ wxASSERT_MSG( (argtype & (expected_mask)) == argtype, \ "format specifier doesn't match argument type" ); \ - } while ( wxFalse ) + wxSTATEMENT_MACRO_END #else // Just define it to suppress "unused parameter" warnings for the // parameters which we don't use otherwise diff --git a/Externals/wxWidgets3/include/wx/sysopt.h b/Externals/wxWidgets3/include/wx/sysopt.h index 15de001e44..63474c0660 100644 --- a/Externals/wxWidgets3/include/wx/sysopt.h +++ b/Externals/wxWidgets3/include/wx/sysopt.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 2001-07-10 -// RCS-ID: $Id: sysopt.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/tarstrm.h b/Externals/wxWidgets3/include/wx/tarstrm.h index 71fbb7006e..906d4383ec 100644 --- a/Externals/wxWidgets3/include/wx/tarstrm.h +++ b/Externals/wxWidgets3/include/wx/tarstrm.h @@ -2,7 +2,6 @@ // Name: wx/tarstrm.h // Purpose: Streams for Tar files // Author: Mike Wetherell -// RCS-ID: $Id: tarstrm.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2004 Mike Wetherell // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/taskbar.h b/Externals/wxWidgets3/include/wx/taskbar.h index 0e7de72668..4a81088b01 100644 --- a/Externals/wxWidgets3/include/wx/taskbar.h +++ b/Externals/wxWidgets3/include/wx/taskbar.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Julian Smart -// RCS-ID: $Id: taskbar.h 70345 2012-01-15 01:05:28Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -20,6 +19,21 @@ class WXDLLIMPEXP_FWD_ADV wxTaskBarIconEvent; +// ---------------------------------------------------------------------------- + +// type of taskbar item to create. Only applicable in wxOSX_COCOA +enum wxTaskBarIconType +{ + wxTBI_DOCK, + wxTBI_CUSTOM_STATUSITEM, +#if defined(wxOSX_USE_COCOA) && wxOSX_USE_COCOA + wxTBI_DEFAULT_TYPE = wxTBI_CUSTOM_STATUSITEM +#else + wxTBI_DEFAULT_TYPE = wxTBI_DOCK +#endif +}; + + // ---------------------------------------------------------------------------- // wxTaskBarIconBase: define wxTaskBarIcon interface // ---------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/include/wx/tbarbase.h b/Externals/wxWidgets3/include/wx/tbarbase.h index fb4e7fde74..c9ff7f430c 100644 --- a/Externals/wxWidgets3/include/wx/tbarbase.h +++ b/Externals/wxWidgets3/include/wx/tbarbase.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: tbarbase.h 70854 2012-03-10 00:01:09Z RD $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -609,6 +608,9 @@ public: #endif protected: + // choose the default border for this window + virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } + // to implement in derived classes // ------------------------------- diff --git a/Externals/wxWidgets3/include/wx/testing.h b/Externals/wxWidgets3/include/wx/testing.h new file mode 100644 index 0000000000..57d9d0990c --- /dev/null +++ b/Externals/wxWidgets3/include/wx/testing.h @@ -0,0 +1,351 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/testing.h +// Purpose: helpers for GUI testing +// Author: Vaclav Slavik +// Created: 2012-08-28 +// Copyright: (c) 2012 Vaclav Slavik +// Licence: wxWindows Licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_TESTING_H_ +#define _WX_TESTING_H_ + +#include "wx/debug.h" +#include "wx/string.h" +#include "wx/modalhook.h" + +class WXDLLIMPEXP_FWD_CORE wxMessageDialogBase; +class WXDLLIMPEXP_FWD_CORE wxFileDialogBase; + +// ---------------------------------------------------------------------------- +// testing API +// ---------------------------------------------------------------------------- + +// Don't include this code when building the library itself +#ifndef WXBUILDING + +#include "wx/beforestd.h" +#include +#include +#include +#include "wx/afterstd.h" +#include "wx/cpp.h" +#include "wx/dialog.h" +#include "wx/msgdlg.h" +#include "wx/filedlg.h" + +class wxTestingModalHook; + +// Non-template base class for wxExpectModal (via wxExpectModalBase). +// Only used internally. +class wxModalExpectation +{ +public: + wxModalExpectation() : m_isOptional(false) {} + virtual ~wxModalExpectation() {} + + bool IsOptional() const { return m_isOptional; } + + virtual int Invoke(wxDialog *dlg) const = 0; + + virtual wxString GetDescription() const = 0; + +protected: + // Is this dialog optional, i.e. not required to be shown? + bool m_isOptional; +}; + + +// This must be specialized for each type. The specialization MUST be derived +// from wxExpectModalBase. +template class wxExpectModal {}; + + +/** + Base class for wxExpectModal specializations. + + Every such specialization must be derived from wxExpectModalBase; there's + no other use for this class than to serve as wxExpectModal's base class. + + T must be a class derived from wxDialog. + */ +template +class wxExpectModalBase : public wxModalExpectation +{ +public: + typedef T DialogType; + typedef wxExpectModal ExpectationType; + + /** + Returns a copy of the expectation where the expected dialog is marked + as optional. + + Optional dialogs aren't required to appear, it's not an error if they + don't. + */ + ExpectationType Optional() const + { + ExpectationType e(*static_cast(this)); + e.m_isOptional = true; + return e; + } + +protected: + virtual int Invoke(wxDialog *dlg) const + { + DialogType *t = dynamic_cast(dlg); + if ( t ) + return OnInvoked(t); + else + return wxID_NONE; // not handled + } + + /// Returns description of the expected dialog (by default, its class). + virtual wxString GetDescription() const + { + return wxCLASSINFO(T)->GetClassName(); + } + + /** + This method is called when ShowModal() was invoked on a dialog of type T. + + @return Return value is used as ShowModal()'s return value. + */ + virtual int OnInvoked(DialogType *dlg) const = 0; +}; + + +// wxExpectModal specializations for common dialogs: + +template<> +class wxExpectModal : public wxExpectModalBase +{ +public: + wxExpectModal(int id) + { + switch ( id ) + { + case wxYES: + m_id = wxID_YES; + break; + case wxNO: + m_id = wxID_NO; + break; + case wxCANCEL: + m_id = wxID_CANCEL; + break; + case wxOK: + m_id = wxID_OK; + break; + case wxHELP: + m_id = wxID_HELP; + break; + default: + m_id = id; + break; + } + } + +protected: + virtual int OnInvoked(wxMessageDialog *WXUNUSED(dlg)) const + { + return m_id; + } + + int m_id; +}; + +#if wxUSE_FILEDLG + +template<> +class wxExpectModal : public wxExpectModalBase +{ +public: + wxExpectModal(const wxString& path, int id = wxID_OK) + : m_path(path), m_id(id) + { + } + +protected: + virtual int OnInvoked(wxFileDialog *dlg) const + { + dlg->SetPath(m_path); + return m_id; + } + + wxString m_path; + int m_id; +}; + +#endif + +// Implementation of wxModalDialogHook for use in testing, with +// wxExpectModal and the wxTEST_DIALOG() macro. It is not intended for +// direct use, use the macro instead. +class wxTestingModalHook : public wxModalDialogHook +{ +public: + wxTestingModalHook() + { + Register(); + } + + // Called to verify that all expectations were met. This cannot be done in + // the destructor, because ReportFailure() may throw (either because it's + // overriden or because wx's assertions handling is, globally). And + // throwing from the destructor would introduce all sort of problems, + // including messing up the order of errors in some cases. + void CheckUnmetExpectations() + { + while ( !m_expectations.empty() ) + { + const wxModalExpectation *expect = m_expectations.front(); + m_expectations.pop(); + if ( expect->IsOptional() ) + continue; + + ReportFailure + ( + wxString::Format + ( + "Expected %s dialog was not shown.", + expect->GetDescription() + ) + ); + break; + } + } + + void AddExpectation(const wxModalExpectation& e) + { + m_expectations.push(&e); + } + +protected: + virtual int Enter(wxDialog *dlg) + { + while ( !m_expectations.empty() ) + { + const wxModalExpectation *expect = m_expectations.front(); + m_expectations.pop(); + + int ret = expect->Invoke(dlg); + if ( ret != wxID_NONE ) + return ret; // dialog shown as expected + + // not showing an optional dialog is OK, but showing an unexpected + // one definitely isn't: + if ( !expect->IsOptional() ) + { + ReportFailure + ( + wxString::Format + ( + "A %s dialog was shown unexpectedly, expected %s.", + dlg->GetClassInfo()->GetClassName(), + expect->GetDescription() + ) + ); + return wxID_NONE; + } + // else: try the next expectation in the chain + } + + ReportFailure + ( + wxString::Format + ( + "A dialog (%s) was shown unexpectedly.", + dlg->GetClassInfo()->GetClassName() + ) + ); + return wxID_NONE; + } + +protected: + virtual void ReportFailure(const wxString& msg) + { + wxFAIL_MSG( msg ); + } + +private: + std::queue m_expectations; + + wxDECLARE_NO_COPY_CLASS(wxTestingModalHook); +}; + + +// Redefining this value makes it possible to customize the hook class, +// including e.g. its error reporting. +#define wxTEST_DIALOG_HOOK_CLASS wxTestingModalHook + +#define WX_TEST_IMPL_ADD_EXPECTATION(pos, expect) \ + const wxModalExpectation& wx_exp##pos = expect; \ + wx_hook.AddExpectation(wx_exp##pos); + +/** + Runs given code with all modal dialogs redirected to wxExpectModal + hooks, instead of being shown to the user. + + The first argument is any valid expression, typically a function call. The + remaining arguments are wxExpectModal instances defining the dialogs + that are expected to be shown, in order of appearance. + + Some typical examples: + + @code + wxTEST_DIALOG + ( + rc = dlg.ShowModal(), + wxExpectModal(wxGetCwd() + "/test.txt") + ); + @endcode + + Sometimes, the code may show more than one dialog: + + @code + wxTEST_DIALOG + ( + RunSomeFunction(), + wxExpectModal(wxNO), + wxExpectModal(wxYES), + wxExpectModal(wxGetCwd() + "/test.txt") + ); + @endcode + + Notice that wxExpectModal has some convenience methods for further + tweaking the expectations. For example, it's possible to mark an expected + dialog as @em optional for situations when a dialog may be shown, but isn't + required to, by calling the Optional() method: + + @code + wxTEST_DIALOG + ( + RunSomeFunction(), + wxExpectModal(wxNO), + wxExpectModal(wxGetCwd() + "/test.txt").Optional() + ); + @endcode + + @note By default, errors are reported with wxFAIL_MSG(). You may customize this by + implementing a class derived from wxTestingModalHook, overriding its + ReportFailure() method and redefining the wxTEST_DIALOG_HOOK_CLASS + macro to be the name of this class. + + @note Custom dialogs are supported too. All you have to do is to specialize + wxExpectModal<> for your dialog type and implement its OnInvoked() + method. + */ +#ifdef HAVE_VARIADIC_MACROS +#define wxTEST_DIALOG(codeToRun, ...) \ + { \ + wxTEST_DIALOG_HOOK_CLASS wx_hook; \ + wxCALL_FOR_EACH(WX_TEST_IMPL_ADD_EXPECTATION, __VA_ARGS__) \ + codeToRun; \ + wx_hook.CheckUnmetExpectations(); \ + } +#endif /* HAVE_VARIADIC_MACROS */ + +#endif // !WXBUILDING + +#endif // _WX_TESTING_H_ diff --git a/Externals/wxWidgets3/include/wx/textbuf.h b/Externals/wxWidgets3/include/wx/textbuf.h index 0db6a65279..a2511b427d 100644 --- a/Externals/wxWidgets3/include/wx/textbuf.h +++ b/Externals/wxWidgets3/include/wx/textbuf.h @@ -20,7 +20,7 @@ // constants // ---------------------------------------------------------------------------- -// the line termination type (kept wxTextFileType name for compability) +// the line termination type (kept wxTextFileType name for compatibility) enum wxTextFileType { wxTextFileType_None, // incomplete (the last line of the file only) diff --git a/Externals/wxWidgets3/include/wx/textcompleter.h b/Externals/wxWidgets3/include/wx/textcompleter.h index fa422d309d..bc4135f8bf 100644 --- a/Externals/wxWidgets3/include/wx/textcompleter.h +++ b/Externals/wxWidgets3/include/wx/textcompleter.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxTextCompleter class. // Author: Vadim Zeitlin // Created: 2011-04-13 -// RCS-ID: $Id: textcompleter.h 67525 2011-04-17 23:14:11Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/textctrl.h b/Externals/wxWidgets3/include/wx/textctrl.h index eb7a03c96e..83634e1885 100644 --- a/Externals/wxWidgets3/include/wx/textctrl.h +++ b/Externals/wxWidgets3/include/wx/textctrl.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 13.07.99 -// RCS-ID: $Id: textctrl.h 70446 2012-01-23 11:28:28Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -28,7 +27,6 @@ // some compilers don't have standard compliant rdbuf() (and MSVC has it only // in its new iostream library, not in the old one used with iostream.h) #if defined(__WATCOMC__) || \ - defined(__MWERKS__) || \ ((defined(__VISUALC5__) || defined(__VISUALC6__)) && wxUSE_IOSTREAMH) #define wxHAS_TEXT_WINDOW_STREAM 0 #elif wxUSE_STD_IOSTREAM @@ -167,13 +165,16 @@ enum wxTextAttrFlags wxTEXT_ATTR_BACKGROUND_COLOUR = 0x00000002, wxTEXT_ATTR_FONT_FACE = 0x00000004, - wxTEXT_ATTR_FONT_SIZE = 0x00000008, + wxTEXT_ATTR_FONT_POINT_SIZE = 0x00000008, + wxTEXT_ATTR_FONT_PIXEL_SIZE = 0x10000000, wxTEXT_ATTR_FONT_WEIGHT = 0x00000010, wxTEXT_ATTR_FONT_ITALIC = 0x00000020, wxTEXT_ATTR_FONT_UNDERLINE = 0x00000040, wxTEXT_ATTR_FONT_STRIKETHROUGH = 0x08000000, wxTEXT_ATTR_FONT_ENCODING = 0x02000000, wxTEXT_ATTR_FONT_FAMILY = 0x04000000, + wxTEXT_ATTR_FONT_SIZE = \ + ( wxTEXT_ATTR_FONT_POINT_SIZE | wxTEXT_ATTR_FONT_PIXEL_SIZE ), wxTEXT_ATTR_FONT = \ ( wxTEXT_ATTR_FONT_FACE | wxTEXT_ATTR_FONT_SIZE | wxTEXT_ATTR_FONT_WEIGHT | \ wxTEXT_ATTR_FONT_ITALIC | wxTEXT_ATTR_FONT_UNDERLINE | wxTEXT_ATTR_FONT_STRIKETHROUGH | wxTEXT_ATTR_FONT_ENCODING | wxTEXT_ATTR_FONT_FAMILY ), @@ -241,7 +242,9 @@ enum wxTextAttrBulletStyle wxTEXT_ATTR_BULLET_STYLE_ALIGN_LEFT = 0x00000000, wxTEXT_ATTR_BULLET_STYLE_ALIGN_RIGHT = 0x00001000, - wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE = 0x00002000 + wxTEXT_ATTR_BULLET_STYLE_ALIGN_CENTRE = 0x00002000, + + wxTEXT_ATTR_BULLET_STYLE_CONTINUATION = 0x00004000 }; /*! @@ -299,8 +302,11 @@ public: // Equality test bool operator== (const wxTextAttr& attr) const; - // Partial equality test - bool EqPartial(const wxTextAttr& attr) const; + // Partial equality test. If @a weakTest is @true, attributes of this object do not + // have to be present if those attributes of @a attr are present. If @a weakTest is + // @false, the function will fail if an attribute is present in @a attr but not + // in this object. + bool EqPartial(const wxTextAttr& attr, bool weakTest = true) const; // Get attributes from font. bool GetFontAttributes(const wxFont& font, int flags = wxTEXT_ATTR_FONT); @@ -313,7 +319,9 @@ public: void SetLeftIndent(int indent, int subIndent = 0) { m_leftIndent = indent; m_leftSubIndent = subIndent; m_flags |= wxTEXT_ATTR_LEFT_INDENT; } void SetRightIndent(int indent) { m_rightIndent = indent; m_flags |= wxTEXT_ATTR_RIGHT_INDENT; } - void SetFontSize(int pointSize) { m_fontSize = pointSize; m_flags |= wxTEXT_ATTR_FONT_SIZE; } + void SetFontSize(int pointSize) { m_fontSize = pointSize; m_flags &= ~wxTEXT_ATTR_FONT_SIZE; m_flags |= wxTEXT_ATTR_FONT_POINT_SIZE; } + void SetFontPointSize(int pointSize) { m_fontSize = pointSize; m_flags &= ~wxTEXT_ATTR_FONT_SIZE; m_flags |= wxTEXT_ATTR_FONT_POINT_SIZE; } + void SetFontPixelSize(int pixelSize) { m_fontSize = pixelSize; m_flags &= ~wxTEXT_ATTR_FONT_SIZE; m_flags |= wxTEXT_ATTR_FONT_PIXEL_SIZE; } void SetFontStyle(wxFontStyle fontStyle) { m_fontStyle = fontStyle; m_flags |= wxTEXT_ATTR_FONT_ITALIC; } void SetFontWeight(wxFontWeight fontWeight) { m_fontWeight = fontWeight; m_flags |= wxTEXT_ATTR_FONT_WEIGHT; } void SetFontFaceName(const wxString& faceName) { m_fontFaceName = faceName; m_flags |= wxTEXT_ATTR_FONT_FACE; } @@ -323,7 +331,7 @@ public: void SetFontFamily(wxFontFamily family) { m_fontFamily = family; m_flags |= wxTEXT_ATTR_FONT_FAMILY; } // Set font - void SetFont(const wxFont& font, int flags = wxTEXT_ATTR_FONT) { GetFontAttributes(font, flags); } + void SetFont(const wxFont& font, int flags = (wxTEXT_ATTR_FONT & ~wxTEXT_ATTR_FONT_PIXEL_SIZE)) { GetFontAttributes(font, flags); } void SetFlags(long flags) { m_flags = flags; } @@ -390,6 +398,8 @@ public: bool HasRightIndent() const { return HasFlag(wxTEXT_ATTR_RIGHT_INDENT); } bool HasFontWeight() const { return HasFlag(wxTEXT_ATTR_FONT_WEIGHT); } bool HasFontSize() const { return HasFlag(wxTEXT_ATTR_FONT_SIZE); } + bool HasFontPointSize() const { return HasFlag(wxTEXT_ATTR_FONT_POINT_SIZE); } + bool HasFontPixelSize() const { return HasFlag(wxTEXT_ATTR_FONT_PIXEL_SIZE); } bool HasFontItalic() const { return HasFlag(wxTEXT_ATTR_FONT_ITALIC); } bool HasFontUnderlined() const { return HasFlag(wxTEXT_ATTR_FONT_UNDERLINE); } bool HasFontStrikethrough() const { return HasFlag(wxTEXT_ATTR_FONT_STRIKETHROUGH); } @@ -432,7 +442,7 @@ public: // is non-NULL, then it will be used to mask out those attributes that are the same in style // and compareWith, for situations where we don't want to explicitly set inherited attributes. bool Apply(const wxTextAttr& style, const wxTextAttr* compareWith = NULL); - + // merges the attributes of the base and the overlay objects and returns // the result; the parameter attributes take precedence // @@ -725,6 +735,9 @@ public: wxTextEntry::SetValue(value); } + // wxTextEntry overrides + virtual bool SetHint(const wxString& hint); + // wxWindow overrides virtual wxVisualAttributes GetDefaultAttributes() const { @@ -743,9 +756,6 @@ protected: int overflow(int i); #endif // wxHAS_TEXT_WINDOW_STREAM - virtual bool DoLoadFile(const wxString& file, int fileType); - virtual bool DoSaveFile(const wxString& file, int fileType); - // Another wxTextAreaBase override. virtual bool IsValidPosition(long pos) const { @@ -791,17 +801,17 @@ protected: class WXDLLIMPEXP_FWD_CORE wxTextUrlEvent; -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_UPDATED, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_URL, wxTextUrlEvent); -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_MAXLEN, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_ENTER, wxCommandEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_URL, wxTextUrlEvent); +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_TEXT_MAXLEN, wxCommandEvent); class WXDLLIMPEXP_CORE wxTextUrlEvent : public wxCommandEvent { public: wxTextUrlEvent(int winid, const wxMouseEvent& evtMouse, long start, long end) - : wxCommandEvent(wxEVT_COMMAND_TEXT_URL, winid), + : wxCommandEvent(wxEVT_TEXT_URL, winid), m_evtMouse(evtMouse), m_start(start), m_end(end) { } wxTextUrlEvent(const wxTextUrlEvent& event) @@ -810,7 +820,7 @@ public: m_start(event.m_start), m_end(event.m_end) { } - // get the mouse event which happend over the URL + // get the mouse event which happened over the URL const wxMouseEvent& GetMouseEvent() const { return m_evtMouse; } // get the start of the URL @@ -844,12 +854,12 @@ typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&); wxEVENT_HANDLER_CAST(wxTextUrlEventFunction, func) #define wx__DECLARE_TEXTEVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_ ## evt, id, wxTextEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TEXT_ ## evt, id, wxTextEventHandler(fn)) #define wx__DECLARE_TEXTURLEVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TEXT_ ## evt, id, wxTextUrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TEXT_ ## evt, id, wxTextUrlEventHandler(fn)) -#define EVT_TEXT(id, fn) wx__DECLARE_TEXTEVT(UPDATED, id, fn) +#define EVT_TEXT(id, fn) wx__DECLARE_EVT1(wxEVT_TEXT, id, wxTextEventHandler(fn)) #define EVT_TEXT_ENTER(id, fn) wx__DECLARE_TEXTEVT(ENTER, id, fn) #define EVT_TEXT_URL(id, fn) wx__DECLARE_TEXTURLEVT(URL, id, fn) #define EVT_TEXT_MAXLEN(id, fn) wx__DECLARE_TEXTEVT(MAXLEN, id, fn) @@ -898,6 +908,12 @@ private: #endif // wxHAS_TEXT_WINDOW_STREAM +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TEXT_UPDATED wxEVT_TEXT +#define wxEVT_COMMAND_TEXT_ENTER wxEVT_TEXT_ENTER +#define wxEVT_COMMAND_TEXT_URL wxEVT_TEXT_URL +#define wxEVT_COMMAND_TEXT_MAXLEN wxEVT_TEXT_MAXLEN + #endif // wxUSE_TEXTCTRL #endif diff --git a/Externals/wxWidgets3/include/wx/textdlg.h b/Externals/wxWidgets3/include/wx/textdlg.h index e4bc1178a9..509b700ba6 100644 --- a/Externals/wxWidgets3/include/wx/textdlg.h +++ b/Externals/wxWidgets3/include/wx/textdlg.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: textdlg.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/textentry.h b/Externals/wxWidgets3/include/wx/textentry.h index aeeffa652b..2707afa203 100644 --- a/Externals/wxWidgets3/include/wx/textentry.h +++ b/Externals/wxWidgets3/include/wx/textentry.h @@ -3,7 +3,6 @@ // Purpose: declares wxTextEntry interface defining a simple text entry // Author: Vadim Zeitlin // Created: 2007-09-24 -// RCS-ID: $Id: textentry.h 68918 2011-08-27 14:11:13Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -98,6 +97,8 @@ public: virtual void SetSelection(long from, long to) = 0; virtual void SelectAll() { SetSelection(-1, -1); } + virtual void SelectNone() + { const long pos = GetInsertionPoint(); SetSelection(pos, pos); } virtual void GetSelection(long *from, long *to) const = 0; bool HasSelection() const; virtual wxString GetStringSelection() const; @@ -171,20 +172,20 @@ public: // implementation only // ------------------- - // generate the wxEVT_COMMAND_TEXT_UPDATED event for GetEditableWindow(), + // generate the wxEVT_TEXT event for GetEditableWindow(), // like SetValue() does and return true if the event was processed // // NB: this is public for wxRichTextCtrl use only right now, do not call it static bool SendTextUpdatedEvent(wxWindow *win); - // generate the wxEVT_COMMAND_TEXT_UPDATED event for this window + // generate the wxEVT_TEXT event for this window bool SendTextUpdatedEvent() { return SendTextUpdatedEvent(GetEditableWindow()); } - // generate the wxEVT_COMMAND_TEXT_UPDATED event for this window if the + // generate the wxEVT_TEXT event for this window if the // events are not currently disabled void SendTextUpdatedEventIfAllowed() { diff --git a/Externals/wxWidgets3/include/wx/textfile.h b/Externals/wxWidgets3/include/wx/textfile.h index 394aa5bf87..e6aa3ba663 100644 --- a/Externals/wxWidgets3/include/wx/textfile.h +++ b/Externals/wxWidgets3/include/wx/textfile.h @@ -6,7 +6,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 03.04.98 -// RCS-ID: $Id: textfile.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/textwrapper.h b/Externals/wxWidgets3/include/wx/textwrapper.h index f776b9939e..a708cebd75 100644 --- a/Externals/wxWidgets3/include/wx/textwrapper.h +++ b/Externals/wxWidgets3/include/wx/textwrapper.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxTextWrapper class // Author: Vadim Zeitlin // Created: 2009-05-31 (extracted from dlgcmn.cpp via wx/private/stattext.h) -// RCS-ID: $Id: textwrapper.h 70433 2012-01-22 00:58:05Z VZ $ // Copyright: (c) 1999, 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/tglbtn.h b/Externals/wxWidgets3/include/wx/tglbtn.h index 72966cc759..8cb2a2e891 100644 --- a/Externals/wxWidgets3/include/wx/tglbtn.h +++ b/Externals/wxWidgets3/include/wx/tglbtn.h @@ -5,7 +5,6 @@ // Author: John Norris, minor changes by Axel Schlueter // Modified by: // Created: 08.02.01 -// RCS-ID: $Id: tglbtn.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) 2000 Johnny C. Norris II // Licence: wxWindows Licence ///////////////////////////////////////////////////////////////////////////// @@ -22,7 +21,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxCheckBoxNameStr[]; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TOGGLEBUTTON, wxCommandEvent ); // ---------------------------------------------------------------------------- // wxToggleButtonBase @@ -72,7 +71,7 @@ protected: #define EVT_TOGGLEBUTTON(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, id, wxCommandEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TOGGLEBUTTON, id, wxCommandEventHandler(fn)) #if defined(__WXUNIVERSAL__) #include "wx/univ/tglbtn.h" @@ -93,6 +92,9 @@ protected: #include "wx/os2/tglbtn.h" #endif +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TOGGLEBUTTON_CLICKED wxEVT_TOGGLEBUTTON + #endif // wxUSE_TOGGLEBTN #endif // _WX_TOGGLEBUTTON_H_BASE_ diff --git a/Externals/wxWidgets3/include/wx/thread.h b/Externals/wxWidgets3/include/wx/thread.h index 59ccfc952a..6806d82fea 100644 --- a/Externals/wxWidgets3/include/wx/thread.h +++ b/Externals/wxWidgets3/include/wx/thread.h @@ -5,7 +5,6 @@ // Modified by: Vadim Zeitlin (modifications partly inspired by omnithreads // package from Olivetti & Oracle Research Laboratory) // Created: 04/13/98 -// RCS-ID: $Id: thread.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -86,12 +85,12 @@ enum wxThreadWait #endif }; -// defines the interval of priority +// Obsolete synonyms for wxPRIORITY_XXX for backwards compatibility-only enum { - WXTHREAD_MIN_PRIORITY = 0u, - WXTHREAD_DEFAULT_PRIORITY = 50u, - WXTHREAD_MAX_PRIORITY = 100u + WXTHREAD_MIN_PRIORITY = wxPRIORITY_MIN, + WXTHREAD_DEFAULT_PRIORITY = wxPRIORITY_DEFAULT, + WXTHREAD_MAX_PRIORITY = wxPRIORITY_MAX }; // There are 2 types of mutexes: normal mutexes and recursive ones. The attempt @@ -266,10 +265,6 @@ private: // // if CRITICAL_SECTION size changes in Windows, you'll get an assert from // thread.cpp and will need to increase the buffer size - // - // finally, we need this typedef instead of declaring m_buffer directly - // because otherwise the assert mentioned above wouldn't compile with some - // compilers (notably CodeWarrior 8) #ifdef __WIN64__ typedef char wxCritSectBuffer[40]; #else // __WIN32__ @@ -349,10 +344,23 @@ public: // the lock on the associated mutex object, before returning. wxCondError Wait(); + // std::condition_variable-like variant that evaluates the associated condition + template + wxCondError Wait(const Functor& predicate) + { + while ( !predicate() ) + { + wxCondError e = Wait(); + if ( e != wxCOND_NO_ERROR ) + return e; + } + return wxCOND_NO_ERROR; + } + // exactly as Wait() except that it may also return if the specified // timeout elapses even if the condition hasn't been signalled: in this - // case, the return value is false, otherwise (i.e. in case of a normal - // return) it is true + // case, the return value is wxCOND_TIMEOUT, otherwise (i.e. in case of a + // normal return) it is wxCOND_NO_ERROR. // // the timeout parameter specifies an interval that needs to be waited for // in milliseconds @@ -562,7 +570,8 @@ public: wxThreadError Resume(); // priority - // Sets the priority to "prio": see WXTHREAD_XXX_PRIORITY constants + // Sets the priority to "prio" which must be in 0..100 range (see + // also wxPRIORITY_XXX constants). // // NB: the priority can only be set before the thread is created void SetPriority(unsigned int prio); @@ -605,6 +614,8 @@ protected: // of this thread. virtual void *Entry() = 0; + // use this to call the Entry() virtual method + void *CallEntry(); // Callbacks which may be overridden by the derived class to perform some // specific actions when the thread is deleted or killed. By default they @@ -844,7 +855,7 @@ public: #if wxUSE_THREADS -#if defined(__WINDOWS__) || defined(__OS2__) || defined(__EMX__) || defined(__WXOSX__) +#if defined(__WINDOWS__) || defined(__OS2__) || defined(__EMX__) || defined(__DARWIN__) // unlock GUI if there are threads waiting for and lock it back when // there are no more of them - should be called periodically by the main // thread @@ -856,7 +867,7 @@ public: // wakes up the main thread if it's sleeping inside ::GetMessage() extern void WXDLLIMPEXP_BASE wxWakeUpMainThread(); -#ifndef __WXOSX__ +#ifndef __DARWIN__ // return true if the main thread is waiting for some other to terminate: // wxApp then should block all "dangerous" messages extern bool WXDLLIMPEXP_BASE wxIsWaitingForThread(); diff --git a/Externals/wxWidgets3/include/wx/thrimpl.cpp b/Externals/wxWidgets3/include/wx/thrimpl.cpp index 39a75a770b..000b24d589 100644 --- a/Externals/wxWidgets3/include/wx/thrimpl.cpp +++ b/Externals/wxWidgets3/include/wx/thrimpl.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 04.06.02 (extracted from src/*/thread.cpp files) -// RCS-ID: $Id: thrimpl.cpp 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) Vadim Zeitlin (2002) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -343,8 +342,16 @@ wxSemaError wxSemaphore::Post() // ---------------------------------------------------------------------------- #include "wx/utils.h" +#include "wx/private/threadinfo.h" +#include "wx/scopeguard.h" void wxThread::Sleep(unsigned long milliseconds) { wxMilliSleep(milliseconds); } + +void *wxThread::CallEntry() +{ + wxON_BLOCK_EXIT0(wxThreadSpecificInfo::ThreadCleanUp); + return Entry(); +} diff --git a/Externals/wxWidgets3/include/wx/time.h b/Externals/wxWidgets3/include/wx/time.h index 4dc6bf8d19..644422392f 100644 --- a/Externals/wxWidgets3/include/wx/time.h +++ b/Externals/wxWidgets3/include/wx/time.h @@ -3,7 +3,6 @@ // Purpose: Miscellaneous time-related functions. // Author: Vadim Zeitlin // Created: 2011-11-26 -// RCS-ID: $Id: time.h 69846 2011-11-27 20:28:43Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/timectrl.h b/Externals/wxWidgets3/include/wx/timectrl.h index 832cc67708..928d9aedf3 100644 --- a/Externals/wxWidgets3/include/wx/timectrl.h +++ b/Externals/wxWidgets3/include/wx/timectrl.h @@ -3,7 +3,6 @@ // Purpose: Declaration of wxTimePickerCtrl class. // Author: Vadim Zeitlin // Created: 2011-09-22 -// RCS-ID: $Id: timectrl.h 70071 2011-12-20 21:27:14Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -50,9 +49,42 @@ public: /* We also inherit Set/GetValue() methods from the base class which define our public API. Notice that the date portion of the date passed as - input is ignored and for the result date it's always today, but only - the time part of wxDateTime objects is really significant here. + input or received as output is or should be ignored, only the time part + of wxDateTime objects is really significant here. Use Set/GetTime() + below for possibly simpler interface. */ + + // Set the given time. + bool SetTime(int hour, int min, int sec) + { + // Notice that we should use a date on which DST doesn't change to + // avoid any problems with time discontinuity so use a fixed date (on + // which nobody changes DST) instead of e.g. today. + wxDateTime dt(1, wxDateTime::Jan, 2012, hour, min, sec); + if ( !dt.IsValid() ) + { + // No need to assert here, wxDateTime already does it for us. + return false; + } + + SetValue(dt); + + return true; + } + + // Get the current time components. All pointers must be non-NULL. + bool GetTime(int* hour, int* min, int* sec) const + { + wxCHECK_MSG( hour && min && sec, false, + wxS("Time component pointers must be non-NULL") ); + + const wxDateTime::Tm tm = GetValue().GetTm(); + *hour = tm.hour; + *min = tm.min; + *sec = tm.sec; + + return true; + } }; #if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) diff --git a/Externals/wxWidgets3/include/wx/timer.h b/Externals/wxWidgets3/include/wx/timer.h index 5400c76b23..8ee5684e00 100644 --- a/Externals/wxWidgets3/include/wx/timer.h +++ b/Externals/wxWidgets3/include/wx/timer.h @@ -5,7 +5,6 @@ // Modified by: Vadim Zeitlin (wxTimerBase) // Guillermo Rodriguez (global clean up) // Created: 04/01/98 -// RCS-ID: $Id: timer.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -81,6 +80,10 @@ public: // timer if it is already running virtual bool Start(int milliseconds = -1, bool oneShot = false); + // start the timer for one iteration only, this is just a simple wrapper + // for Start() + bool StartOnce(int milliseconds = -1) { return Start(milliseconds, true); } + // stop the timer, does nothing if the timer is not running virtual void Stop(); diff --git a/Externals/wxWidgets3/include/wx/tipdlg.h b/Externals/wxWidgets3/include/wx/tipdlg.h index b5d0361249..e0093855fb 100644 --- a/Externals/wxWidgets3/include/wx/tipdlg.h +++ b/Externals/wxWidgets3/include/wx/tipdlg.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 28.06.99 -// RCS-ID: $Id: tipdlg.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/tipwin.h b/Externals/wxWidgets3/include/wx/tipwin.h index 94ec56305f..a2ca0f13e2 100644 --- a/Externals/wxWidgets3/include/wx/tipwin.h +++ b/Externals/wxWidgets3/include/wx/tipwin.h @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 10.09.00 -// RCS-ID: $Id: tipwin.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2000 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/tls.h b/Externals/wxWidgets3/include/wx/tls.h index 0dfa87d2c5..6a4ee03786 100644 --- a/Externals/wxWidgets3/include/wx/tls.h +++ b/Externals/wxWidgets3/include/wx/tls.h @@ -3,7 +3,6 @@ // Purpose: Implementation of thread local storage // Author: Vadim Zeitlin // Created: 2008-08-08 -// RCS-ID: $Id: tls.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -22,10 +21,13 @@ #if !wxUSE_THREADS #define wxHAS_COMPILER_TLS #define wxTHREAD_SPECIFIC_DECL +// otherwise try to find the compiler-specific way to handle TLS unless +// explicitly disabled by setting wxUSE_COMPILER_TLS to 0 (it is 1 by default). +#elif wxUSE_COMPILER_TLS // __thread keyword is not supported correctly by MinGW, at least in some // configurations, see http://sourceforge.net/support/tracker.php?aid=2837047 // and when in doubt we prefer to not use it at all. -#elif defined(HAVE___THREAD_KEYWORD) && !defined(__MINGW32__) +#if defined(HAVE___THREAD_KEYWORD) && !defined(__MINGW32__) #define wxHAS_COMPILER_TLS #define wxTHREAD_SPECIFIC_DECL __thread // MSVC has its own version which might be supported by some other Windows @@ -33,7 +35,8 @@ #elif wxCHECK_VISUALC_VERSION(7) #define wxHAS_COMPILER_TLS #define wxTHREAD_SPECIFIC_DECL __declspec(thread) -#endif +#endif // compilers +#endif // wxUSE_COMPILER_TLS // ---------------------------------------------------------------------------- // define wxTLS_TYPE() diff --git a/Externals/wxWidgets3/include/wx/tokenzr.h b/Externals/wxWidgets3/include/wx/tokenzr.h index 9243bc3cb8..2eb6519709 100644 --- a/Externals/wxWidgets3/include/wx/tokenzr.h +++ b/Externals/wxWidgets3/include/wx/tokenzr.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: (or rather rewritten by) Vadim Zeitlin // Created: 04/22/98 -// RCS-ID: $Id: tokenzr.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/toolbar.h b/Externals/wxWidgets3/include/wx/toolbar.h index 5e6298320e..49a446e777 100644 --- a/Externals/wxWidgets3/include/wx/toolbar.h +++ b/Externals/wxWidgets3/include/wx/toolbar.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 20.11.99 -// RCS-ID: $Id: toolbar.h 70345 2012-01-15 01:05:28Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -60,7 +59,9 @@ enum wxTB_BOTTOM = 0x2000, // lay out toolbar at the right edge of the window - wxTB_RIGHT = 0x4000 + wxTB_RIGHT = 0x4000, + + wxTB_DEFAULT_STYLE = wxTB_HORIZONTAL | wxTB_FLAT }; #if wxUSE_TOOLBAR diff --git a/Externals/wxWidgets3/include/wx/toolbook.h b/Externals/wxWidgets3/include/wx/toolbook.h index 2efd27434e..45730cd9c4 100644 --- a/Externals/wxWidgets3/include/wx/toolbook.h +++ b/Externals/wxWidgets3/include/wx/toolbook.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 2006-01-29 -// RCS-ID: $Id: toolbook.h 68810 2011-08-21 14:08:49Z VZ $ // Copyright: (c) 2006 Julian Smart // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -17,12 +16,13 @@ #if wxUSE_TOOLBOOK #include "wx/bookctrl.h" +#include "wx/containr.h" class WXDLLIMPEXP_FWD_CORE wxToolBarBase; class WXDLLIMPEXP_FWD_CORE wxCommandEvent; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TOOLBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TOOLBOOK_PAGE_CHANGING, wxBookCtrlEvent ); // Use wxButtonToolBar @@ -40,7 +40,7 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING // wxToolbook // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxToolbook : public wxBookCtrlBase +class WXDLLIMPEXP_CORE wxToolbook : public wxNavigationEnabled { public: wxToolbook() @@ -128,16 +128,20 @@ private: // ---------------------------------------------------------------------------- // wxToolbookEvent is obsolete and defined for compatibility only -typedef wxBookCtrlEvent wxToolbookEvent; +#define wxToolbookEvent wxBookCtrlEvent typedef wxBookCtrlEventFunction wxToolbookEventFunction; #define wxToolbookEventHandler(func) wxBookCtrlEventHandler(func) #define EVT_TOOLBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TOOLBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) #define EVT_TOOLBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TOOLBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGED wxEVT_TOOLBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING wxEVT_TOOLBOOK_PAGE_CHANGING #endif // wxUSE_TOOLBOOK diff --git a/Externals/wxWidgets3/include/wx/tooltip.h b/Externals/wxWidgets3/include/wx/tooltip.h index b8a1da9c86..0948e65eff 100644 --- a/Externals/wxWidgets3/include/wx/tooltip.h +++ b/Externals/wxWidgets3/include/wx/tooltip.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Robert Roebling -// RCS-ID: $Id: tooltip.h 67254 2011-03-20 00:14:35Z DS $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/toplevel.h b/Externals/wxWidgets3/include/wx/toplevel.h index bf1049350c..b36b30e6cf 100644 --- a/Externals/wxWidgets3/include/wx/toplevel.h +++ b/Externals/wxWidgets3/include/wx/toplevel.h @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin, Vaclav Slavik // Modified by: // Created: 06.08.01 -// RCS-ID: $Id: toplevel.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) 2001 Vadim Zeitlin // Vaclav Slavik // Licence: wxWindows licence @@ -20,7 +19,6 @@ #include "wx/nonownedwnd.h" #include "wx/iconbndl.h" -#include "wx/containr.h" #include "wx/weakref.h" // the default names for various classes @@ -157,8 +155,7 @@ enum // wxTopLevelWindow: a top level (as opposed to child) window // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxTopLevelWindowBase : - public wxNavigationEnabled +class WXDLLIMPEXP_CORE wxTopLevelWindowBase : public wxNonOwnedWindow { public: // construction @@ -224,7 +221,9 @@ public: virtual void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO); // Is this the active frame (highlighted in the taskbar)? - virtual bool IsActive() { return wxGetTopLevelParent(FindFocus()) == this; } + // + // A TLW is active only if it contains the currently focused window. + virtual bool IsActive() { return IsDescendant(FindFocus()); } // this function may be overridden to return false to allow closing the // application even when this top level window is still open @@ -270,7 +269,6 @@ public: wxWindow *SetTmpDefaultItem(wxWindow *win) { wxWindow *old = GetDefaultItem(); m_winTmpDefault = win; return old; } - // implementation only from now on // ------------------------------- @@ -303,6 +301,13 @@ public: virtual void SetRepresentedFilename(const wxString& WXUNUSED(filename)) { } +#if wxUSE_MENUS || wxUSE_TOOLBAR + // show help text for the currently selected menu or toolbar item + // (typically in the status bar) or hide it and restore the status bar text + // originally shown before the menu was opened if show == false + virtual void DoGiveHelp(const wxString& WXUNUSED(text), bool WXUNUSED(show)) {} +#endif + protected: // the frame client to screen translation should take account of the // toolbar which may shift the origin of the client area diff --git a/Externals/wxWidgets3/include/wx/tracker.h b/Externals/wxWidgets3/include/wx/tracker.h index 94afcab73f..d8f272822c 100644 --- a/Externals/wxWidgets3/include/wx/tracker.h +++ b/Externals/wxWidgets3/include/wx/tracker.h @@ -3,7 +3,6 @@ // Purpose: Support class for object lifetime tracking (wxWeakRef) // Author: Arne Steinarson // Created: 28 Dec 07 -// RCS-ID: $Id: tracker.h 51448 2008-01-29 17:41:10Z RD $ // Copyright: (c) 2007 Arne Steinarson // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/translation.h b/Externals/wxWidgets3/include/wx/translation.h index 1320e75953..187caf366b 100644 --- a/Externals/wxWidgets3/include/wx/translation.h +++ b/Externals/wxWidgets3/include/wx/translation.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin, Vaclav Slavik, // Michael N. Filippov // Created: 2010-04-23 -// RCS-ID: $Id: translation.h 64597 2010-06-16 14:09:32Z VS $ // Copyright: (c) 1998 Vadim Zeitlin // (c) 2010 Vaclav Slavik // Licence: wxWindows licence @@ -132,6 +131,11 @@ public: // get languages available for this app wxArrayString GetAvailableTranslations(const wxString& domain) const; + // find best translation language for given domain + wxString GetBestTranslation(const wxString& domain, wxLanguage msgIdLanguage); + wxString GetBestTranslation(const wxString& domain, + const wxString& msgIdLanguage = "en"); + // add standard wxWidgets catalog ("wxstd") bool AddStdCatalog(); @@ -149,12 +153,11 @@ public: bool IsLoaded(const wxString& domain) const; // access to translations - const wxString& GetString(const wxString& origString, - const wxString& domain = wxEmptyString) const; - const wxString& GetString(const wxString& origString, - const wxString& origString2, - unsigned n, - const wxString& domain = wxEmptyString) const; + const wxString *GetTranslatedString(const wxString& origString, + const wxString& domain = wxEmptyString) const; + const wxString *GetTranslatedString(const wxString& origString, + unsigned n, + const wxString& domain = wxEmptyString) const; wxString GetHeaderValue(const wxString& header, const wxString& domain = wxEmptyString) const; @@ -166,11 +169,7 @@ public: private: // perform loading of the catalog via m_loader - bool LoadCatalog(const wxString& domain, const wxString& lang); - - // find best translation for given domain - wxString ChooseLanguageForDomain(const wxString& domain, - const wxString& msgIdLang); + bool LoadCatalog(const wxString& domain, const wxString& lang, const wxString& msgIdLang); // find catalog by name in a linked list, return NULL if !found wxMsgCatalog *FindCatalog(const wxString& domain) const; @@ -242,11 +241,13 @@ protected: // get the translation of the string in the current locale inline const wxString& wxGetTranslation(const wxString& str, - const wxString& domain = wxEmptyString) + const wxString& domain = wxString()) { wxTranslations *trans = wxTranslations::Get(); - if ( trans ) - return trans->GetString(str, domain); + const wxString *transStr = trans ? trans->GetTranslatedString(str, domain) + : NULL; + if ( transStr ) + return *transStr; else // NB: this function returns reference to a string, so we have to keep // a copy of it somewhere @@ -256,11 +257,13 @@ inline const wxString& wxGetTranslation(const wxString& str, inline const wxString& wxGetTranslation(const wxString& str1, const wxString& str2, unsigned n, - const wxString& domain = wxEmptyString) + const wxString& domain = wxString()) { wxTranslations *trans = wxTranslations::Get(); - if ( trans ) - return trans->GetString(str1, str2, n, domain); + const wxString *transStr = trans ? trans->GetTranslatedString(str1, n, domain) + : NULL; + if ( transStr ) + return *transStr; else // NB: this function returns reference to a string, so we have to keep // a copy of it somewhere diff --git a/Externals/wxWidgets3/include/wx/treebase.h b/Externals/wxWidgets3/include/wx/treebase.h index dc03d28f88..4efbf05074 100644 --- a/Externals/wxWidgets3/include/wx/treebase.h +++ b/Externals/wxWidgets3/include/wx/treebase.h @@ -4,7 +4,6 @@ // Author: Julian Smart et al // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: treebase.h 68812 2011-08-21 14:08:56Z VZ $ // Copyright: (c) 1997,1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -257,21 +256,21 @@ public: // accessors // get the item on which the operation was performed or the newly - // selected item for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events + // selected item for wxEVT_TREE_SEL_CHANGED/ING events wxTreeItemId GetItem() const { return m_item; } void SetItem(const wxTreeItemId& item) { m_item = item; } - // for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events, get the previously + // for wxEVT_TREE_SEL_CHANGED/ING events, get the previously // selected item wxTreeItemId GetOldItem() const { return m_itemOld; } void SetOldItem(const wxTreeItemId& item) { m_itemOld = item; } // the point where the mouse was when the drag operation started (for - // wxEVT_COMMAND_TREE_BEGIN_(R)DRAG events only) or click position + // wxEVT_TREE_BEGIN_(R)DRAG events only) or click position wxPoint GetPoint() const { return m_pointDrag; } void SetPoint(const wxPoint& pt) { m_pointDrag = pt; } - // keyboard data (for wxEVT_COMMAND_TREE_KEY_DOWN only) + // keyboard data (for wxEVT_TREE_KEY_DOWN only) const wxKeyEvent& GetKeyEvent() const { return m_evtKey; } int GetKeyCode() const { return m_evtKey.GetKeyCode(); } void SetKeyEvent(const wxKeyEvent& evt) { m_evtKey = evt; } @@ -309,33 +308,33 @@ typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&); // tree control events and macros for handling them // ---------------------------------------------------------------------------- -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_BEGIN_DRAG, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_BEGIN_RDRAG, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_END_LABEL_EDIT, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_DELETE_ITEM, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_GET_INFO, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_SET_INFO, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_EXPANDED, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_EXPANDING, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_COLLAPSING, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_SEL_CHANGING, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_KEY_DOWN, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_END_DRAG, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, wxTreeEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_MENU, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_DRAG, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_RDRAG, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_BEGIN_LABEL_EDIT, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_END_LABEL_EDIT, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_DELETE_ITEM, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_GET_INFO, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SET_INFO, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_EXPANDED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_EXPANDING, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_COLLAPSED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_COLLAPSING, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SEL_CHANGED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_SEL_CHANGING, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_KEY_DOWN, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_ACTIVATED, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_RIGHT_CLICK, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_MIDDLE_CLICK, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_END_DRAG, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_STATE_IMAGE_CLICK, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_GETTOOLTIP, wxTreeEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREE_ITEM_MENU, wxTreeEvent ); #define wxTreeEventHandler(func) \ wxEVENT_HANDLER_CAST(wxTreeEventFunction, func) #define wx__DECLARE_TREEEVT(evt, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREE_ ## evt, id, wxTreeEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREE_ ## evt, id, wxTreeEventHandler(fn)) // GetItem() returns the item being dragged, GetPoint() the mouse coords // @@ -396,6 +395,29 @@ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREE_ITEM_MENU, wxTree // GetItem() is the item for which the tooltip is being requested #define EVT_TREE_ITEM_GETTOOLTIP(id, fn) wx__DECLARE_TREEEVT(ITEM_GETTOOLTIP, id, fn) +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREE_BEGIN_DRAG wxEVT_TREE_BEGIN_DRAG +#define wxEVT_COMMAND_TREE_BEGIN_RDRAG wxEVT_TREE_BEGIN_RDRAG +#define wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT wxEVT_TREE_BEGIN_LABEL_EDIT +#define wxEVT_COMMAND_TREE_END_LABEL_EDIT wxEVT_TREE_END_LABEL_EDIT +#define wxEVT_COMMAND_TREE_DELETE_ITEM wxEVT_TREE_DELETE_ITEM +#define wxEVT_COMMAND_TREE_GET_INFO wxEVT_TREE_GET_INFO +#define wxEVT_COMMAND_TREE_SET_INFO wxEVT_TREE_SET_INFO +#define wxEVT_COMMAND_TREE_ITEM_EXPANDED wxEVT_TREE_ITEM_EXPANDED +#define wxEVT_COMMAND_TREE_ITEM_EXPANDING wxEVT_TREE_ITEM_EXPANDING +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSED wxEVT_TREE_ITEM_COLLAPSED +#define wxEVT_COMMAND_TREE_ITEM_COLLAPSING wxEVT_TREE_ITEM_COLLAPSING +#define wxEVT_COMMAND_TREE_SEL_CHANGED wxEVT_TREE_SEL_CHANGED +#define wxEVT_COMMAND_TREE_SEL_CHANGING wxEVT_TREE_SEL_CHANGING +#define wxEVT_COMMAND_TREE_KEY_DOWN wxEVT_TREE_KEY_DOWN +#define wxEVT_COMMAND_TREE_ITEM_ACTIVATED wxEVT_TREE_ITEM_ACTIVATED +#define wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK wxEVT_TREE_ITEM_RIGHT_CLICK +#define wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK wxEVT_TREE_ITEM_MIDDLE_CLICK +#define wxEVT_COMMAND_TREE_END_DRAG wxEVT_TREE_END_DRAG +#define wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK wxEVT_TREE_STATE_IMAGE_CLICK +#define wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP wxEVT_TREE_ITEM_GETTOOLTIP +#define wxEVT_COMMAND_TREE_ITEM_MENU wxEVT_TREE_ITEM_MENU + #endif // wxUSE_TREECTRL #endif // _WX_TREEBASE_H_ diff --git a/Externals/wxWidgets3/include/wx/treebook.h b/Externals/wxWidgets3/include/wx/treebook.h index 86bdf0b0da..bd59338952 100644 --- a/Externals/wxWidgets3/include/wx/treebook.h +++ b/Externals/wxWidgets3/include/wx/treebook.h @@ -4,7 +4,6 @@ // Author: Evgeniy Tarassov, Vadim Zeitlin // Modified by: // Created: 2005-09-15 -// RCS-ID: $Id: treebook.h 68810 2011-08-21 14:08:49Z VZ $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -17,6 +16,7 @@ #if wxUSE_TREEBOOK #include "wx/bookctrl.h" +#include "wx/containr.h" #include "wx/treectrl.h" // for wxArrayTreeItemIds typedef wxWindow wxTreebookPage; @@ -27,7 +27,7 @@ class WXDLLIMPEXP_FWD_CORE wxTreeEvent; // wxTreebook // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxTreebook : public wxBookCtrlBase +class WXDLLIMPEXP_CORE wxTreebook : public wxNavigationEnabled { public: // Constructors and such @@ -229,27 +229,33 @@ private: // ---------------------------------------------------------------------------- // wxTreebookEvent is obsolete and defined for compatibility only -typedef wxBookCtrlEvent wxTreebookEvent; +#define wxTreebookEvent wxBookCtrlEvent typedef wxBookCtrlEventFunction wxTreebookEventFunction; #define wxTreebookEventHandler(func) wxBookCtrlEventHandler(func) -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED, wxBookCtrlEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_PAGE_CHANGED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_PAGE_CHANGING, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_NODE_COLLAPSED, wxBookCtrlEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_CORE, wxEVT_TREEBOOK_NODE_EXPANDED, wxBookCtrlEvent ); #define EVT_TREEBOOK_PAGE_CHANGED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREEBOOK_PAGE_CHANGED, winid, wxBookCtrlEventHandler(fn)) #define EVT_TREEBOOK_PAGE_CHANGING(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREEBOOK_PAGE_CHANGING, winid, wxBookCtrlEventHandler(fn)) #define EVT_TREEBOOK_NODE_COLLAPSED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREEBOOK_NODE_COLLAPSED, winid, wxBookCtrlEventHandler(fn)) #define EVT_TREEBOOK_NODE_EXPANDED(winid, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED, winid, wxBookCtrlEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREEBOOK_NODE_EXPANDED, winid, wxBookCtrlEventHandler(fn)) + +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED wxEVT_TREEBOOK_PAGE_CHANGED +#define wxEVT_COMMAND_TREEBOOK_PAGE_CHANGING wxEVT_TREEBOOK_PAGE_CHANGING +#define wxEVT_COMMAND_TREEBOOK_NODE_COLLAPSED wxEVT_TREEBOOK_NODE_COLLAPSED +#define wxEVT_COMMAND_TREEBOOK_NODE_EXPANDED wxEVT_TREEBOOK_NODE_EXPANDED #endif // wxUSE_TREEBOOK diff --git a/Externals/wxWidgets3/include/wx/treectrl.h b/Externals/wxWidgets3/include/wx/treectrl.h index feefbd7638..89493c3bbb 100644 --- a/Externals/wxWidgets3/include/wx/treectrl.h +++ b/Externals/wxWidgets3/include/wx/treectrl.h @@ -5,7 +5,6 @@ // Modified by: // Created: // Copyright: (c) Karsten Ballueder -// RCS-ID: $Id: treectrl.h 70345 2012-01-15 01:05:28Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -289,10 +288,10 @@ public: // delete this item and associated data if any virtual void Delete(const wxTreeItemId& item) = 0; // delete all children (but don't delete the item itself) - // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events + // NB: this won't send wxEVT_TREE_ITEM_DELETED events virtual void DeleteChildren(const wxTreeItemId& item) = 0; // delete all items from the tree - // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events + // NB: this won't send wxEVT_TREE_ITEM_DELETED events virtual void DeleteAllItems() = 0; // expand this item @@ -349,6 +348,10 @@ public: virtual void EndEditLabel(const wxTreeItemId& item, bool discardChanges = false) = 0; + // Enable or disable beep when incremental match doesn't find any item. + // Only implemented in the generic version currently. + virtual void EnableBellOnNoMatch(bool WXUNUSED(on) = true) { } + // sorting // ------- diff --git a/Externals/wxWidgets3/include/wx/treelist.h b/Externals/wxWidgets3/include/wx/treelist.h index bb4f3b0f11..d06e35e869 100644 --- a/Externals/wxWidgets3/include/wx/treelist.h +++ b/Externals/wxWidgets3/include/wx/treelist.h @@ -3,7 +3,6 @@ // Purpose: wxTreeListCtrl class declaration. // Author: Vadim Zeitlin // Created: 2011-08-17 -// RCS-ID: $Id: treelist.h 69619 2011-10-31 19:41:06Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -47,6 +46,7 @@ enum wxTL_CHECKBOX = 0x0002, // Show checkboxes in the first column. wxTL_3STATE = 0x0004, // Allow 3rd state in checkboxes. wxTL_USER_3STATE = 0x0008, // Allow user to set 3rd state. + wxTL_NO_HEADER = 0x0010, // Column titles not visible. wxTL_DEFAULT_STYLE = wxTL_SINGLE, wxTL_STYLE_MASK = wxTL_SINGLE | @@ -453,7 +453,7 @@ private: // wxTreeListEvent: event generated by wxTreeListCtrl. // ---------------------------------------------------------------------------- -class wxTreeListEvent : public wxNotifyEvent +class WXDLLIMPEXP_ADV wxTreeListEvent : public wxNotifyEvent { public: // Default ctor is provided for wxRTTI needs only but should never be used. @@ -514,7 +514,7 @@ private: friend class wxTreeListCtrl; - wxDECLARE_DYNAMIC_CLASS(wxTreeListEvent); + wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTreeListEvent); }; // Event types and event table macros. @@ -525,11 +525,11 @@ typedef void (wxEvtHandler::*wxTreeListEventFunction)(wxTreeListEvent&); wxEVENT_HANDLER_CAST(wxTreeListEventFunction, func) #define wxEVT_TREELIST_GENERIC(name, id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_TREELIST_##name, id, wxTreeListEventHandler(fn)) + wx__DECLARE_EVT1(wxEVT_TREELIST_##name, id, wxTreeListEventHandler(fn)) #define wxDECLARE_TREELIST_EVENT(name) \ wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_ADV, \ - wxEVT_COMMAND_TREELIST_##name, \ + wxEVT_TREELIST_##name, \ wxTreeListEvent) wxDECLARE_TREELIST_EVENT(SELECTION_CHANGED); @@ -562,6 +562,15 @@ wxDECLARE_TREELIST_EVENT(COLUMN_SORTED); #undef wxDECLARE_TREELIST_EVENT +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_TREELIST_SELECTION_CHANGED wxEVT_TREELIST_SELECTION_CHANGED +#define wxEVT_COMMAND_TREELIST_ITEM_EXPANDING wxEVT_TREELIST_ITEM_EXPANDING +#define wxEVT_COMMAND_TREELIST_ITEM_EXPANDED wxEVT_TREELIST_ITEM_EXPANDED +#define wxEVT_COMMAND_TREELIST_ITEM_CHECKED wxEVT_TREELIST_ITEM_CHECKED +#define wxEVT_COMMAND_TREELIST_ITEM_ACTIVATED wxEVT_TREELIST_ITEM_ACTIVATED +#define wxEVT_COMMAND_TREELIST_ITEM_CONTEXT_MENU wxEVT_TREELIST_ITEM_CONTEXT_MENU +#define wxEVT_COMMAND_TREELIST_COLUMN_SORTED wxEVT_TREELIST_COLUMN_SORTED + #endif // wxUSE_TREELISTCTRL #endif // _WX_TREELIST_H_ diff --git a/Externals/wxWidgets3/include/wx/txtstrm.h b/Externals/wxWidgets3/include/wx/txtstrm.h index c7376c818e..90e6bbb22a 100644 --- a/Externals/wxWidgets3/include/wx/txtstrm.h +++ b/Externals/wxWidgets3/include/wx/txtstrm.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: // Created: 28/06/1998 -// RCS-ID: $Id: txtstrm.h 67286 2011-03-22 17:15:45Z VZ $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/typeinfo.h b/Externals/wxWidgets3/include/wx/typeinfo.h index 3eac14c2dc..a783af5d56 100644 --- a/Externals/wxWidgets3/include/wx/typeinfo.h +++ b/Externals/wxWidgets3/include/wx/typeinfo.h @@ -3,7 +3,6 @@ // Purpose: wxTypeId implementation // Author: Jaakko Salli // Created: 2009-11-19 -// RCS-ID: $Id: typeinfo.h 66734 2011-01-23 10:13:49Z JMS $ // Copyright: (c) wxWidgets Team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/types.h b/Externals/wxWidgets3/include/wx/types.h index 5be184cfe6..2e58582168 100644 --- a/Externals/wxWidgets3/include/wx/types.h +++ b/Externals/wxWidgets3/include/wx/types.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: types.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/uiaction.h b/Externals/wxWidgets3/include/wx/uiaction.h index af2b162c49..fb96523544 100644 --- a/Externals/wxWidgets3/include/wx/uiaction.h +++ b/Externals/wxWidgets3/include/wx/uiaction.h @@ -4,7 +4,6 @@ // Author: Kevin Ollivier, Steven Lamerton, Vadim Zeitlin // Modified by: // Created: 2010-03-06 -// RCS-ID: $Id: uiaction.h 69762 2011-11-15 15:56:55Z VZ $ // Copyright: (c) Kevin Ollivier // (c) 2010 Steven Lamerton // (c) 2010 Vadim Zeitlin @@ -45,7 +44,9 @@ public: bool MouseDblClick(int button = wxMOUSE_BTN_LEFT); bool MouseDragDrop(long x1, long y1, long x2, long y2, int button = wxMOUSE_BTN_LEFT); - + bool MouseDragDrop(const wxPoint& p1, const wxPoint& p2, + int button = wxMOUSE_BTN_LEFT) + { return MouseDragDrop(p1.x, p1.y, p2.x, p2.y, button); } // Keyboard simulation // ------------------- diff --git a/Externals/wxWidgets3/include/wx/unichar.h b/Externals/wxWidgets3/include/wx/unichar.h index 730152f938..a661e5a4e2 100644 --- a/Externals/wxWidgets3/include/wx/unichar.h +++ b/Externals/wxWidgets3/include/wx/unichar.h @@ -3,7 +3,6 @@ // Purpose: wxUniChar and wxUniCharRef classes // Author: Vaclav Slavik // Created: 2007-03-19 -// RCS-ID: $Id: unichar.h 62738 2009-11-28 14:37:03Z VZ $ // Copyright: (c) 2007 REA Elektronik GmbH // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -35,17 +34,10 @@ public: wxUniChar(char c) { m_value = From8bit(c); } wxUniChar(unsigned char c) { m_value = From8bit((char)c); } - // Create the character from a wchar_t character value. -#if wxWCHAR_T_IS_REAL_TYPE - wxUniChar(wchar_t c) { m_value = c; } -#endif - - wxUniChar(int c) { m_value = c; } - wxUniChar(unsigned int c) { m_value = c; } - wxUniChar(long int c) { m_value = c; } - wxUniChar(unsigned long int c) { m_value = c; } - wxUniChar(short int c) { m_value = c; } - wxUniChar(unsigned short int c) { m_value = c; } +#define wxUNICHAR_DEFINE_CTOR(type) \ + wxUniChar(type c) { m_value = (value_type)c; } + wxDO_FOR_INT_TYPES(wxUNICHAR_DEFINE_CTOR) +#undef wxUNICHAR_DEFINE_CTOR wxUniChar(const wxUniCharRef& c); @@ -94,15 +86,11 @@ public: // functions operator char() const { return To8bit(m_value); } operator unsigned char() const { return (unsigned char)To8bit(m_value); } -#if wxWCHAR_T_IS_REAL_TYPE - operator wchar_t() const { return (wchar_t)m_value; } -#endif - operator int() const { return (int)m_value; } - operator unsigned int() const { return (unsigned int)m_value; } - operator long int() const { return (long int)m_value; } - operator unsigned long int() const { return (unsigned long)m_value; } - operator short int() const { return (short int)m_value; } - operator unsigned short int() const { return (unsigned short int)m_value; } + +#define wxUNICHAR_DEFINE_OPERATOR_PAREN(type) \ + operator type() const { return (type)m_value; } + wxDO_FOR_INT_TYPES(wxUNICHAR_DEFINE_OPERATOR_PAREN) +#undef wxUNICHAR_DEFINE_OPERATOR_PAREN // We need this operator for the "*p" part of expressions like "for ( // const_iterator p = begin() + nStart; *p; ++p )". In this case, @@ -121,34 +109,27 @@ public: wxUniChar& operator=(const wxUniCharRef& c); wxUniChar& operator=(char c) { m_value = From8bit(c); return *this; } wxUniChar& operator=(unsigned char c) { m_value = From8bit((char)c); return *this; } -#if wxWCHAR_T_IS_REAL_TYPE - wxUniChar& operator=(wchar_t c) { m_value = c; return *this; } -#endif - wxUniChar& operator=(int c) { m_value = c; return *this; } - wxUniChar& operator=(unsigned int c) { m_value = c; return *this; } - wxUniChar& operator=(long int c) { m_value = c; return *this; } - wxUniChar& operator=(unsigned long int c) { m_value = c; return *this; } - wxUniChar& operator=(short int c) { m_value = c; return *this; } - wxUniChar& operator=(unsigned short int c) { m_value = c; return *this; } + +#define wxUNICHAR_DEFINE_OPERATOR_EQUAL(type) \ + wxUniChar& operator=(type c) { m_value = (value_type)c; return *this; } + wxDO_FOR_INT_TYPES(wxUNICHAR_DEFINE_OPERATOR_EQUAL) +#undef wxUNICHAR_DEFINE_OPERATOR_EQUAL // Comparison operators: +#define wxDEFINE_UNICHAR_CMP_WITH_INT(T, op) \ + bool operator op(T c) const { return m_value op (value_type)c; } // define the given comparison operator for all the types #define wxDEFINE_UNICHAR_OPERATOR(op) \ bool operator op(const wxUniChar& c) const { return m_value op c.m_value; }\ bool operator op(char c) const { return m_value op From8bit(c); } \ bool operator op(unsigned char c) const { return m_value op From8bit((char)c); } \ - wxIF_WCHAR_T_TYPE( bool operator op(wchar_t c) const { return m_value op (value_type)c; } ) \ - bool operator op(int c) const { return m_value op (value_type)c; } \ - bool operator op(unsigned int c) const { return m_value op (value_type)c; } \ - bool operator op(short int c) const { return m_value op (value_type)c; } \ - bool operator op(unsigned short int c) const { return m_value op (value_type)c; } \ - bool operator op(long int c) const { return m_value op (value_type)c; } \ - bool operator op(unsigned long int c) const { return m_value op (value_type)c; } + wxDO_FOR_INT_TYPES_1(wxDEFINE_UNICHAR_CMP_WITH_INT, op) wxFOR_ALL_COMPARISONS(wxDEFINE_UNICHAR_OPERATOR) #undef wxDEFINE_UNICHAR_OPERATOR +#undef wxDEFINE_UNCHAR_CMP_WITH_INT // this is needed for expressions like 'Z'-c int operator-(const wxUniChar& c) const { return m_value - c.m_value; } @@ -243,53 +224,35 @@ public: wxUniCharRef& operator=(const wxUniCharRef& c) { if (&c != this) *this = c.UniChar(); return *this; } - wxUniCharRef& operator=(char c) { return *this = wxUniChar(c); } - wxUniCharRef& operator=(unsigned char c) { return *this = wxUniChar(c); } -#if wxWCHAR_T_IS_REAL_TYPE - wxUniCharRef& operator=(wchar_t c) { return *this = wxUniChar(c); } -#endif - wxUniCharRef& operator=(int c) { return *this = wxUniChar(c); } - wxUniCharRef& operator=(unsigned int c) { return *this = wxUniChar(c); } - wxUniCharRef& operator=(short int c) { return *this = wxUniChar(c); } - wxUniCharRef& operator=(unsigned short int c) { return *this = wxUniChar(c); } - wxUniCharRef& operator=(long int c) { return *this = wxUniChar(c); } - wxUniCharRef& operator=(unsigned long int c) { return *this = wxUniChar(c); } +#define wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL(type) \ + wxUniCharRef& operator=(type c) { return *this = wxUniChar(c); } + wxDO_FOR_CHAR_INT_TYPES(wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL) +#undef wxUNICHAR_REF_DEFINE_OPERATOR_EQUAL // Conversions to the same types as wxUniChar is convertible too: - operator char() const { return UniChar(); } - operator unsigned char() const { return UniChar(); } -#if wxWCHAR_T_IS_REAL_TYPE - operator wchar_t() const { return UniChar(); } -#endif - operator int() const { return UniChar(); } - operator unsigned int() const { return UniChar(); } - operator short int() const { return UniChar(); } - operator unsigned short int() const { return UniChar(); } - operator long int() const { return UniChar(); } - operator unsigned long int() const { return UniChar(); } +#define wxUNICHAR_REF_DEFINE_OPERATOR_PAREN(type) \ + operator type() const { return UniChar(); } + wxDO_FOR_CHAR_INT_TYPES(wxUNICHAR_REF_DEFINE_OPERATOR_PAREN) +#undef wxUNICHAR_REF_DEFINE_OPERATOR_PAREN // see wxUniChar::operator bool etc. for explanation operator bool() const { return (bool)UniChar(); } bool operator!() const { return !UniChar(); } bool operator&&(bool v) const { return UniChar() && v; } +#define wxDEFINE_UNICHARREF_CMP_WITH_INT(T, op) \ + bool operator op(T c) const { return UniChar() op c; } + // Comparison operators: #define wxDEFINE_UNICHARREF_OPERATOR(op) \ bool operator op(const wxUniCharRef& c) const { return UniChar() op c.UniChar(); }\ bool operator op(const wxUniChar& c) const { return UniChar() op c; } \ - bool operator op(char c) const { return UniChar() op c; } \ - bool operator op(unsigned char c) const { return UniChar() op c; } \ - wxIF_WCHAR_T_TYPE( bool operator op(wchar_t c) const { return UniChar() op c; } ) \ - bool operator op(int c) const { return UniChar() op c; } \ - bool operator op(unsigned int c) const { return UniChar() op c; } \ - bool operator op(short int c) const { return UniChar() op c; } \ - bool operator op(unsigned short int c) const { return UniChar() op c; } \ - bool operator op(long int c) const { return UniChar() op c; } \ - bool operator op(unsigned long int c) const { return UniChar() op c; } + wxDO_FOR_CHAR_INT_TYPES_1(wxDEFINE_UNICHARREF_CMP_WITH_INT, op) wxFOR_ALL_COMPARISONS(wxDEFINE_UNICHARREF_OPERATOR) #undef wxDEFINE_UNICHARREF_OPERATOR +#undef wxDEFINE_UNICHARREF_CMP_WITH_INT // for expressions like c-'A': int operator-(const wxUniCharRef& c) const { return UniChar() - c.UniChar(); } @@ -329,17 +292,13 @@ inline wxUniChar& wxUniChar::operator=(const wxUniCharRef& c) // Comparison operators for the case when wxUniChar(Ref) is the second operand // implemented in terms of member comparison functions -#define wxCMP_REVERSE(c1, c2, op) c2 op c1 +wxDEFINE_COMPARISONS_BY_REV(char, const wxUniChar&) +wxDEFINE_COMPARISONS_BY_REV(char, const wxUniCharRef&) -wxDEFINE_COMPARISONS(char, const wxUniChar&, wxCMP_REVERSE) -wxDEFINE_COMPARISONS(char, const wxUniCharRef&, wxCMP_REVERSE) +wxDEFINE_COMPARISONS_BY_REV(wchar_t, const wxUniChar&) +wxDEFINE_COMPARISONS_BY_REV(wchar_t, const wxUniCharRef&) -wxDEFINE_COMPARISONS(wchar_t, const wxUniChar&, wxCMP_REVERSE) -wxDEFINE_COMPARISONS(wchar_t, const wxUniCharRef&, wxCMP_REVERSE) - -wxDEFINE_COMPARISONS(const wxUniChar&, const wxUniCharRef&, wxCMP_REVERSE) - -#undef wxCMP_REVERSE +wxDEFINE_COMPARISONS_BY_REV(const wxUniChar&, const wxUniCharRef&) // for expressions like c-'A': inline int operator-(char c1, const wxUniCharRef& c2) { return -(c2 - c1); } diff --git a/Externals/wxWidgets3/include/wx/unix/app.h b/Externals/wxWidgets3/include/wx/unix/app.h index bcca5afb95..f14df9ec3f 100644 --- a/Externals/wxWidgets3/include/wx/unix/app.h +++ b/Externals/wxWidgets3/include/wx/unix/app.h @@ -3,7 +3,6 @@ // Purpose: wxAppConsole implementation for Unix // Author: Lukasz Michalski // Created: 28/01/2005 -// RCS-ID: $Id: app.h 56994 2008-11-28 12:47:07Z VZ $ // Copyright: (c) Lukasz Michalski // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -11,10 +10,17 @@ //Ensure that sigset_t is being defined #include +class wxFDIODispatcher; +class wxFDIOHandler; +class wxWakeUpPipe; + // wxApp subclass implementing event processing for console applications class WXDLLIMPEXP_BASE wxAppConsole : public wxAppConsoleBase { public: + wxAppConsole(); + virtual ~wxAppConsole(); + // override base class initialization virtual bool Initialize(int& argc, wxChar** argv); @@ -38,6 +44,14 @@ public: // handlers for them void CheckSignal(); + // Register the signal wake up pipe with the given dispatcher. + // + // This is used by wxExecute(wxEXEC_NOEVENTS) implementation only. + // + // The pointer to the handler used for processing events on this descriptor + // is returned so that it can be deleted when we no longer needed it. + wxFDIOHandler* RegisterSignalWakeUpPipe(wxFDIODispatcher& dispatcher); + private: // signal handler set up by SetSignalHandler() for all signals we handle, // it just adds the signal to m_signalsCaught -- the real processing is @@ -52,4 +66,8 @@ private: // the signal handlers WX_DECLARE_HASH_MAP(int, SignalHandler, wxIntegerHash, wxIntegerEqual, SignalHandlerHash); SignalHandlerHash m_signalHandlerHash; + + // pipe used for wake up signal handling: if a signal arrives while we're + // blocking for input, writing to this pipe triggers a call to our CheckSignal() + wxWakeUpPipe *m_signalWakeUpPipe; }; diff --git a/Externals/wxWidgets3/include/wx/unix/apptbase.h b/Externals/wxWidgets3/include/wx/unix/apptbase.h index a6e6021dbc..6ce6f152c3 100644 --- a/Externals/wxWidgets3/include/wx/unix/apptbase.h +++ b/Externals/wxWidgets3/include/wx/unix/apptbase.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 23.06.2003 -// RCS-ID: $Id: apptbase.h 61688 2009-08-17 23:02:46Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -12,9 +11,12 @@ #ifndef _WX_UNIX_APPTBASE_H_ #define _WX_UNIX_APPTBASE_H_ -struct wxEndProcessData; -struct wxExecuteData; +#include "wx/evtloop.h" +#include "wx/evtloopsrc.h" + +class wxExecuteData; class wxFDIOManager; +class wxEventLoopSourcesManagerBase; // ---------------------------------------------------------------------------- // wxAppTraits: the Unix version adds extra hooks needed by Unix code @@ -26,23 +28,13 @@ public: // wxExecute() support methods // --------------------------- - // wait for the process termination, return whatever wxExecute() must - // return + // Wait for the process termination and return its exit code or -1 on error. // - // base class implementation handles all cases except wxEXEC_SYNC without - // wxEXEC_NOEVENTS one which is implemented at the GUI level + // Notice that this is only used when execData.flags contains wxEXEC_SYNC + // and does not contain wxEXEC_NOEVENTS, i.e. when we need to really wait + // until the child process exit and dispatch the events while doing it. virtual int WaitForChild(wxExecuteData& execData); - // integrate the monitoring of the given fd with the port-specific event - // loop: when this fd, which corresponds to a dummy pipe opened between the - // parent and child processes, is closed by the child, the parent is - // notified about this via a call to wxHandleProcessTermination() function - // - // the default implementation uses wxFDIODispatcher and so is suitable for - // the console applications or ports which don't have any specific event - // loop - virtual int AddProcessCallback(wxEndProcessData *data, int fd); - #if wxUSE_SOCKETS // return a pointer to the object which should be used to integrate // monitoring of the file descriptors to the event loop (currently this is @@ -56,11 +48,19 @@ public: virtual wxFDIOManager *GetFDIOManager(); #endif // wxUSE_SOCKETS +#if wxUSE_CONSOLE_EVENTLOOP + // Return a non-NULL pointer to the object responsible for managing the + // event loop sources in this kind of application. + virtual wxEventLoopSourcesManagerBase* GetEventLoopSourcesManager(); +#endif // wxUSE_CONSOLE_EVENTLOOP + protected: - // a helper for the implementation of WaitForChild() in wxGUIAppTraits: - // checks the streams used for redirected IO in execData and returns true - // if there is any activity in them - bool CheckForRedirectedIO(wxExecuteData& execData); + // Wait for the process termination by running the given event loop until + // this happens. + // + // This is used by the public WaitForChild() after creating the event loop + // of the appropriate kind. + int RunLoopUntilChildExit(wxExecuteData& execData, wxEventLoopBase& loop); }; #endif // _WX_UNIX_APPTBASE_H_ diff --git a/Externals/wxWidgets3/include/wx/unix/apptrait.h b/Externals/wxWidgets3/include/wx/unix/apptrait.h index 533b771f6a..3fbe4d82da 100644 --- a/Externals/wxWidgets3/include/wx/unix/apptrait.h +++ b/Externals/wxWidgets3/include/wx/unix/apptrait.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 23.06.2003 -// RCS-ID: $Id: apptrait.h 61688 2009-08-17 23:02:46Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -51,9 +50,6 @@ class WXDLLIMPEXP_CORE wxGUIAppTraits : public wxGUIAppTraitsBase public: virtual wxEventLoopBase *CreateEventLoop(); virtual int WaitForChild(wxExecuteData& execData); -#ifdef wxHAS_GUI_PROCESS_CALLBACKS - virtual int AddProcessCallback(wxEndProcessData *data, int fd); -#endif #if wxUSE_TIMER virtual wxTimerImpl *CreateTimerImpl(wxTimer *timer); #endif @@ -67,10 +63,6 @@ public: #endif virtual wxPortId GetToolkitVersion(int *majVer = NULL, int *minVer = NULL) const; -#if defined(__WXGTK__) && wxUSE_INTL - virtual void SetLocale(); -#endif // __WXGTK__ - #ifdef __WXGTK20__ virtual wxString GetDesktopEnvironment() const; virtual wxString GetStandardCmdLineOptions(wxArrayString& names, @@ -92,6 +84,8 @@ public: #endif #endif // wxUSE_SOCKETS + + virtual wxEventLoopSourcesManagerBase* GetEventLoopSourcesManager(); }; #endif // wxUSE_GUI diff --git a/Externals/wxWidgets3/include/wx/unix/chkconf.h b/Externals/wxWidgets3/include/wx/unix/chkconf.h index c6b9133701..b8a1904133 100644 --- a/Externals/wxWidgets3/include/wx/unix/chkconf.h +++ b/Externals/wxWidgets3/include/wx/unix/chkconf.h @@ -3,7 +3,6 @@ * Purpose: Unix-specific config settings consistency checks * Author: Vadim Zeitlin * Created: 2007-07-14 - * RCS-ID: $Id: chkconf.h 63306 2010-01-29 13:07:26Z VZ $ * Copyright: (c) 2007 Vadim Zeitlin * Licence: wxWindows licence */ diff --git a/Externals/wxWidgets3/include/wx/unix/evtloop.h b/Externals/wxWidgets3/include/wx/unix/evtloop.h index 68921913d0..2b91c72375 100644 --- a/Externals/wxWidgets3/include/wx/unix/evtloop.h +++ b/Externals/wxWidgets3/include/wx/unix/evtloop.h @@ -3,7 +3,6 @@ // Purpose: declares wxEventLoop class // Author: Lukasz Michalski (lm@zork.pl) // Created: 2007-05-07 -// RCS-ID: $Id: evtloop.h 65680 2010-09-30 11:44:45Z VZ $ // Copyright: (c) 2007 Lukasz Michalski // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -17,13 +16,9 @@ // wxConsoleEventLoop // ---------------------------------------------------------------------------- +class wxEventLoopSource; class wxFDIODispatcher; -class wxUnixEventLoopSource; - -namespace wxPrivate -{ - class PipeIOHandler; -} +class wxWakeUpPipeMT; class WXDLLIMPEXP_BASE wxConsoleEventLoop #ifdef __WXOSX__ @@ -45,18 +40,16 @@ public: virtual bool IsOk() const { return m_dispatcher != NULL; } virtual bool YieldFor(long WXUNUSED(eventsToProcess)) { return true; } -#if wxUSE_EVENTLOOP_SOURCE - virtual wxEventLoopSource * - AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags); -#endif // wxUSE_EVENTLOOP_SOURCE - protected: virtual void OnNextIteration(); private: // pipe used for wake up messages: when a child thread wants to wake up // the event loop in the main thread it writes to this pipe - wxPrivate::PipeIOHandler *m_wakeupPipe; + wxWakeUpPipeMT *m_wakeupPipe; + + // the event loop source used to monitor this pipe + wxEventLoopSource* m_wakeupSource; // either wxSelectDispatcher or wxEpollDispatcher wxFDIODispatcher *m_dispatcher; diff --git a/Externals/wxWidgets3/include/wx/unix/evtloopsrc.h b/Externals/wxWidgets3/include/wx/unix/evtloopsrc.h index 47b58a7ffc..4c2cfec167 100644 --- a/Externals/wxWidgets3/include/wx/unix/evtloopsrc.h +++ b/Externals/wxWidgets3/include/wx/unix/evtloopsrc.h @@ -3,7 +3,6 @@ // Purpose: wxUnixEventLoopSource class // Author: Vadim Zeitlin // Created: 2009-10-21 -// RCS-ID: $Id: evtloopsrc.h 64140 2010-04-25 21:33:16Z FM $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/execute.h b/Externals/wxWidgets3/include/wx/unix/execute.h index c27ec3ba76..9756c00a7d 100644 --- a/Externals/wxWidgets3/include/wx/unix/execute.h +++ b/Externals/wxWidgets3/include/wx/unix/execute.h @@ -2,65 +2,56 @@ // Name: wx/unix/execute.h // Purpose: private details of wxExecute() implementation // Author: Vadim Zeitlin -// Id: $Id: execute.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Robert Roebling, Julian Smart, Vadim Zeitlin +// (c) 2013 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_UNIX_EXECUTE_H #define _WX_UNIX_EXECUTE_H -#include "wx/unix/pipe.h" +#include "wx/app.h" +#include "wx/hashmap.h" +#include "wx/process.h" -class WXDLLIMPEXP_FWD_BASE wxProcess; -class wxStreamTempInputBuffer; +#if wxUSE_STREAMS + #include "wx/unix/pipe.h" + #include "wx/private/streamtempinput.h" +#endif -struct wxEndProcessData -{ - wxEndProcessData() - { - pid = - tag = - exitcode = -1; - process = NULL; - async = false; - } - - int pid; // pid of the process - int tag; // port dependent value - wxProcess *process; // if !NULL: notified on process termination - int exitcode; // the exit code - bool async; // if true, delete us on process termination -}; - -// struct in which information is passed from wxExecute() to wxAppTraits -// methods -struct wxExecuteData +class wxEventLoopBase; + +// Information associated with a running child process. +class wxExecuteData { +public: wxExecuteData() { flags = pid = 0; + exitcode = -1; process = NULL; -#if wxUSE_STREAMS - bufOut = - bufErr = NULL; + syncEventLoop = NULL; +#if wxUSE_STREAMS fdOut = fdErr = wxPipe::INVALID_FD; #endif // wxUSE_STREAMS } - // get the FD corresponding to the read end of the process end detection - // pipe and close the write one - int GetEndProcReadFD() - { - const int fd = pipeEndProcDetect.Detach(wxPipe::Read); - pipeEndProcDetect.Close(); - return fd; - } + // This must be called in the parent process as soon as fork() returns to + // update us with the effective child PID. It also ensures that we handle + // SIGCHLD to be able to detect when this PID exits, so wxTheApp must be + // available. + void OnStart(int pid); + + // Called when the child process exits. + void OnExit(int exitcode); + + // Return true if we should (or already did) redirect the child IO. + bool IsRedirected() const { return process && process->IsRedirected(); } // wxExecute() flags @@ -69,26 +60,43 @@ struct wxExecuteData // the pid of the child process int pid; + // The exit code of the process, set once the child terminates. + int exitcode; + // the associated process object or NULL wxProcess *process; - // pipe used for end process detection - wxPipe pipeEndProcDetect; + // Local event loop used to wait for the child process termination in + // synchronous execution case. We can't create it ourselves as its exact + // type depends on the application kind (console/GUI), so we rely on + // wxAppTraits setting up this pointer to point to the appropriate object. + wxEventLoopBase *syncEventLoop; #if wxUSE_STREAMS // the input buffer bufOut is connected to stdout, this is why it is // called bufOut and not bufIn - wxStreamTempInputBuffer *bufOut, - *bufErr; + wxStreamTempInputBuffer bufOut, + bufErr; // the corresponding FDs, -1 if not redirected int fdOut, fdErr; #endif // wxUSE_STREAMS + + +private: + // SIGCHLD signal handler that checks whether any of the currently running + // children have exited. + static void OnSomeChildExited(int sig); + + // All currently running child processes indexed by their PID. + // + // Notice that the container doesn't own its elements. + WX_DECLARE_HASH_MAP(int, wxExecuteData*, wxIntegerHash, wxIntegerEqual, + ChildProcessesData); + static ChildProcessesData ms_childProcesses; + + wxDECLARE_NO_COPY_CLASS(wxExecuteData); }; -// this function is called when the process terminates from port specific -// callback function and is common to all ports (src/unix/utilsunx.cpp) -extern WXDLLIMPEXP_BASE void wxHandleProcessTermination(wxEndProcessData *proc_data); - #endif // _WX_UNIX_EXECUTE_H diff --git a/Externals/wxWidgets3/include/wx/unix/fontutil.h b/Externals/wxWidgets3/include/wx/unix/fontutil.h index 503502f50e..64cb3a3ccd 100644 --- a/Externals/wxWidgets3/include/wx/unix/fontutil.h +++ b/Externals/wxWidgets3/include/wx/unix/fontutil.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 05.11.99 -// RCS-ID: $Id: fontutil.h 58227 2009-01-19 13:55:27Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/fswatcher_inotify.h b/Externals/wxWidgets3/include/wx/unix/fswatcher_inotify.h index 49a6381b99..1881966053 100644 --- a/Externals/wxWidgets3/include/wx/unix/fswatcher_inotify.h +++ b/Externals/wxWidgets3/include/wx/unix/fswatcher_inotify.h @@ -3,7 +3,6 @@ // Purpose: wxInotifyFileSystemWatcher // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id: fswatcher_inotify.h 62474 2009-10-22 11:35:43Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -26,6 +25,8 @@ public: virtual ~wxInotifyFileSystemWatcher(); + void OnDirDeleted(const wxString& path); + protected: bool Init(); }; diff --git a/Externals/wxWidgets3/include/wx/unix/fswatcher_kqueue.h b/Externals/wxWidgets3/include/wx/unix/fswatcher_kqueue.h index 303922db94..a324eb7efd 100644 --- a/Externals/wxWidgets3/include/wx/unix/fswatcher_kqueue.h +++ b/Externals/wxWidgets3/include/wx/unix/fswatcher_kqueue.h @@ -3,7 +3,6 @@ // Purpose: wxKqueueFileSystemWatcher // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id: fswatcher_kqueue.h 62474 2009-10-22 11:35:43Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/glx11.h b/Externals/wxWidgets3/include/wx/unix/glx11.h index 66e945fa3c..34ed4dd46d 100644 --- a/Externals/wxWidgets3/include/wx/unix/glx11.h +++ b/Externals/wxWidgets3/include/wx/unix/glx11.h @@ -3,7 +3,6 @@ // Purpose: class common for all X11-based wxGLCanvas implementations // Author: Vadim Zeitlin // Created: 2007-04-15 -// RCS-ID: $Id: glx11.h 54022 2008-06-08 00:12:12Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/joystick.h b/Externals/wxWidgets3/include/wx/unix/joystick.h index 498e36a4c5..ef7a5db223 100644 --- a/Externals/wxWidgets3/include/wx/unix/joystick.h +++ b/Externals/wxWidgets3/include/wx/unix/joystick.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: joystick.h 50443 2007-12-03 02:55:14Z PC $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/mimetype.h b/Externals/wxWidgets3/include/wx/unix/mimetype.h index 18876579a7..df76534aa5 100644 --- a/Externals/wxWidgets3/include/wx/unix/mimetype.h +++ b/Externals/wxWidgets3/include/wx/unix/mimetype.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 23.09.98 -// RCS-ID: $Id: mimetype.h 62356 2009-10-09 17:39:19Z PC $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence (part of wxExtra library) ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/pipe.h b/Externals/wxWidgets3/include/wx/unix/pipe.h index ae698a8f05..1bde4228a7 100644 --- a/Externals/wxWidgets3/include/wx/unix/pipe.h +++ b/Externals/wxWidgets3/include/wx/unix/pipe.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 24.06.2003 (extracted from src/unix/utilsunx.cpp) -// RCS-ID: $Id: pipe.h 66152 2010-11-14 14:04:37Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -13,6 +12,7 @@ #define _WX_UNIX_PIPE_H_ #include +#include #include "wx/log.h" #include "wx/intl.h" @@ -44,7 +44,7 @@ public: { if ( pipe(m_fds) == -1 ) { - wxLogSysError(_("Pipe creation failed")); + wxLogSysError(wxGetTranslation("Pipe creation failed")); return false; } @@ -98,41 +98,5 @@ private: int m_fds[2]; }; -#if wxUSE_STREAMS && wxUSE_FILE - -#include "wx/wfstream.h" - -// ---------------------------------------------------------------------------- -// wxPipeInputStream: stream for reading from a pipe -// ---------------------------------------------------------------------------- - -class wxPipeInputStream : public wxFileInputStream -{ -public: - wxPipeInputStream(int fd) : wxFileInputStream(fd) { } - - // return TRUE if the pipe is still opened - bool IsOpened() const { return !Eof(); } - - // return TRUE if we have anything to read, don't block - virtual bool CanRead() const; -}; - -// ---------------------------------------------------------------------------- -// wxPipeOutputStream: stream for writing to a pipe -// ---------------------------------------------------------------------------- - -class wxPipeOutputStream : public wxFileOutputStream -{ -public: - wxPipeOutputStream(int fd) : wxFileOutputStream(fd) { } - - // Override the base class version to ignore "pipe full" errors: this is - // not an error for this class. - size_t OnSysWrite(const void *buffer, size_t size); -}; - -#endif // wxUSE_STREAMS && wxUSE_FILE - #endif // _WX_UNIX_PIPE_H_ diff --git a/Externals/wxWidgets3/include/wx/unix/private.h b/Externals/wxWidgets3/include/wx/unix/private.h index de839f01f9..fafc5435db 100644 --- a/Externals/wxWidgets3/include/wx/unix/private.h +++ b/Externals/wxWidgets3/include/wx/unix/private.h @@ -3,7 +3,6 @@ // Purpose: miscellaneous private things for Unix wx ports // Author: Vadim Zeitlin // Created: 2005-09-25 -// RCS-ID: $Id: private.h 56927 2008-11-23 01:52:20Z VZ $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/private/epolldispatcher.h b/Externals/wxWidgets3/include/wx/unix/private/epolldispatcher.h index 79d0334559..c73411f221 100644 --- a/Externals/wxWidgets3/include/wx/unix/private/epolldispatcher.h +++ b/Externals/wxWidgets3/include/wx/unix/private/epolldispatcher.h @@ -4,7 +4,6 @@ // Authors: Lukasz Michalski // Created: April 2007 // Copyright: (c) Lukasz Michalski -// RCS-ID: $Id: epolldispatcher.h 67254 2011-03-20 00:14:35Z DS $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/private/executeiohandler.h b/Externals/wxWidgets3/include/wx/unix/private/executeiohandler.h new file mode 100644 index 0000000000..2a7c2d7aa3 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/unix/private/executeiohandler.h @@ -0,0 +1,136 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/executeiohandler.h +// Purpose: IO handler class for the FD used by wxExecute() under Unix +// Author: Rob Bresalier, Vadim Zeitlin +// Created: 2013-01-06 +// Copyright: (c) 2013 Rob Bresalier, Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_PRIVATE_EXECUTEIOHANDLER_H_ +#define _WX_UNIX_PRIVATE_EXECUTEIOHANDLER_H_ + +#include "wx/private/streamtempinput.h" + +// This class handles IO events on the pipe FD connected to the child process +// stdout/stderr and is used by wxExecute(). +// +// Currently it can derive from either wxEventLoopSourceHandler or +// wxFDIOHandler depending on the kind of dispatcher/event loop it is used +// with. In the future, when we get rid of wxFDIOHandler entirely, it will +// derive from wxEventLoopSourceHandler only. +template +class wxExecuteIOHandlerBase : public T +{ +public: + wxExecuteIOHandlerBase(int fd, wxStreamTempInputBuffer& buf) + : m_fd(fd), + m_buf(buf) + { + m_callbackDisabled = false; + } + + // Called when the associated descriptor is available for reading. + virtual void OnReadWaiting() + { + // Sync process, process all data coming at us from the pipe so that + // the pipe does not get full and cause a deadlock situation. + m_buf.Update(); + + if ( m_buf.Eof() ) + DisableCallback(); + } + + // These methods are never called as we only monitor the associated FD for + // reading, but we still must implement them as they're pure virtual in the + // base class. + virtual void OnWriteWaiting() { } + virtual void OnExceptionWaiting() { } + + // Disable any future calls to our OnReadWaiting(), can be called when + // we're sure that no more input is forthcoming. + void DisableCallback() + { + if ( !m_callbackDisabled ) + { + m_callbackDisabled = true; + + DoDisable(); + } + } + +protected: + const int m_fd; + +private: + virtual void DoDisable() = 0; + + wxStreamTempInputBuffer& m_buf; + + // If true, DisableCallback() had been already called. + bool m_callbackDisabled; + + wxDECLARE_NO_COPY_CLASS(wxExecuteIOHandlerBase); +}; + +// This is the version used with wxFDIODispatcher, which must be passed to the +// ctor in order to register this handler with it. +class wxExecuteFDIOHandler : public wxExecuteIOHandlerBase +{ +public: + wxExecuteFDIOHandler(wxFDIODispatcher& dispatcher, + int fd, + wxStreamTempInputBuffer& buf) + : wxExecuteIOHandlerBase(fd, buf), + m_dispatcher(dispatcher) + { + dispatcher.RegisterFD(fd, this, wxFDIO_INPUT); + } + + virtual ~wxExecuteFDIOHandler() + { + DisableCallback(); + } + +private: + virtual void DoDisable() + { + m_dispatcher.UnregisterFD(m_fd); + } + + wxFDIODispatcher& m_dispatcher; + + wxDECLARE_NO_COPY_CLASS(wxExecuteFDIOHandler); +}; + +// And this is the version used with an event loop. As AddSourceForFD() is +// static, we don't require passing the event loop to the ctor but an event +// loop must be running to handle our events. +class wxExecuteEventLoopSourceHandler + : public wxExecuteIOHandlerBase +{ +public: + wxExecuteEventLoopSourceHandler(int fd, wxStreamTempInputBuffer& buf) + : wxExecuteIOHandlerBase(fd, buf) + { + m_source = wxEventLoop::AddSourceForFD(fd, this, wxEVENT_SOURCE_INPUT); + } + + virtual ~wxExecuteEventLoopSourceHandler() + { + DisableCallback(); + } + +private: + virtual void DoDisable() + { + delete m_source; + m_source = NULL; + } + + wxEventLoopSource* m_source; + + wxDECLARE_NO_COPY_CLASS(wxExecuteEventLoopSourceHandler); +}; + +#endif // _WX_UNIX_PRIVATE_EXECUTEIOHANDLER_H_ diff --git a/Externals/wxWidgets3/include/wx/unix/private/fdiounix.h b/Externals/wxWidgets3/include/wx/unix/private/fdiounix.h index b4681b9ef1..2807821e19 100644 --- a/Externals/wxWidgets3/include/wx/unix/private/fdiounix.h +++ b/Externals/wxWidgets3/include/wx/unix/private/fdiounix.h @@ -3,7 +3,6 @@ // Purpose: wxFDIOManagerUnix class used by console Unix applications // Author: Vadim Zeitlin // Created: 2009-08-17 -// RCS-ID: $Id: fdiounix.h 64140 2010-04-25 21:33:16Z FM $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/private/fswatcher_inotify.h b/Externals/wxWidgets3/include/wx/unix/private/fswatcher_inotify.h index b850153e69..249450eb50 100644 --- a/Externals/wxWidgets3/include/wx/unix/private/fswatcher_inotify.h +++ b/Externals/wxWidgets3/include/wx/unix/private/fswatcher_inotify.h @@ -3,7 +3,6 @@ // Purpose: File system watcher impl classes // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id: fswatcher_inotify.h 62475 2009-10-22 11:36:35Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/private/fswatcher_kqueue.h b/Externals/wxWidgets3/include/wx/unix/private/fswatcher_kqueue.h index 744277491c..de3d489a38 100644 --- a/Externals/wxWidgets3/include/wx/unix/private/fswatcher_kqueue.h +++ b/Externals/wxWidgets3/include/wx/unix/private/fswatcher_kqueue.h @@ -3,7 +3,6 @@ // Purpose: File system watcher impl classes // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id: fswatcher_kqueue.h 62475 2009-10-22 11:36:35Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/private/pipestream.h b/Externals/wxWidgets3/include/wx/unix/private/pipestream.h new file mode 100644 index 0000000000..313a271741 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/unix/private/pipestream.h @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/pipestream.h +// Purpose: Unix wxPipeInputStream and wxPipeOutputStream declarations +// Author: Vadim Zeitlin +// Created: 2013-06-08 (extracted from wx/unix/pipe.h) +// Copyright: (c) 2013 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_PRIVATE_PIPESTREAM_H_ +#define _WX_UNIX_PRIVATE_PIPESTREAM_H_ + +#include "wx/wfstream.h" + +class wxPipeInputStream : public wxFileInputStream +{ +public: + wxEXPLICIT wxPipeInputStream(int fd) : wxFileInputStream(fd) { } + + // return true if the pipe is still opened + bool IsOpened() const { return !Eof(); } + + // return true if we have anything to read, don't block + virtual bool CanRead() const; +}; + +class wxPipeOutputStream : public wxFileOutputStream +{ +public: + wxPipeOutputStream(int fd) : wxFileOutputStream(fd) { } + + // Override the base class version to ignore "pipe full" errors: this is + // not an error for this class. + size_t OnSysWrite(const void *buffer, size_t size); +}; + +#endif // _WX_UNIX_PRIVATE_PIPESTREAM_H_ diff --git a/Externals/wxWidgets3/include/wx/unix/private/sockunix.h b/Externals/wxWidgets3/include/wx/unix/private/sockunix.h index d17e06a9c2..642ef43bfa 100644 --- a/Externals/wxWidgets3/include/wx/unix/private/sockunix.h +++ b/Externals/wxWidgets3/include/wx/unix/private/sockunix.h @@ -3,7 +3,6 @@ // Purpose: wxSocketImpl implementation for Unix systems // Authors: Guilhem Lavaux, Vadim Zeitlin // Created: April 1997 -// RCS-ID: $Id: sockunix.h 65581 2010-09-21 11:56:53Z VZ $ // Copyright: (c) 1997 Guilhem Lavaux // (c) 2008 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/unix/private/timer.h b/Externals/wxWidgets3/include/wx/unix/private/timer.h index 764f3a9954..6275b53d91 100644 --- a/Externals/wxWidgets3/include/wx/unix/private/timer.h +++ b/Externals/wxWidgets3/include/wx/unix/private/timer.h @@ -3,7 +3,6 @@ // Purpose: wxTimer for wxBase (unix) // Author: Lukasz Michalski // Created: 15/01/2005 -// RCS-ID: $Id: timer.h 69839 2011-11-27 19:50:33Z VZ $ // Copyright: (c) Lukasz Michalski // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/private/wakeuppipe.h b/Externals/wxWidgets3/include/wx/unix/private/wakeuppipe.h new file mode 100644 index 0000000000..a601478a9f --- /dev/null +++ b/Externals/wxWidgets3/include/wx/unix/private/wakeuppipe.h @@ -0,0 +1,101 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/unix/private/wakeuppipe.h +// Purpose: Helper class allowing to wake up the main thread. +// Author: Vadim Zeitlin +// Created: 2013-06-09 (extracted from src/unix/evtloopunix.cpp) +// Copyright: (c) 2013 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_UNIX_PRIVATE_WAKEUPPIPE_H_ +#define _WX_UNIX_PRIVATE_WAKEUPPIPE_H_ + +#include "wx/unix/pipe.h" +#include "wx/evtloopsrc.h" + +// ---------------------------------------------------------------------------- +// wxWakeUpPipe: allows to wake up the event loop by writing to it +// ---------------------------------------------------------------------------- + +// This class is not MT-safe, see wxWakeUpPipeMT below for a wake up pipe +// usable from other threads. + +class wxWakeUpPipe : public wxEventLoopSourceHandler +{ +public: + // Create and initialize the pipe. + // + // It's the callers responsibility to add the read end of this pipe, + // returned by GetReadFd(), to the code blocking on input. + wxWakeUpPipe(); + + // Wake up the blocking operation involving this pipe. + // + // It simply writes to the write end of the pipe. + // + // As indicated by its name, this method does no locking and so can be + // called only from the main thread. + void WakeUpNoLock(); + + // Same as WakeUp() but without locking. + + // Return the read end of the pipe. + int GetReadFd() { return m_pipe[wxPipe::Read]; } + + + // Implement wxEventLoopSourceHandler pure virtual methods + virtual void OnReadWaiting(); + virtual void OnWriteWaiting() { } + virtual void OnExceptionWaiting() { } + +private: + wxPipe m_pipe; + + // This flag is set to true after writing to the pipe and reset to false + // after reading from it in the main thread. Having it allows us to avoid + // overflowing the pipe with too many writes if the main thread can't keep + // up with reading from it. + bool m_pipeIsEmpty; +}; + +// ---------------------------------------------------------------------------- +// wxWakeUpPipeMT: thread-safe version of wxWakeUpPipe +// ---------------------------------------------------------------------------- + +// This class can be used from multiple threads, i.e. its WakeUp() can be +// called concurrently. +#if wxUSE_THREADS + +class wxWakeUpPipeMT : public wxWakeUpPipe +{ +public: + wxWakeUpPipeMT() { } + + // Thread-safe wrapper around WakeUpNoLock(): can be called from another + // thread to wake up the main one. + void WakeUp() + { + wxCriticalSectionLocker lock(m_pipeLock); + + WakeUpNoLock(); + } + + virtual void OnReadWaiting() + { + wxCriticalSectionLocker lock(m_pipeLock); + + wxWakeUpPipe::OnReadWaiting(); + } + +private: + // Protects access to m_pipeIsEmpty. + wxCriticalSection m_pipeLock; +}; + +#else // !wxUSE_THREADS + +typedef wxWakeUpPipe wxWakeUpPipeMT; + +#endif // wxUSE_THREADS/!wxUSE_THREADS + +#endif // _WX_UNIX_PRIVATE_WAKEUPPIPE_H_ diff --git a/Externals/wxWidgets3/include/wx/unix/sound.h b/Externals/wxWidgets3/include/wx/unix/sound.h index d2f2220b5b..76efeae3dc 100644 --- a/Externals/wxWidgets3/include/wx/unix/sound.h +++ b/Externals/wxWidgets3/include/wx/unix/sound.h @@ -4,7 +4,6 @@ // Author: Julian Smart, Vaclav Slavik // Modified by: // Created: 25/10/98 -// RCS-ID: $Id: sound.h 69178 2011-09-21 15:08:02Z VZ $ // Copyright: (c) Julian Smart, Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/stackwalk.h b/Externals/wxWidgets3/include/wx/unix/stackwalk.h index 666bd377f7..e99741934a 100644 --- a/Externals/wxWidgets3/include/wx/unix/stackwalk.h +++ b/Externals/wxWidgets3/include/wx/unix/stackwalk.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-19 -// RCS-ID: $Id: stackwalk.h 58093 2009-01-14 14:38:00Z FM $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/stdpaths.h b/Externals/wxWidgets3/include/wx/unix/stdpaths.h index 338866248d..2f111992a3 100644 --- a/Externals/wxWidgets3/include/wx/unix/stdpaths.h +++ b/Externals/wxWidgets3/include/wx/unix/stdpaths.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2004-10-19 -// RCS-ID: $Id: stdpaths.h 53094 2008-04-08 13:52:39Z JS $ // Copyright: (c) 2004 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -51,6 +50,11 @@ public: virtual wxString GetDocumentsDir() const; #endif +protected: + // Ctor is protected, use wxStandardPaths::Get() instead of instantiating + // objects of this class directly. + wxStandardPaths() { } + private: wxString m_prefix; }; diff --git a/Externals/wxWidgets3/include/wx/unix/taskbarx11.h b/Externals/wxWidgets3/include/wx/unix/taskbarx11.h index df30f94183..02a9200941 100644 --- a/Externals/wxWidgets3/include/wx/unix/taskbarx11.h +++ b/Externals/wxWidgets3/include/wx/unix/taskbarx11.h @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 04/04/2003 -// RCS-ID: $Id: taskbarx11.h 62789 2009-12-05 19:57:58Z PC $ // Copyright: (c) Vaclav Slavik, 2003 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/tls.h b/Externals/wxWidgets3/include/wx/unix/tls.h index 8dcd51bceb..ce61e6fff7 100644 --- a/Externals/wxWidgets3/include/wx/unix/tls.h +++ b/Externals/wxWidgets3/include/wx/unix/tls.h @@ -3,7 +3,6 @@ // Purpose: Pthreads implementation of wxTlsValue<> // Author: Vadim Zeitlin // Created: 2008-08-08 -// RCS-ID: $Id: tls.h 63653 2010-03-08 12:21:58Z VS $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/unix/utilsx11.h b/Externals/wxWidgets3/include/wx/unix/utilsx11.h index 32f83827e9..29898372fa 100644 --- a/Externals/wxWidgets3/include/wx/unix/utilsx11.h +++ b/Externals/wxWidgets3/include/wx/unix/utilsx11.h @@ -4,7 +4,6 @@ // Author: Mattia Barbon, Vaclav Slavik, Vadim Zeitlin // Modified by: // Created: 25.03.02 -// RCS-ID: $Id: utilsx11.h 65397 2010-08-24 11:23:22Z JJ $ // Copyright: (c) wxWidgets team // (c) 2010 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/uri.h b/Externals/wxWidgets3/include/wx/uri.h index 27b941437a..758bd72e27 100644 --- a/Externals/wxWidgets3/include/wx/uri.h +++ b/Externals/wxWidgets3/include/wx/uri.h @@ -4,7 +4,6 @@ // Author: Ryan Norton // Vadim Zeitlin (UTF-8 URI support, many other changes) // Created: 07/01/2004 -// RCS-ID: $Id: uri.h 54727 2008-07-20 12:57:47Z VZ $ // Copyright: (c) 2004 Ryan Norton // 2008 Vadim Zeitlin // Licence: wxWindows Licence diff --git a/Externals/wxWidgets3/include/wx/url.h b/Externals/wxWidgets3/include/wx/url.h index 65bd493383..572cae8b11 100644 --- a/Externals/wxWidgets3/include/wx/url.h +++ b/Externals/wxWidgets3/include/wx/url.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: Ryan Norton // Created: 20/07/1997 -// RCS-ID: $Id: url.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1997, 1998 Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/ustring.h b/Externals/wxWidgets3/include/wx/ustring.h index d888d77d49..7c58fddd8a 100644 --- a/Externals/wxWidgets3/include/wx/ustring.h +++ b/Externals/wxWidgets3/include/wx/ustring.h @@ -3,7 +3,6 @@ // Purpose: 32-bit string (UCS-4) // Author: Robert Roebling // Copyright: (c) Robert Roebling -// RCS-ID: $Id: ustring.h 66654 2011-01-08 17:33:51Z PC $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/utils.h b/Externals/wxWidgets3/include/wx/utils.h index bccc7411a8..92701eae15 100644 --- a/Externals/wxWidgets3/include/wx/utils.h +++ b/Externals/wxWidgets3/include/wx/utils.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: utils.h 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1998 Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -54,7 +53,7 @@ class WXDLLIMPEXP_FWD_BASE wxArrayInt; class WXDLLIMPEXP_FWD_BASE wxProcess; class WXDLLIMPEXP_FWD_CORE wxFrame; class WXDLLIMPEXP_FWD_CORE wxWindow; -class WXDLLIMPEXP_FWD_CORE wxWindowList; +class wxWindowList; class WXDLLIMPEXP_FWD_CORE wxEventLoop; // ---------------------------------------------------------------------------- @@ -130,12 +129,7 @@ wxDEPRECATED_INLINE(inline bool wxStringEq(const wchar_t *s1, const wchar_t *s2) // ---------------------------------------------------------------------------- // Sound the bell -#if !defined __EMX__ && \ - (defined __WXMOTIF__ || defined __WXGTK__ || defined __WXX11__) WXDLLIMPEXP_CORE void wxBell(); -#else -WXDLLIMPEXP_BASE void wxBell(); -#endif #if wxUSE_MSGDLG // Show wxWidgets information @@ -278,13 +272,13 @@ inline bool wxPlatformIs(int platform) { return wxPlatform::Is(platform); } // ---------------------------------------------------------------------------- // Ensure subsequent IDs don't clash with this one -WXDLLIMPEXP_BASE void wxRegisterId(long id); +WXDLLIMPEXP_BASE void wxRegisterId(int id); // Return the current ID -WXDLLIMPEXP_BASE long wxGetCurrentId(); +WXDLLIMPEXP_BASE int wxGetCurrentId(); // Generate a unique ID -WXDLLIMPEXP_BASE long wxNewId(); +WXDLLIMPEXP_BASE int wxNewId(); // ---------------------------------------------------------------------------- // Various conversions @@ -823,6 +817,10 @@ WXDLLIMPEXP_CORE bool wxYieldIfNeeded(); // Return the pointer to the resource data. This pointer is read-only, use // the overload below if you need to modify the data. // + // Notice that the resource type can be either a real string or an integer + // produced by MAKEINTRESOURCE(). In particular, any standard resource type, + // i.e any RT_XXX constant, could be passed here. + // // Returns true on success, false on failure. Doesn't log an error message // if the resource is not found (because this could be expected) but does // log one if any other error occurs. @@ -830,7 +828,7 @@ WXDLLIMPEXP_CORE bool wxYieldIfNeeded(); wxLoadUserResource(const void **outData, size_t *outLen, const wxString& resourceName, - const wxString& resourceType = wxUserResourceStr, + const wxChar* resourceType = wxUserResourceStr, WXHINSTANCE module = 0); // This function allocates a new buffer and makes a copy of the resource @@ -840,7 +838,7 @@ WXDLLIMPEXP_CORE bool wxYieldIfNeeded(); // Returns NULL on failure. WXDLLIMPEXP_BASE char* wxLoadUserResource(const wxString& resourceName, - const wxString& resourceType = wxUserResourceStr, + const wxChar* resourceType = wxUserResourceStr, int* pLen = NULL, WXHINSTANCE module = 0); #endif // __WINDOWS__ diff --git a/Externals/wxWidgets3/include/wx/valgen.h b/Externals/wxWidgets3/include/wx/valgen.h index 9e6f0c3479..c24142e791 100644 --- a/Externals/wxWidgets3/include/wx/valgen.h +++ b/Externals/wxWidgets3/include/wx/valgen.h @@ -3,7 +3,6 @@ // Purpose: wxGenericValidator class // Author: Kevin Smith // Created: Jan 22 1999 -// RCS-ID: $Id: valgen.h 68217 2011-07-09 23:37:28Z VZ $ // Copyright: (c) 1999 Julian Smart (assigned from Kevin) // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/validate.h b/Externals/wxWidgets3/include/wx/validate.h index d94f89c09e..0adf3bf477 100644 --- a/Externals/wxWidgets3/include/wx/validate.h +++ b/Externals/wxWidgets3/include/wx/validate.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: validate.h 66966 2011-02-19 12:32:59Z VZ $ // Copyright: (c) 1998 Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -37,6 +36,11 @@ class WXDLLIMPEXP_CORE wxValidator : public wxEvtHandler { public: wxValidator(); + wxValidator(const wxValidator& other) + : wxEvtHandler() + , m_validatorWindow(other.m_validatorWindow) + { + } virtual ~wxValidator(); // Make a clone of this validator (or return NULL) - currently necessary @@ -87,7 +91,7 @@ private: static bool ms_isSilent; DECLARE_DYNAMIC_CLASS(wxValidator) - wxDECLARE_NO_COPY_CLASS(wxValidator); + wxDECLARE_NO_ASSIGN_CLASS(wxValidator); }; extern WXDLLIMPEXP_DATA_CORE(const wxValidator) wxDefaultValidator; diff --git a/Externals/wxWidgets3/include/wx/valtext.h b/Externals/wxWidgets3/include/wx/valtext.h index a012ef62ad..93f5dd614e 100644 --- a/Externals/wxWidgets3/include/wx/valtext.h +++ b/Externals/wxWidgets3/include/wx/valtext.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Francesco Montorsi // Created: 29/01/98 -// RCS-ID: $Id: valtext.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/variant.h b/Externals/wxWidgets3/include/wx/variant.h index 6f82698856..39adc729b9 100644 --- a/Externals/wxWidgets3/include/wx/variant.h +++ b/Externals/wxWidgets3/include/wx/variant.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 10/09/98 -// RCS-ID: $Id: variant.h 66608 2011-01-06 11:06:12Z SC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -570,7 +569,11 @@ bool classname##VariantData::Eq(wxVariantData& data) const \ var.GetWxObjectPtr() : NULL)); // Replacement for using wxDynamicCast on a wxVariantData object -#define wxDynamicCastVariantData(data, classname) dynamic_cast(data) +#ifndef wxNO_RTTI + #define wxDynamicCastVariantData(data, classname) dynamic_cast(data) +#endif + +#define wxStaticCastVariantData(data, classname) static_cast(data) extern wxVariant WXDLLIMPEXP_BASE wxNullVariant; diff --git a/Externals/wxWidgets3/include/wx/variantbase.h b/Externals/wxWidgets3/include/wx/variantbase.h index 3f06c96e0e..732671bdd5 100644 --- a/Externals/wxWidgets3/include/wx/variantbase.h +++ b/Externals/wxWidgets3/include/wx/variantbase.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: Francesco Montorsi // Created: 10/09/98 -// RCS-ID: $Id: variantbase.h 66584 2011-01-05 06:56:36Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/vector.h b/Externals/wxWidgets3/include/wx/vector.h index e95d4103ef..dffb19fc9d 100644 --- a/Externals/wxWidgets3/include/wx/vector.h +++ b/Externals/wxWidgets3/include/wx/vector.h @@ -28,7 +28,6 @@ inline void wxVectorSort(wxVector& v) #else // !wxUSE_STD_CONTAINERS -#include "wx/utils.h" #include "wx/scopeguard.h" #include "wx/meta/movable.h" #include "wx/meta/if.h" @@ -37,6 +36,15 @@ inline void wxVectorSort(wxVector& v) #include // for placement new #include "wx/afterstd.h" +// wxQsort is declared in wx/utils.h, but can't include that file here, +// it indirectly includes this file. Just lovely... +typedef int (*wxSortCallback)(const void* pItem1, + const void* pItem2, + const void* user_data); +WXDLLIMPEXP_BASE void wxQsort(void* pbase, size_t total_elems, + size_t size, wxSortCallback cmp, + const void* user_data); + namespace wxPrivate { @@ -131,9 +139,11 @@ public: typedef size_t difference_type; typedef T value_type; typedef value_type* pointer; + typedef const value_type* const_pointer; typedef value_type* iterator; typedef const value_type* const_iterator; typedef value_type& reference; + typedef const value_type& const_reference; class reverse_iterator { @@ -175,6 +185,51 @@ public: private: value_type *m_ptr; + + friend class const_reverse_iterator; + }; + + class const_reverse_iterator + { + public: + const_reverse_iterator() : m_ptr(NULL) { } + wxEXPLICIT const_reverse_iterator(const_iterator it) : m_ptr(it) { } + const_reverse_iterator(const reverse_iterator& it) : m_ptr(it.m_ptr) { } + const_reverse_iterator(const const_reverse_iterator& it) : m_ptr(it.m_ptr) { } + + const_reference operator*() const { return *m_ptr; } + const_pointer operator->() const { return m_ptr; } + + const_iterator base() const { return m_ptr; } + + const_reverse_iterator& operator++() + { --m_ptr; return *this; } + const_reverse_iterator operator++(int) + { const_reverse_iterator tmp = *this; --m_ptr; return tmp; } + const_reverse_iterator& operator--() + { ++m_ptr; return *this; } + const_reverse_iterator operator--(int) + { const_reverse_iterator tmp = *this; ++m_ptr; return tmp; } + + const_reverse_iterator operator+(difference_type n) const + { return const_reverse_iterator(m_ptr - n); } + const_reverse_iterator& operator+=(difference_type n) + { m_ptr -= n; return *this; } + const_reverse_iterator operator-(difference_type n) const + { return const_reverse_iterator(m_ptr + n); } + const_reverse_iterator& operator-=(difference_type n) + { m_ptr += n; return *this; } + + const_reference operator[](difference_type n) const + { return *(*this + n); } + + bool operator ==(const const_reverse_iterator& it) const + { return m_ptr == it.m_ptr; } + bool operator !=(const const_reverse_iterator& it) const + { return m_ptr != it.m_ptr; } + + protected: + const value_type *m_ptr; }; wxVector() : m_size(0), m_capacity(0), m_values(NULL) {} @@ -200,11 +255,39 @@ public: Copy(c); } + template + wxVector(InputIterator first, InputIterator last) + : m_size(0), m_capacity(0), m_values(NULL) + { + assign(first, last); + } + ~wxVector() { clear(); } + void assign(size_type p_size, const value_type& v) + { + clear(); + reserve(p_size); + for ( size_t n = 0; n < p_size; n++ ) + push_back(v); + } + + template + void assign(InputIterator first, InputIterator last) + { + clear(); + + // Notice that it would be nice to call reserve() here but we can't do + // it for arbitrary input iterators, we should have a dispatch on + // iterator type and call it if possible. + + for ( InputIterator it = first; it != last; ++it ) + push_back(*it); + } + void swap(wxVector& v) { wxSwap(m_size, v.m_size); @@ -234,10 +317,12 @@ public: // increase the size twice, unless we're already too big or unless // more is requested // - // NB: casts to size_type are needed to suppress mingw32 warnings about - // mixing enums and ints in the same expression + // NB: casts to size_type are needed to suppress warnings about + // mixing enumeral and non-enumeral type in conditional expression const size_type increment = m_size > 0 - ? wxMin(m_size, (size_type)ALLOC_MAX_SIZE) + ? m_size < ALLOC_MAX_SIZE + ? m_size + : (size_type)ALLOC_MAX_SIZE : (size_type)ALLOC_INITIAL_SIZE; if ( m_capacity + increment > n ) n = m_capacity + increment; @@ -335,6 +420,9 @@ public: reverse_iterator rbegin() { return reverse_iterator(end() - 1); } reverse_iterator rend() { return reverse_iterator(begin() - 1); } + const_reverse_iterator rbegin() const { return const_reverse_iterator(end() - 1); } + const_reverse_iterator rend() const { return const_reverse_iterator(begin() - 1); } + iterator insert(iterator it, const value_type& v = value_type()) { // NB: this must be done before reserve(), because reserve() diff --git a/Externals/wxWidgets3/include/wx/version.h b/Externals/wxWidgets3/include/wx/version.h index fb634a97fb..c762d9a9f0 100644 --- a/Externals/wxWidgets3/include/wx/version.h +++ b/Externals/wxWidgets3/include/wx/version.h @@ -4,7 +4,6 @@ * Author: Julian Smart * Modified by: Ryan Norton (Converted to C) * Created: 29/01/98 - * RCS-ID: $Id: version.h 70021 2011-12-16 22:12:49Z VZ $ * Copyright: (c) 1998 Julian Smart * Licence: wxWindows licence */ @@ -26,11 +25,11 @@ */ /* NB: this file is parsed by automatic tools so don't change its format! */ -#define wxMAJOR_VERSION 2 -#define wxMINOR_VERSION 9 -#define wxRELEASE_NUMBER 4 +#define wxMAJOR_VERSION 3 +#define wxMINOR_VERSION 0 +#define wxRELEASE_NUMBER 0 #define wxSUBRELEASE_NUMBER 0 -#define wxVERSION_STRING wxT("wxWidgets 2.9.4") +#define wxVERSION_STRING wxT("wxWidgets 3.0.0 RC1") /* nothing to update below this line when updating the version */ /* ---------------------------------------------------------------------------- */ diff --git a/Externals/wxWidgets3/include/wx/versioninfo.h b/Externals/wxWidgets3/include/wx/versioninfo.h index 8e7723f08d..79469111a6 100644 --- a/Externals/wxWidgets3/include/wx/versioninfo.h +++ b/Externals/wxWidgets3/include/wx/versioninfo.h @@ -3,7 +3,6 @@ // Purpose: declaration of wxVersionInfo class // Author: Troels K // Created: 2010-11-22 -// RCS-ID: $Id: versioninfo.h 66474 2010-12-27 20:47:12Z RD $ // Copyright: (c) 2010 wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/vidmode.h b/Externals/wxWidgets3/include/wx/vidmode.h index 9c462dd0b5..550bb3b4bc 100644 --- a/Externals/wxWidgets3/include/wx/vidmode.h +++ b/Externals/wxWidgets3/include/wx/vidmode.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 27.09.2003 (extracted from wx/display.h) -// RCS-ID: $Id: vidmode.h 53124 2008-04-11 09:52:04Z VS $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/vlbox.h b/Externals/wxWidgets3/include/wx/vlbox.h index 62f0299b23..1981110509 100644 --- a/Externals/wxWidgets3/include/wx/vlbox.h +++ b/Externals/wxWidgets3/include/wx/vlbox.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 31.05.03 -// RCS-ID: $Id: vlbox.h 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -247,7 +246,7 @@ protected: // common part of all ctors void Init(); - // send the wxEVT_COMMAND_LISTBOX_SELECTED event + // send the wxEVT_LISTBOX event void SendSelectedEvent(); virtual void InitEvent(wxCommandEvent& event, int n); diff --git a/Externals/wxWidgets3/include/wx/volume.h b/Externals/wxWidgets3/include/wx/volume.h index 441e3e996f..fd6a8370e0 100644 --- a/Externals/wxWidgets3/include/wx/volume.h +++ b/Externals/wxWidgets3/include/wx/volume.h @@ -4,7 +4,6 @@ // Author: George Policello // Modified by: // Created: 28 Jan 02 -// RCS-ID: $Id: volume.h 56910 2008-11-22 15:54:33Z FM $ // Copyright: (c) 2002 George Policello // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/vscroll.h b/Externals/wxWidgets3/include/wx/vscroll.h index 6bf9623c36..2312d78f0b 100644 --- a/Externals/wxWidgets3/include/wx/vscroll.h +++ b/Externals/wxWidgets3/include/wx/vscroll.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: Brad Anderson, Bryan Petty // Created: 30.05.03 -// RCS-ID: $Id: vscroll.h 70085 2011-12-22 01:26:11Z RD $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -14,6 +13,7 @@ #include "wx/panel.h" #include "wx/position.h" +#include "wx/scrolwin.h" class WXDLLIMPEXP_FWD_CORE wxVarScrollHelperEvtHandler; @@ -24,6 +24,11 @@ class WXDLLIMPEXP_FWD_CORE wxVarScrollHelperEvtHandler; // scrolwin.h) for the purpose of reducing code duplication | // through the use of mix-in classes. | // | +// wxAnyScrollHelperBase | +// | | +// | | +// | | +// V | // wxVarScrollHelperBase | // / \ | // / \ | @@ -59,7 +64,7 @@ class WXDLLIMPEXP_FWD_CORE wxVarScrollHelperEvtHandler; // required virtual functions that need to be implemented for any orientation // specific work. -class WXDLLIMPEXP_CORE wxVarScrollHelperBase +class WXDLLIMPEXP_CORE wxVarScrollHelperBase : public wxAnyScrollHelperBase { public: // constructors and such @@ -115,10 +120,6 @@ public: // child of it in order to scroll only a portion the area between the // scrollbars (spreadsheet: only cell area will move). virtual void SetTargetWindow(wxWindow *target); - virtual wxWindow *GetTargetWindow() const { return m_targetWindow; } - - // Override this function to draw the graphic (or just process EVT_PAINT) - //virtual void OnDraw(wxDC& WXUNUSED(dc)) { } // change the DC origin according to the scroll position. To properly // forward calls to wxWindow::Layout use WX_FORWARD_TO_SCROLL_HELPER() @@ -257,12 +258,6 @@ protected: void IncOrient(wxCoord& x, wxCoord& y, wxCoord inc); private: - - // the window that receives the scroll events and the window to actually - // scroll, respectively - wxWindow *m_win, - *m_targetWindow; - // the total number of (logical) units size_t m_unitMax; diff --git a/Externals/wxWidgets3/include/wx/weakref.h b/Externals/wxWidgets3/include/wx/weakref.h index 496d90cb29..b692f037e8 100644 --- a/Externals/wxWidgets3/include/wx/weakref.h +++ b/Externals/wxWidgets3/include/wx/weakref.h @@ -3,7 +3,6 @@ // Purpose: wxWeakRef - Generic weak references for wxWidgets // Author: Arne Steinarson // Created: 27 Dec 07 -// RCS-ID: $Id: weakref.h 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 2007 Arne Steinarson // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -227,14 +226,14 @@ public: template wxWeakRef(TDerived* pobj) { - Assign(pobj); + this->Assign(pobj); } // We need this copy ctor, since otherwise a default compiler (binary) copy // happens (if embedded as an object member). wxWeakRef(const wxWeakRef& wr) { - Assign(wr.get()); + this->Assign(wr.get()); } wxWeakRef& operator=(const wxWeakRef& wr) diff --git a/Externals/wxWidgets3/include/wx/webview.h b/Externals/wxWidgets3/include/wx/webview.h index 993d99cfa5..25a235da9d 100644 --- a/Externals/wxWidgets3/include/wx/webview.h +++ b/Externals/wxWidgets3/include/wx/webview.h @@ -2,13 +2,12 @@ // Name: webview.h // Purpose: Common interface and events for web view component // Author: Marianne Gagnon -// Id: $Id: webview.h 70038 2011-12-17 23:52:40Z VZ $ // Copyright: (c) 2010 Marianne Gagnon, 2011 Steven Lamerton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_WEB_VIEW_H_ -#define _WX_WEB_VIEW_H_ +#ifndef _WX_WEBVIEW_H_ +#define _WX_WEBVIEW_H_ #include "wx/defs.h" @@ -32,47 +31,51 @@ class wxFSFile; class wxFileSystem; +class wxWebView; enum wxWebViewZoom { - wxWEB_VIEW_ZOOM_TINY, - wxWEB_VIEW_ZOOM_SMALL, - wxWEB_VIEW_ZOOM_MEDIUM, - wxWEB_VIEW_ZOOM_LARGE, - wxWEB_VIEW_ZOOM_LARGEST + wxWEBVIEW_ZOOM_TINY, + wxWEBVIEW_ZOOM_SMALL, + wxWEBVIEW_ZOOM_MEDIUM, + wxWEBVIEW_ZOOM_LARGE, + wxWEBVIEW_ZOOM_LARGEST }; enum wxWebViewZoomType { //Scales entire page, including images - wxWEB_VIEW_ZOOM_TYPE_LAYOUT, - wxWEB_VIEW_ZOOM_TYPE_TEXT + wxWEBVIEW_ZOOM_TYPE_LAYOUT, + wxWEBVIEW_ZOOM_TYPE_TEXT }; enum wxWebViewNavigationError { - wxWEB_NAV_ERR_CONNECTION, - wxWEB_NAV_ERR_CERTIFICATE, - wxWEB_NAV_ERR_AUTH, - wxWEB_NAV_ERR_SECURITY, - wxWEB_NAV_ERR_NOT_FOUND, - wxWEB_NAV_ERR_REQUEST, - wxWEB_NAV_ERR_USER_CANCELLED, - wxWEB_NAV_ERR_OTHER + wxWEBVIEW_NAV_ERR_CONNECTION, + wxWEBVIEW_NAV_ERR_CERTIFICATE, + wxWEBVIEW_NAV_ERR_AUTH, + wxWEBVIEW_NAV_ERR_SECURITY, + wxWEBVIEW_NAV_ERR_NOT_FOUND, + wxWEBVIEW_NAV_ERR_REQUEST, + wxWEBVIEW_NAV_ERR_USER_CANCELLED, + wxWEBVIEW_NAV_ERR_OTHER }; enum wxWebViewReloadFlags { //Default, may access cache - wxWEB_VIEW_RELOAD_DEFAULT, - wxWEB_VIEW_RELOAD_NO_CACHE + wxWEBVIEW_RELOAD_DEFAULT, + wxWEBVIEW_RELOAD_NO_CACHE }; -enum wxWebViewBackend +enum wxWebViewFindFlags { - wxWEB_VIEW_BACKEND_DEFAULT, - wxWEB_VIEW_BACKEND_WEBKIT, - wxWEB_VIEW_BACKEND_IE + wxWEBVIEW_FIND_WRAP = 0x0001, + wxWEBVIEW_FIND_ENTIRE_WORD = 0x0002, + wxWEBVIEW_FIND_MATCH_CASE = 0x0004, + wxWEBVIEW_FIND_HIGHLIGHT_RESULT = 0x0008, + wxWEBVIEW_FIND_BACKWARDS = 0x0010, + wxWEBVIEW_FIND_DEFAULT = 0 }; //Base class for custom scheme handlers @@ -89,10 +92,33 @@ private: extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewNameStr[]; extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewDefaultURLStr[]; +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendDefault[]; +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendIE[]; +extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendWebKit[]; + +class WXDLLIMPEXP_WEBVIEW wxWebViewFactory : public wxObject +{ +public: + virtual wxWebView* Create() = 0; + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) = 0; +}; + +WX_DECLARE_STRING_HASH_MAP(wxSharedPtr, wxStringWebViewFactoryMap); class WXDLLIMPEXP_WEBVIEW wxWebView : public wxControl { public: + wxWebView() + { + m_showMenu = true; + } + virtual ~wxWebView() {} virtual bool Create(wxWindow* parent, @@ -103,36 +129,49 @@ public: long style = 0, const wxString& name = wxWebViewNameStr) = 0; - static wxWebView* New(wxWebViewBackend backend = wxWEB_VIEW_BACKEND_DEFAULT); + // Factory methods allowing the use of custom factories registered with + // RegisterFactory + static wxWebView* New(const wxString& backend = wxWebViewBackendDefault); static wxWebView* New(wxWindow* parent, - wxWindowID id, - const wxString& url = wxWebViewDefaultURLStr, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - wxWebViewBackend backend = wxWEB_VIEW_BACKEND_DEFAULT, - long style = 0, - const wxString& name = wxWebViewNameStr); + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + const wxString& backend = wxWebViewBackendDefault, + long style = 0, + const wxString& name = wxWebViewNameStr); - //General methods + static void RegisterFactory(const wxString& backend, + wxSharedPtr factory); + + // General methods + virtual void EnableContextMenu(bool enable = true) + { + m_showMenu = enable; + } virtual wxString GetCurrentTitle() const = 0; virtual wxString GetCurrentURL() const = 0; // TODO: handle choosing a frame when calling GetPageSource()? virtual wxString GetPageSource() const = 0; virtual wxString GetPageText() const = 0; virtual bool IsBusy() const = 0; + virtual bool IsContextMenuEnabled() const { return m_showMenu; } virtual bool IsEditable() const = 0; virtual void LoadURL(const wxString& url) = 0; virtual void Print() = 0; virtual void RegisterHandler(wxSharedPtr handler) = 0; - virtual void Reload(wxWebViewReloadFlags flags = wxWEB_VIEW_RELOAD_DEFAULT) = 0; + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT) = 0; virtual void RunScript(const wxString& javascript) = 0; virtual void SetEditable(bool enable = true) = 0; - virtual void SetPage(const wxString& html, const wxString& baseUrl) = 0; - virtual void SetPage(wxInputStream& html, wxString baseUrl) + void SetPage(const wxString& html, const wxString& baseUrl) + { + DoSetPage(html, baseUrl); + } + void SetPage(wxInputStream& html, wxString baseUrl) { wxStringOutputStream stream; stream.Write(html); - SetPage(stream.GetString(), baseUrl); + DoSetPage(stream.GetString(), baseUrl); } virtual void Stop() = 0; @@ -176,6 +215,21 @@ public: virtual void Undo() = 0; virtual void Redo() = 0; + //Get the pointer to the underlying native engine. + virtual void* GetNativeBackend() const = 0; + //Find function + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) = 0; + +protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl) = 0; + +private: + static void InitFactoryMap(); + static wxStringWebViewFactoryMap::iterator FindFactory(const wxString &backend); + + bool m_showMenu; + static wxStringWebViewFactoryMap m_factoryMap; + wxDECLARE_ABSTRACT_CLASS(wxWebView); }; @@ -200,12 +254,12 @@ private: wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxWebViewEvent); }; -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_NAVIGATING, wxWebViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_NAVIGATED, wxWebViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_LOADED, wxWebViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_ERROR, wxWebViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_NEWWINDOW, wxWebViewEvent ); -wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_NAVIGATING, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_NAVIGATED, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_LOADED, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_ERROR, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_NEWWINDOW, wxWebViewEvent ); +wxDECLARE_EXPORTED_EVENT( WXDLLIMPEXP_WEBVIEW, wxEVT_WEBVIEW_TITLE_CHANGED, wxWebViewEvent ); typedef void (wxEvtHandler::*wxWebViewEventFunction) (wxWebViewEvent&); @@ -213,30 +267,38 @@ typedef void (wxEvtHandler::*wxWebViewEventFunction) #define wxWebViewEventHandler(func) \ wxEVENT_HANDLER_CAST(wxWebViewEventFunction, func) -#define EVT_WEB_VIEW_NAVIGATING(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_NAVIGATING, id, \ +#define EVT_WEBVIEW_NAVIGATING(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_NAVIGATING, id, \ wxWebViewEventHandler(fn)) -#define EVT_WEB_VIEW_NAVIGATED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_NAVIGATED, id, \ +#define EVT_WEBVIEW_NAVIGATED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_NAVIGATED, id, \ wxWebViewEventHandler(fn)) -#define EVT_WEB_VIEW_LOADED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_LOADED, id, \ +#define EVT_WEBVIEW_LOADED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_LOADED, id, \ wxWebViewEventHandler(fn)) -#define EVT_WEB_VIEW_ERROR(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_ERROR, id, \ +#define EVT_WEBVIEW_ERROR(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_ERROR, id, \ wxWebViewEventHandler(fn)) -#define EVT_WEB_VIEW_NEWWINDOW(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_NEWWINDOW, id, \ +#define EVT_WEBVIEW_NEWWINDOW(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_NEWWINDOW, id, \ wxWebViewEventHandler(fn)) -#define EVT_WEB_VIEW_TITLE_CHANGED(id, fn) \ - wx__DECLARE_EVT1(wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED, id, \ +#define EVT_WEBVIEW_TITLE_CHANGED(id, fn) \ + wx__DECLARE_EVT1(wxEVT_WEBVIEW_TITLE_CHANGED, id, \ wxWebViewEventHandler(fn)) +// old wxEVT_COMMAND_* constants +#define wxEVT_COMMAND_WEBVIEW_NAVIGATING wxEVT_WEBVIEW_NAVIGATING +#define wxEVT_COMMAND_WEBVIEW_NAVIGATED wxEVT_WEBVIEW_NAVIGATED +#define wxEVT_COMMAND_WEBVIEW_LOADED wxEVT_WEBVIEW_LOADED +#define wxEVT_COMMAND_WEBVIEW_ERROR wxEVT_WEBVIEW_ERROR +#define wxEVT_COMMAND_WEBVIEW_NEWWINDOW wxEVT_WEBVIEW_NEWWINDOW +#define wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED wxEVT_WEBVIEW_TITLE_CHANGED + #endif // wxUSE_WEBVIEW -#endif // _WX_WEB_VIEW_H_ +#endif // _WX_WEBVIEW_H_ diff --git a/Externals/wxWidgets3/include/wx/webviewarchivehandler.h b/Externals/wxWidgets3/include/wx/webviewarchivehandler.h index 4cd91dc4af..8b2eb19908 100644 --- a/Externals/wxWidgets3/include/wx/webviewarchivehandler.h +++ b/Externals/wxWidgets3/include/wx/webviewarchivehandler.h @@ -2,13 +2,12 @@ // Name: webviewarchivehandler.h // Purpose: Custom webview handler to allow archive browsing // Author: Steven Lamerton -// Id: $Id: webviewarchivehandler.h 69316 2011-10-05 21:21:51Z SJL $ // Copyright: (c) 2011 Steven Lamerton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifndef _WX_WEB_VIEW_FILE_HANDLER_H_ -#define _WX_WEB_VIEW_FILE_HANDLER_H_ +#ifndef _WX_WEBVIEW_FILE_HANDLER_H_ +#define _WX_WEBVIEW_FILE_HANDLER_H_ #include "wx/setup.h" @@ -20,7 +19,7 @@ class wxFileSystem; #include "wx/webview.h" //Loads from uris such as scheme:///C:/example/example.html or archives such as -//scheme:///C:/example/example.zip;protocol=zip/example.html +//scheme:///C:/example/example.zip;protocol=zip/example.html class WXDLLIMPEXP_WEBVIEW wxWebViewArchiveHandler : public wxWebViewHandler { @@ -34,4 +33,4 @@ private: #endif // wxUSE_WEBVIEW -#endif // _WX_WEB_VIEW_FILE_HANDLER_H_ +#endif // _WX_WEBVIEW_FILE_HANDLER_H_ diff --git a/Externals/wxWidgets3/include/wx/webviewfshandler.h b/Externals/wxWidgets3/include/wx/webviewfshandler.h new file mode 100644 index 0000000000..ebdbbcb906 --- /dev/null +++ b/Externals/wxWidgets3/include/wx/webviewfshandler.h @@ -0,0 +1,37 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: webviewfshandler.h +// Purpose: Custom webview handler for virtual file system +// Author: Nick Matthews +// Copyright: (c) 2012 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// Based on webviewarchivehandler.h file by Steven Lamerton + +#ifndef _WX_WEBVIEW_FS_HANDLER_H_ +#define _WX_WEBVIEW_FS_HANDLER_H_ + +#include "wx/setup.h" + +#if wxUSE_WEBVIEW + +class wxFSFile; +class wxFileSystem; + +#include "wx/webview.h" + +//Loads from uris such as scheme:example.html + +class WXDLLIMPEXP_WEBVIEW wxWebViewFSHandler : public wxWebViewHandler +{ +public: + wxWebViewFSHandler(const wxString& scheme); + virtual ~wxWebViewFSHandler(); + virtual wxFSFile* GetFile(const wxString &uri); +private: + wxFileSystem* m_fileSystem; +}; + +#endif // wxUSE_WEBVIEW + +#endif // _WX_WEBVIEW_FS_HANDLER_H_ diff --git a/Externals/wxWidgets3/include/wx/wfstream.h b/Externals/wxWidgets3/include/wx/wfstream.h index 753e8349d7..613b4c273b 100644 --- a/Externals/wxWidgets3/include/wx/wfstream.h +++ b/Externals/wxWidgets3/include/wx/wfstream.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: // Created: 11/07/98 -// RCS-ID: $Id: wfstream.h 62995 2009-12-27 19:39:55Z VZ $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -42,6 +41,8 @@ public: virtual bool IsOk() const; bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + wxFile* GetFile() const { return m_file; } + protected: wxFileInputStream(); @@ -72,6 +73,8 @@ public: virtual bool IsOk() const; bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + wxFile* GetFile() const { return m_file; } + protected: wxFileOutputStream(); @@ -169,6 +172,8 @@ public: virtual bool IsOk() const; bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + wxFFile* GetFile() const { return m_file; } + protected: wxFFileInputStream(); @@ -199,6 +204,8 @@ public: virtual bool IsOk() const; bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + wxFFile* GetFile() const { return m_file; } + protected: wxFFileOutputStream(); diff --git a/Externals/wxWidgets3/include/wx/window.h b/Externals/wxWidgets3/include/wx/window.h index 3ec3b57692..fc37b81944 100644 --- a/Externals/wxWidgets3/include/wx/window.h +++ b/Externals/wxWidgets3/include/wx/window.h @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: Ron Lee // Created: 01/02/97 -// RCS-ID: $Id: window.h 70838 2012-03-07 23:50:21Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -379,6 +378,13 @@ public: *h = s.y; } + // Determine the best size in the other direction if one of them is + // fixed. This is used with windows that can wrap their contents and + // returns input-independent best size for the others. + int GetBestHeight(int width) const; + int GetBestWidth(int height) const; + + void SetScrollHelper( wxScrollHelper *sh ) { m_scrollHelper = sh; } wxScrollHelper *GetScrollHelper() { return m_scrollHelper; } @@ -393,13 +399,18 @@ public: // minimum size, giving priority to the min size components, and // returns the results. virtual wxSize GetEffectiveMinSize() const; - wxDEPRECATED( wxSize GetBestFittingSize() const ); // replaced by GetEffectiveMinSize - wxDEPRECATED( wxSize GetAdjustedMinSize() const ); // replaced by GetEffectiveMinSize + + wxDEPRECATED_MSG("use GetEffectiveMinSize() instead") + wxSize GetBestFittingSize() const; + wxDEPRECATED_MSG("use GetEffectiveMinSize() instead") + wxSize GetAdjustedMinSize() const; // A 'Smart' SetSize that will fill in default size values with 'best' // size. Sets the minsize to what was passed in. void SetInitialSize(const wxSize& size=wxDefaultSize); - wxDEPRECATED( void SetBestFittingSize(const wxSize& size=wxDefaultSize) ); // replaced by SetInitialSize + + wxDEPRECATED_MSG("use SetInitialSize() instead") + void SetBestFittingSize(const wxSize& size=wxDefaultSize); // the generic centre function - centers the window on parent by` @@ -514,6 +525,11 @@ public: return wxSize( wxMax( client.x, best.x ), wxMax( client.y, best.y ) ); } + // returns the magnification of the content of this window + // eg 2.0 for a window on a retina screen + virtual double GetContentScaleFactor() const + { return 1.0; } + // return the size of the left/right and top/bottom borders in x and y // components of the result respectively virtual wxSize GetWindowBorderSize() const; @@ -548,6 +564,43 @@ public: // this is the same as SendSizeEventToParent() but using PostSizeEvent() void PostSizeEventToParent() { SendSizeEventToParent(wxSEND_EVENT_POST); } + // These functions should be used before repositioning the children of + // this window to reduce flicker or, in MSW case, even avoid display + // corruption in some situations (so they're more than just optimization). + // + // EndRepositioningChildren() should be called if and only if + // BeginRepositioningChildren() returns true. To ensure that this is always + // done automatically, use ChildrenRepositioningGuard class below. + virtual bool BeginRepositioningChildren() { return false; } + virtual void EndRepositioningChildren() { } + + // A simple helper which ensures that EndRepositioningChildren() is called + // from its dtor if and only if calling BeginRepositioningChildren() from + // the ctor returned true. + class ChildrenRepositioningGuard + { + public: + // Notice that window can be NULL here, for convenience. In this case + // this class simply doesn't do anything. + wxEXPLICIT ChildrenRepositioningGuard(wxWindowBase* win) + : m_win(win), + m_callEnd(win && win->BeginRepositioningChildren()) + { + } + + ~ChildrenRepositioningGuard() + { + if ( m_callEnd ) + m_win->EndRepositioningChildren(); + } + + private: + wxWindowBase* const m_win; + const bool m_callEnd; + + wxDECLARE_NO_COPY_CLASS(ChildrenRepositioningGuard); + }; + // window state // ------------ @@ -675,8 +728,13 @@ public: virtual bool AcceptsFocusFromKeyboard() const { return AcceptsFocus(); } - // this is mostly a helper for the various functions using it below - bool CanBeFocused() const { return IsShown() && IsEnabled(); } + // Can this window be focused right now, in its current state? This + // shouldn't be called at all if AcceptsFocus() returns false. + // + // It is a convenient helper for the various functions using it below + // but also a hook allowing to override the default logic for some rare + // cases (currently just wxRadioBox in wxMSW) when it's inappropriate. + virtual bool CanBeFocused() const { return IsShown() && IsEnabled(); } // can this window itself have focus? bool IsFocusable() const { return AcceptsFocus() && CanBeFocused(); } @@ -740,8 +798,12 @@ public: // is this window a top level one? virtual bool IsTopLevel() const; + // is this window a child or grand child of this one (inside the same + // TLW)? + bool IsDescendant(wxWindowBase* win) const; + // it doesn't really change parent, use Reparent() instead - void SetParent( wxWindowBase *parent ) { m_parent = (wxWindow *)parent; } + void SetParent( wxWindowBase *parent ); // change the real parent of this window, return true if the parent // was changed, false otherwise (error or newParent == oldParent) virtual bool Reparent( wxWindowBase *newParent ); @@ -1164,11 +1226,7 @@ public: // ---------- // can the window have the scrollbar in this orientation? - bool CanScroll(int orient) const - { - return (m_windowStyle & - (orient == wxHORIZONTAL ? wxHSCROLL : wxVSCROLL)) != 0; - } + virtual bool CanScroll(int orient) const; // does the window have the scrollbar in this orientation? bool HasScrollbar(int orient) const; @@ -1500,11 +1558,6 @@ protected: // widgets state are necessary virtual void DoEnable(bool WXUNUSED(enable)) { } - // called when the on-screen widget state changes and provides an - // an opportunity for the widget to update its visual state (colours, - // fonts, anything else) as necessary - virtual void OnEnabled(bool WXUNUSED(enabled)) { } - // the window id - a number which uniquely identifies a window among // its siblings unless it is wxID_ANY @@ -1633,8 +1686,10 @@ protected: // recalculated each time the value is needed. wxSize m_bestSizeCache; - wxDEPRECATED( void SetBestSize(const wxSize& size) ); // use SetInitialSize - wxDEPRECATED( virtual void SetInitialBestSize(const wxSize& size) ); // use SetInitialSize + wxDEPRECATED_MSG("use SetInitialSize() instead.") + void SetBestSize(const wxSize& size); + wxDEPRECATED_MSG("use SetInitialSize() instead.") + virtual void SetInitialBestSize(const wxSize& size); @@ -1683,6 +1738,14 @@ protected: // (GetBorderSize() will be used to add them) virtual wxSize DoGetBestClientSize() const { return wxDefaultSize; } + // These two methods can be overridden to implement intelligent + // width-for-height and/or height-for-width best size determination for the + // window. By default the fixed best size is used. + virtual int DoGetBestClientHeight(int WXUNUSED(width)) const + { return wxDefaultCoord; } + virtual int DoGetBestClientWidth(int WXUNUSED(height)) const + { return wxDefaultCoord; } + // this is the virtual function to be overridden in any derived class which // wants to change how SetSize() or Move() works - it is called by all // versions of these functions in the base class @@ -1749,7 +1812,7 @@ protected: static void NotifyCaptureLost(); private: - // recursively call our own and our children OnEnabled() when the + // recursively call our own and our children DoEnable() when the // enabled/disabled status changed because a parent window had been // enabled/disabled void NotifyWindowOnEnableChange(bool enabled); @@ -1770,15 +1833,6 @@ private: // base for dialog unit conversion, i.e. average character size wxSize GetDlgUnitBase() const; - // the stack of windows which have captured the mouse - static struct WXDLLIMPEXP_FWD_CORE wxWindowNext *ms_winCaptureNext; - - // the window that currently has mouse capture - static wxWindow *ms_winCaptureCurrent; - - // indicates if execution is inside CaptureMouse/ReleaseMouse - static bool ms_winCaptureChanging; - // number of Freeze() calls minus the number of Thaw() calls: we're frozen // (i.e. not being updated) if it is positive @@ -1913,8 +1967,7 @@ extern WXDLLIMPEXP_CORE wxWindow *wxGetActiveWindow(); WXDLLIMPEXP_CORE wxWindow* wxGetTopLevelParent(wxWindow *win); #if WXWIN_COMPATIBILITY_2_6 - // deprecated (doesn't start with 'wx' prefix), use wxWindow::NewControlId() - wxDEPRECATED( wxWindowID NewControlId() ); + wxDEPRECATED_MSG("use wxWindow::NewControlId() instead") inline wxWindowID NewControlId() { return wxWindowBase::NewControlId(); } #endif // WXWIN_COMPATIBILITY_2_6 diff --git a/Externals/wxWidgets3/include/wx/windowid.h b/Externals/wxWidgets3/include/wx/windowid.h index bca21fb42f..0c174b5f0c 100644 --- a/Externals/wxWidgets3/include/wx/windowid.h +++ b/Externals/wxWidgets3/include/wx/windowid.h @@ -3,7 +3,6 @@ // Purpose: wxWindowID class - a class for managing window ids // Author: Brian Vanderburg II // Created: 2007-09-21 -// RCS-ID: $Id: windowid.h 51123 2008-01-09 04:08:33Z PC $ // Copyright: (c) 2007 Brian Vanderburg II // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -43,7 +42,7 @@ public: wxWindowIDRef(long id) { - Init(id); + Init(wxWindowID(id)); } wxWindowIDRef(const wxWindowIDRef& id) @@ -66,7 +65,7 @@ public: wxWindowIDRef& operator=(long id) { - Assign(id); + Assign(wxWindowID(id)); return *this; } diff --git a/Externals/wxWidgets3/include/wx/windowptr.h b/Externals/wxWidgets3/include/wx/windowptr.h new file mode 100644 index 0000000000..bebcf6ad8f --- /dev/null +++ b/Externals/wxWidgets3/include/wx/windowptr.h @@ -0,0 +1,63 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: wx/windowptr.h +// Purpose: smart pointer for holding wxWindow instances +// Author: Vaclav Slavik +// Created: 2013-09-01 +// Copyright: (c) 2013 Vaclav Slavik +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WINDOWPTR_H_ +#define _WX_WINDOWPTR_H_ + +#include "wx/sharedptr.h" + +// ---------------------------------------------------------------------------- +// wxWindowPtr: A smart pointer with correct wxWindow destruction. +// ---------------------------------------------------------------------------- + +namespace wxPrivate +{ + +struct wxWindowDeleter +{ + void operator()(wxWindow *win) + { + win->Destroy(); + } +}; + +} // namespace wxPrivate + +template +class wxWindowPtr : public wxSharedPtr +{ +public: + typedef T element_type; + + wxEXPLICIT wxWindowPtr(element_type* win) + : wxSharedPtr(win, wxPrivate::wxWindowDeleter()) + { + } + + wxWindowPtr() {} + wxWindowPtr(const wxWindowPtr& tocopy) : wxSharedPtr(tocopy) {} + + wxWindowPtr& operator=(const wxWindowPtr& tocopy) + { + wxSharedPtr::operator=(tocopy); + return *this; + } + + wxWindowPtr& operator=(element_type* win) + { + return operator=(wxWindowPtr(win)); + } + + void reset(T* ptr = NULL) + { + wxSharedPtr::reset(ptr, wxPrivate::wxWindowDeleter()); + } +}; + +#endif // _WX_WINDOWPTR_H_ diff --git a/Externals/wxWidgets3/include/wx/withimages.h b/Externals/wxWidgets3/include/wx/withimages.h index f8ce1c85e4..89120d3eb7 100644 --- a/Externals/wxWidgets3/include/wx/withimages.h +++ b/Externals/wxWidgets3/include/wx/withimages.h @@ -3,7 +3,6 @@ // Purpose: Declaration of a simple wxWithImages class. // Author: Vadim Zeitlin // Created: 2011-08-17 -// RCS-ID: $Id: withimages.h 68813 2011-08-21 14:52:16Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/wizard.h b/Externals/wxWidgets3/include/wx/wizard.h index bd23ce582a..82dc438ac4 100644 --- a/Externals/wxWidgets3/include/wx/wizard.h +++ b/Externals/wxWidgets3/include/wx/wizard.h @@ -9,7 +9,6 @@ // Added wxWIZARD_HELP event // Robert Vazan (sizers) // Created: 15.08.99 -// RCS-ID: $Id: wizard.h 70630 2012-02-20 11:38:52Z JS $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -114,7 +113,7 @@ private: // wxWizardPageSimple just returns the pointers given to the ctor and is useful // to create a simple wizard where the order of pages never changes. // -// OTOH, it is also possible to dynamicly decide which page to return (i.e. +// OTOH, it is also possible to dynamically decide which page to return (i.e. // depending on the user's choices) as the wizard sample shows - in order to do // this, you must derive from wxWizardPage directly. // ---------------------------------------------------------------------------- @@ -147,7 +146,15 @@ public: void SetPrev(wxWizardPage *prev) { m_prev = prev; } void SetNext(wxWizardPage *next) { m_next = next; } - // a convenience function to make the pages follow each other + // Convenience functions to make the pages follow each other without having + // to call their SetPrev() or SetNext() explicitly. + wxWizardPageSimple& Chain(wxWizardPageSimple* next) + { + SetNext(next); + next->SetPrev(this); + return *next; + } + static void Chain(wxWizardPageSimple *first, wxWizardPageSimple *second) { wxCHECK_RET( first && second, diff --git a/Externals/wxWidgets3/include/wx/wrapsizer.h b/Externals/wxWidgets3/include/wx/wrapsizer.h index 728acc1d63..a4d6145002 100644 --- a/Externals/wxWidgets3/include/wx/wrapsizer.h +++ b/Externals/wxWidgets3/include/wx/wrapsizer.h @@ -3,7 +3,6 @@ // Purpose: provide wrapping sizer for layout (wxWrapSizer) // Author: Arne Steinarson // Created: 2008-05-08 -// RCS-ID: $Id: wrapsizer.h 53541 2008-05-10 17:48:44Z PC $ // Copyright: (c) Arne Steinarson // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/wupdlock.h b/Externals/wxWidgets3/include/wx/wupdlock.h index eb7614be06..eb799a82e9 100644 --- a/Externals/wxWidgets3/include/wx/wupdlock.h +++ b/Externals/wxWidgets3/include/wx/wupdlock.h @@ -3,7 +3,6 @@ // Purpose: wxWindowUpdateLocker prevents window redrawing // Author: Vadim Zeitlin // Created: 2006-03-06 -// RCS-ID: $Id: wupdlock.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/wx.h b/Externals/wxWidgets3/include/wx/wx.h index 0055778b01..9f6a42cb13 100644 --- a/Externals/wxWidgets3/include/wx/wx.h +++ b/Externals/wxWidgets3/include/wx/wx.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: wx.h 66615 2011-01-07 05:26:57Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/wxchar.h b/Externals/wxWidgets3/include/wx/wxchar.h index 052b237fcb..597bbe1599 100644 --- a/Externals/wxWidgets3/include/wx/wxchar.h +++ b/Externals/wxWidgets3/include/wx/wxchar.h @@ -4,7 +4,6 @@ // Author: Joel Farley, Ove KÃ¥ven // Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee // Created: 1998/06/12 -// RCS-ID: $Id: wxchar.h 61961 2009-09-18 16:16:12Z VZ $ // Copyright: (c) 1998-2006 wxWidgets dev team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/wxcrt.h b/Externals/wxWidgets3/include/wx/wxcrt.h index e464e36c80..dd579364fa 100644 --- a/Externals/wxWidgets3/include/wx/wxcrt.h +++ b/Externals/wxWidgets3/include/wx/wxcrt.h @@ -5,7 +5,6 @@ // Author: Joel Farley, Ove Kaaven // Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee, Vaclav Slavik // Created: 1998/06/12 -// RCS-ID: $Id: wxcrt.h 68594 2011-08-08 08:33:19Z VZ $ // Copyright: (c) 1998-2006 wxWidgets dev team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/wxcrtbase.h b/Externals/wxWidgets3/include/wx/wxcrtbase.h index 4d3d9ebb22..16f6499229 100644 --- a/Externals/wxWidgets3/include/wx/wxcrtbase.h +++ b/Externals/wxWidgets3/include/wx/wxcrtbase.h @@ -5,7 +5,6 @@ * Author: Joel Farley, Ove Kaaven * Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee * Created: 1998/06/12 - * RCS-ID: $Id: wxcrtbase.h 70345 2012-01-15 01:05:28Z VZ $ * Copyright: (c) 1998-2006 wxWidgets dev team * Licence: wxWindows licence */ @@ -63,7 +62,7 @@ define it ourselves for them */ #ifndef isascii - #if defined(__MWERKS__) || defined(__WX_STRICT_ANSI_GCC__) + #if defined(__WX_STRICT_ANSI_GCC__) #define wxNEED_ISASCII #elif defined(_WIN32_WCE) #if _WIN32_WCE <= 211 @@ -84,9 +83,7 @@ /* string.h functions */ #ifndef strdup - #if defined(__MWERKS__) && !defined(__MACH__) && (__MSL__ < 0x00008000) - #define wxNEED_STRDUP - #elif defined(__WXWINCE__) + #if defined(__WXWINCE__) #if _WIN32_WCE <= 211 #define wxNEED_STRDUP #endif @@ -105,21 +102,6 @@ WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size ); #endif /* _WIN32_WCE */ -#if defined(__MWERKS__) - /* Metrowerks only has wide char support for OS X >= 10.3 */ - #if !defined(__DARWIN__) || \ - (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3) - #define wxHAVE_MWERKS_UNICODE - #endif - - #ifdef wxHAVE_MWERKS_UNICODE - #define HAVE_WPRINTF 1 - #define HAVE_WCSRTOMBS 1 - #define HAVE_VSWPRINTF 1 - #endif -#endif /* __MWERKS__ */ - - /* ------------------------------------------------------------------------- UTF-8 locale handling ------------------------------------------------------------------------- */ @@ -181,17 +163,15 @@ WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size ); #define wxCRT_StrxfrmW wcsxfrm #endif /* __WXWINCE__ */ -/* Almost all compiler have strdup(), but not quite all: CodeWarrior under - Mac and VC++ for Windows CE don't provide it. Another special case is gcc in - strict ANSI mode: normally it doesn't provide strdup() but MinGW does - provide it under MSVC-compatible name so test for it before checking - __WX_STRICT_ANSI_GCC__. */ -#if (defined(__VISUALC__) && __VISUALC__ >= 1400) || \ - defined(__MINGW32__) +/* Almost all compilers have strdup(), but VC++ and MinGW call it _strdup(). + And it's not available in MinGW strict ANSI mode nor under Windows CE. */ +#if (defined(__VISUALC__) && __VISUALC__ >= 1400) #define wxCRT_StrdupA _strdup -#elif !((defined(__MWERKS__) && defined(__WXMAC__)) || \ - defined(__WXWINCE__) || \ - defined(__WX_STRICT_ANSI_GCC__)) +#elif defined(__MINGW32__) + #ifndef __WX_STRICT_ANSI_GCC__ + #define wxCRT_StrdupA _strdup + #endif +#elif !defined(__WXWINCE__) #define wxCRT_StrdupA strdup #endif @@ -268,8 +248,7 @@ WXDLLIMPEXP_BASE void *calloc( size_t num, size_t size ); defined(__EMX__) || defined(__DJGPP__) #define wxCRT_StricmpA stricmp #define wxCRT_StrnicmpA strnicmp -#elif defined(__SYMANTEC__) || defined(__VISUALC__) || \ - (defined(__MWERKS__) && defined(__INTEL__)) +#elif defined(__SYMANTEC__) || (defined(__VISUALC__) && !defined(__WXWINCE__)) #define wxCRT_StricmpA _stricmp #define wxCRT_StrnicmpA _strnicmp #elif defined(__UNIX__) || (defined(__GNUWIN32__) && !defined(__WX_STRICT_ANSI_GCC__)) @@ -574,14 +553,7 @@ WXDLLIMPEXP_BASE wchar_t * wxCRT_GetenvW(const wchar_t *name); #define wxCRT_AtoiA atoi #define wxCRT_AtolA atol -#if defined(__MWERKS__) - #if defined(__MSL__) - #define wxCRT_AtofW watof - #define wxCRT_AtoiW watoi - #define wxCRT_AtolW watol - /* else: use ANSI versions */ - #endif -#elif defined(wxHAVE_TCHAR_SUPPORT) && !defined(__WX_STRICT_ANSI_GCC__) +#if defined(wxHAVE_TCHAR_SUPPORT) && !defined(__WX_STRICT_ANSI_GCC__) #define wxCRT_AtoiW _wtoi #define wxCRT_AtolW _wtol /* _wtof doesn't exist */ @@ -593,21 +565,6 @@ WXDLLIMPEXP_BASE wchar_t * wxCRT_GetenvW(const wchar_t *name); /* wcstoi doesn't exist */ #endif -/* - There are 2 unrelated problems with these functions under Mac: - a) Metrowerks MSL CRT implements them strictly in C99 sense and - doesn't support (very common) extension of allowing to call - mbstowcs(NULL, ...) which makes it pretty useless as you can't - know the size of the needed buffer - b) OS X <= 10.2 declares and even defined these functions but - doesn't really implement them -- they always return an error - - So use our own replacements in both cases. - */ -#if defined(__MWERKS__) && defined(__MSL__) - #define wxNEED_WX_MBSTOWCS -#endif - #ifdef __DARWIN__ #if !defined(__WXOSX_IPHONE__) && MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2 #define wxNEED_WX_MBSTOWCS diff --git a/Externals/wxWidgets3/include/wx/wxcrtvararg.h b/Externals/wxWidgets3/include/wx/wxcrtvararg.h index fbc8efdc75..c3a306be85 100644 --- a/Externals/wxWidgets3/include/wx/wxcrtvararg.h +++ b/Externals/wxWidgets3/include/wx/wxcrtvararg.h @@ -5,7 +5,6 @@ // Author: Joel Farley, Ove KÃ¥ven // Modified by: Vadim Zeitlin, Robert Roebling, Ron Lee // Created: 2007-02-19 -// RCS-ID: $Id: wxcrtvararg.h 61961 2009-09-18 16:16:12Z VZ $ // Copyright: (c) 2007 REA Elektronik GmbH // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -150,12 +149,8 @@ #define wxCRT_VsnprintfW _vsnwprintf #endif - /* - All versions of CodeWarrior supported by wxWidgets apparently - have both snprintf() and vsnprintf() - */ #if defined(HAVE_VSNPRINTF) \ - || defined(__MWERKS__) || defined(__WATCOMC__) + || defined(__WATCOMC__) #ifdef HAVE_BROKEN_VSNPRINTF_DECL #define wxCRT_VsnprintfA wx_fixed_vsnprintf #else diff --git a/Externals/wxWidgets3/include/wx/wxhtml.h b/Externals/wxWidgets3/include/wx/wxhtml.h index 795bb83212..9759dac060 100644 --- a/Externals/wxWidgets3/include/wx/wxhtml.h +++ b/Externals/wxWidgets3/include/wx/wxhtml.h @@ -2,7 +2,6 @@ // Name: wx/wxhtml.h // Purpose: wxHTML library for wxWidgets // Author: Vaclav Slavik -// RCS-ID: $Id: wxhtml.h 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1999 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/wxprec.h b/Externals/wxWidgets3/include/wx/wxprec.h index d1e3fe8a30..2b50dff4b3 100644 --- a/Externals/wxWidgets3/include/wx/wxprec.h +++ b/Externals/wxWidgets3/include/wx/wxprec.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: wxprec.h 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,7 +16,6 @@ #if defined(__VISUALC__) || \ defined(__DMC__) || \ defined(__VISAGECPP__) || \ - defined(__MWERKS__) || \ defined(__WATCOMC__) || \ defined(__BORLANDC__) @@ -41,11 +39,13 @@ #include "wx/chartype.h" // include standard Windows headers -#if defined(__WXMSW__) +#if defined(__WINDOWS__) #include "wx/msw/wrapwin.h" + #include "wx/msw/private.h" +#endif +#if defined(__WXMSW__) #include "wx/msw/wrapcctl.h" #include "wx/msw/wrapcdlg.h" - #include "wx/msw/private.h" #include "wx/msw/missing.h" #endif diff --git a/Externals/wxWidgets3/include/wx/x11/private/wrapxkb.h b/Externals/wxWidgets3/include/wx/x11/private/wrapxkb.h new file mode 100644 index 0000000000..d13100e7dc --- /dev/null +++ b/Externals/wxWidgets3/include/wx/x11/private/wrapxkb.h @@ -0,0 +1,24 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: wx/x11/private/wrapxkb.h +// Purpose: Private header wrapping X11/XKBlib.h inclusion. +// Author: Vadim Zeitlin +// Created: 2012-05-07 +// Copyright: (c) 2012 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#ifndef _X11_PRIVATE_WRAPXKB_H_ +#define _X11_PRIVATE_WRAPXKB_H_ + +#ifdef HAVE_X11_XKBLIB_H + /* under HP-UX and Solaris 2.6, at least, XKBlib.h defines structures with + * field named "explicit" - which is, of course, an error for a C++ + * compiler. To be on the safe side, just redefine it everywhere. */ + #define explicit __wx_explicit + + #include + + #undef explicit +#endif // HAVE_X11_XKBLIB_H + +#endif // _X11_PRIVATE_WRAPXKB_H_ diff --git a/Externals/wxWidgets3/include/wx/xlocale.h b/Externals/wxWidgets3/include/wx/xlocale.h index e8d02331a1..6a01ad311a 100644 --- a/Externals/wxWidgets3/include/wx/xlocale.h +++ b/Externals/wxWidgets3/include/wx/xlocale.h @@ -3,7 +3,6 @@ // Purpose: Header to provide some xlocale wrappers // Author: Brian Vanderburg II, Vadim Zeitlin // Created: 2008-01-07 -// RCS-ID: $Id: xlocale.h 64109 2010-04-22 14:16:12Z VZ $ // Copyright: (c) 2008 Brian Vanderburg II // 2008 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/xpmdecod.h b/Externals/wxWidgets3/include/wx/xpmdecod.h index be97599289..68edc924e7 100644 --- a/Externals/wxWidgets3/include/wx/xpmdecod.h +++ b/Externals/wxWidgets3/include/wx/xpmdecod.h @@ -2,7 +2,6 @@ // Name: wx/xpmdecod.h // Purpose: wxXPMDecoder, XPM reader for wxImage and wxBitmap // Author: Vaclav Slavik -// CVS-ID: $Id: xpmdecod.h 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 2001 Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/xpmhand.h b/Externals/wxWidgets3/include/wx/xpmhand.h index 4207f7da80..0952748d80 100644 --- a/Externals/wxWidgets3/include/wx/xpmhand.h +++ b/Externals/wxWidgets3/include/wx/xpmhand.h @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: -// RCS-ID: $Id: xpmhand.h 33948 2005-05-04 18:57:50Z JS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/xti.h b/Externals/wxWidgets3/include/wx/xti.h index abd8ae0934..75f594f494 100644 --- a/Externals/wxWidgets3/include/wx/xti.h +++ b/Externals/wxWidgets3/include/wx/xti.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Francesco Montorsi // Created: 27/07/03 -// RCS-ID: $Id: xti.h 70396 2012-01-19 09:00:29Z SC $ // Copyright: (c) 1997 Julian Smart // (c) 2003 Stefan Csomor // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/xti2.h b/Externals/wxWidgets3/include/wx/xti2.h index 70d3c154d8..16e5f212f1 100644 --- a/Externals/wxWidgets3/include/wx/xti2.h +++ b/Externals/wxWidgets3/include/wx/xti2.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Francesco Montorsi // Created: 27/07/03 -// RCS-ID: $Id: xti2.h 66651 2011-01-08 10:22:30Z SC $ // Copyright: (c) 1997 Julian Smart // (c) 2003 Stefan Csomor ///////////////////////////////////////////////////////////////////////////// @@ -124,7 +123,7 @@ wxObject* wxVariantOfPtrToObjectConverter##name ( const wxAny &data ) \ _DEFAULT_CONSTRUCTOR(name) \ _DEFAULT_CONVERTERS(name) \ void wxVariantToObjectConverter##name ( const wxAny &data, wxObjectFunctor* fn ) \ -{ (*fn)( &wxANY_AS(data, name) ); } \ + { name o = wxANY_AS(data, name); (*fn)( &o ); } \ \ const wxClassInfo* name::ms_classParents[] = { &basename::ms_classInfo,NULL }; \ wxClassInfo name::ms_classInfo(name::ms_classParents, wxT(unit), \ diff --git a/Externals/wxWidgets3/include/wx/xtictor.h b/Externals/wxWidgets3/include/wx/xtictor.h index bb380703a7..6969463f38 100644 --- a/Externals/wxWidgets3/include/wx/xtictor.h +++ b/Externals/wxWidgets3/include/wx/xtictor.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Francesco Montorsi // Created: 27/07/03 -// RCS-ID: $Id: xtictor.h 66626 2011-01-07 17:43:12Z SC $ // Copyright: (c) 1997 Julian Smart // (c) 2003 Stefan Csomor // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/include/wx/xtihandler.h b/Externals/wxWidgets3/include/wx/xtihandler.h index aafa2ad1ca..c63ddb3a36 100644 --- a/Externals/wxWidgets3/include/wx/xtihandler.h +++ b/Externals/wxWidgets3/include/wx/xtihandler.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Francesco Montorsi // Created: 27/07/03 -// RCS-ID: $Id: xtihandler.h 66651 2011-01-08 10:22:30Z SC $ // Copyright: (c) 1997 Julian Smart // (c) 2003 Stefan Csomor // Licence: wxWindows licence @@ -94,7 +93,7 @@ private: #define wxHANDLER(name,eventClassType) \ static wxHandlerInfo _handlerInfo##name( first, class_t::GetClassInfoStatic(), \ wxT(#name), (wxObjectEventFunction) (wxEventFunction) &name, \ - CLASSINFO( eventClassType ) ); + wxCLASSINFO( eventClassType ) ); #define wxBEGIN_HANDLERS_TABLE(theClass) \ wxHandlerInfo *theClass::GetHandlersStatic() \ diff --git a/Externals/wxWidgets3/include/wx/xtiprop.h b/Externals/wxWidgets3/include/wx/xtiprop.h index 75539f51e4..18626f2982 100644 --- a/Externals/wxWidgets3/include/wx/xtiprop.h +++ b/Externals/wxWidgets3/include/wx/xtiprop.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Francesco Montorsi // Created: 27/07/03 -// RCS-ID: $Id: xtiprop.h 70398 2012-01-19 09:50:46Z SC $ // Copyright: (c) 1997 Julian Smart // (c) 2003 Stefan Csomor // Licence: wxWindows licence @@ -177,7 +176,7 @@ public: if ( m_setter ) m_setter->Set( object, value ); else - wxLogError( _("SetProperty called w/o valid setter") ); + wxLogError( wxGetTranslation("SetProperty called w/o valid setter") ); } // Getting a simple property (non-collection) @@ -186,7 +185,7 @@ public: if ( m_getter ) m_getter->Get( object, result ); else - wxLogError( _("GetProperty called w/o valid getter") ); + wxLogError( wxGetTranslation("GetProperty called w/o valid getter") ); } // Adding an element to a collection property @@ -195,7 +194,7 @@ public: if ( m_adder ) m_adder->Add( object, value ); else - wxLogError( _("AddToPropertyCollection called w/o valid adder") ); + wxLogError( wxGetTranslation("AddToPropertyCollection called w/o valid adder") ); } // Getting a collection property @@ -204,7 +203,7 @@ public: if ( m_collectionGetter ) m_collectionGetter->Get( obj, result); else - wxLogError( _("GetPropertyCollection called w/o valid collection getter") ); + wxLogError( wxGetTranslation("GetPropertyCollection called w/o valid collection getter") ); } virtual bool HasSetter() const { return m_setter != NULL; } @@ -257,14 +256,14 @@ public: virtual void AddToPropertyCollection(wxObject *WXUNUSED(object), const wxAny &WXUNUSED(value)) const { - wxLogError( _("AddToPropertyCollection called on a generic accessor") ); + wxLogError( wxGetTranslation("AddToPropertyCollection called on a generic accessor") ); } // Getting a collection property virtual void GetPropertyCollection( const wxObject *WXUNUSED(obj), wxAnyList &WXUNUSED(result)) const { - wxLogError ( _("GetPropertyCollection called on a generic accessor") ); + wxLogError ( wxGetTranslation("GetPropertyCollection called on a generic accessor") ); } private: @@ -536,13 +535,13 @@ class WXDLLIMPEXP_FWD_BASE wxStringToAnyHashMap : public wxStringToAnyHashMapBas &_accessor##pname, flags, help, group ); #define wxEVENT_PROPERTY( name, eventType, eventClass ) \ - static wxEventSourceTypeInfo _typeInfo##name( eventType, CLASSINFO( eventClass ) ); \ + static wxEventSourceTypeInfo _typeInfo##name( eventType, wxCLASSINFO( eventClass ) ); \ static wxPropertyInfo _propertyInfo##name( first,class_t::GetClassInfoStatic(), \ wxT(#name), &_typeInfo##name, NULL, wxAny() ); #define wxEVENT_RANGE_PROPERTY( name, eventType, lastEventType, eventClass ) \ static wxEventSourceTypeInfo _typeInfo##name( eventType, lastEventType, \ - CLASSINFO( eventClass ) ); \ + wxCLASSINFO( eventClass ) ); \ static wxPropertyInfo _propertyInfo##name( first, class_t::GetClassInfoStatic(), \ wxT(#name), &_typeInfo##name, NULL, wxAny() ); diff --git a/Externals/wxWidgets3/include/wx/xtistrm.h b/Externals/wxWidgets3/include/wx/xtistrm.h index e304803494..0621ead1ea 100644 --- a/Externals/wxWidgets3/include/wx/xtistrm.h +++ b/Externals/wxWidgets3/include/wx/xtistrm.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 27/07/03 -// RCS-ID: $Id: xtistrm.h 70396 2012-01-19 09:00:29Z SC $ // Copyright: (c) 2003 Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/xtitypes.h b/Externals/wxWidgets3/include/wx/xtitypes.h index 6724bf4c35..afd5c07b45 100644 --- a/Externals/wxWidgets3/include/wx/xtitypes.h +++ b/Externals/wxWidgets3/include/wx/xtitypes.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Francesco Montorsi // Created: 27/07/03 -// RCS-ID: $Id: xtitypes.h 70384 2012-01-18 14:05:39Z SC $ // Copyright: (c) 1997 Julian Smart // (c) 2003 Stefan Csomor // Licence: wxWindows licence @@ -236,7 +235,7 @@ void wxFlagsToString( wxString &s, const e& data ) #define wxBEGIN_FLAGS( e ) \ wxEnumMemberData s_enumDataMembers##e[] = { -#define wxFLAGS_MEMBER( v ) { wxT(#v), v }, +#define wxFLAGS_MEMBER( v ) { wxT(#v), static_cast(v) }, #define wxEND_FLAGS( e ) \ { NULL, 0 } }; \ diff --git a/Externals/wxWidgets3/include/wx/xtixml.h b/Externals/wxWidgets3/include/wx/xtixml.h index 5eaf03fa51..100e0653e1 100644 --- a/Externals/wxWidgets3/include/wx/xtixml.h +++ b/Externals/wxWidgets3/include/wx/xtixml.h @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 27/07/03 -// RCS-ID: $Id: xtixml.h 70397 2012-01-19 09:45:49Z SC $ // Copyright: (c) 2003 Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/zipstrm.h b/Externals/wxWidgets3/include/wx/zipstrm.h index 0d71075225..9cd7631944 100644 --- a/Externals/wxWidgets3/include/wx/zipstrm.h +++ b/Externals/wxWidgets3/include/wx/zipstrm.h @@ -2,7 +2,6 @@ // Name: wx/zipstrm.h // Purpose: Streams for Zip files // Author: Mike Wetherell -// RCS-ID: $Id: zipstrm.h 58757 2009-02-08 11:45:59Z VZ $ // Copyright: (c) Mike Wetherell // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/include/wx/zstream.h b/Externals/wxWidgets3/include/wx/zstream.h index 421116e45b..193bb79d4e 100644 --- a/Externals/wxWidgets3/include/wx/zstream.h +++ b/Externals/wxWidgets3/include/wx/zstream.h @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: Mike Wetherell // Created: 11/07/98 -// RCS-ID: $Id: zstream.h 66259 2010-11-25 00:53:44Z VZ $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/aui/auibar.cpp b/Externals/wxWidgets3/src/aui/auibar.cpp index b6654e2fb4..f2af2eb1f1 100644 --- a/Externals/wxWidgets3/src/aui/auibar.cpp +++ b/Externals/wxWidgets3/src/aui/auibar.cpp @@ -5,7 +5,6 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id: auibar.cpp 70748 2012-02-29 13:58:52Z VZ $ // Copyright: (C) Copyright 2005-2006, Kirix Corporation, All Rights Reserved // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -44,11 +43,11 @@ WX_DEFINE_OBJARRAY(wxAuiToolBarItemArray) -wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent ); +wxDEFINE_EVENT( wxEVT_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEvent ); +wxDEFINE_EVENT( wxEVT_AUITOOLBAR_OVERFLOW_CLICK, wxAuiToolBarEvent ); +wxDEFINE_EVENT( wxEVT_AUITOOLBAR_RIGHT_CLICK, wxAuiToolBarEvent ); +wxDEFINE_EVENT( wxEVT_AUITOOLBAR_MIDDLE_CLICK, wxAuiToolBarEvent ); +wxDEFINE_EVENT( wxEVT_AUITOOLBAR_BEGIN_DRAG, wxAuiToolBarEvent ); IMPLEMENT_CLASS(wxAuiToolBar, wxControl) @@ -101,7 +100,7 @@ public: bool ProcessEvent(wxEvent& evt) { - if (evt.GetEventType() == wxEVT_COMMAND_MENU_SELECTED) + if (evt.GetEventType() == wxEVT_MENU) { m_lastId = evt.GetId(); return true; @@ -214,6 +213,19 @@ void wxAuiDefaultToolBarArt::DrawBackground( dc.GradientFillLinear(rect, startColour, endColour, wxSOUTH); } +void wxAuiDefaultToolBarArt::DrawPlainBackground(wxDC& dc, + wxWindow* WXUNUSED(wnd), + const wxRect& _rect) +{ + wxRect rect = _rect; + rect.height++; + + dc.SetBrush(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); + + dc.DrawRectangle(rect.GetX() - 1, rect.GetY() - 1, + rect.GetWidth() + 2, rect.GetHeight() + 1); +} + void wxAuiDefaultToolBarArt::DrawLabel( wxDC& dc, wxWindow* WXUNUSED(wnd), @@ -313,7 +325,7 @@ void wxAuiDefaultToolBarArt::DrawButton( } else if (item.GetState() & wxAUI_BUTTON_STATE_CHECKED) { - // it's important to put this code in an else statment after the + // it's important to put this code in an else statement after the // hover, otherwise hovers won't draw properly for checked items dc.SetPen(wxPen(m_highlightColour)); dc.SetBrush(wxBrush(m_highlightColour.ChangeLightness(170))); @@ -798,23 +810,13 @@ BEGIN_EVENT_TABLE(wxAuiToolBar, wxControl) EVT_SET_CURSOR(wxAuiToolBar::OnSetCursor) END_EVENT_TABLE() - -wxAuiToolBar::wxAuiToolBar(wxWindow* parent, - wxWindowID id, - const wxPoint& position, - const wxSize& size, - long style) - : wxControl(parent, - id, - position, - size, - style | wxBORDER_NONE) +void wxAuiToolBar::Init() { m_sizer = new wxBoxSizer(wxHORIZONTAL); m_buttonWidth = -1; m_buttonHeight = -1; m_sizerElementCount = 0; - m_actionPos = wxPoint(-1,-1); + m_actionPos = wxDefaultPosition; m_actionItem = NULL; m_tipItem = NULL; m_art = new wxAuiDefaultToolBarArt; @@ -824,15 +826,34 @@ wxAuiToolBar::wxAuiToolBar(wxWindow* parent, m_gripperSizerItem = NULL; m_overflowSizerItem = NULL; m_dragging = false; + m_gripperVisible = false; + m_overflowVisible = false; + m_overflowState = 0; + m_orientation = wxHORIZONTAL; +} + +bool wxAuiToolBar::Create(wxWindow* parent, + wxWindowID id, + const wxPoint& pos, + const wxSize& size, + long style) +{ + style = style|wxBORDER_NONE; + + if (!wxControl::Create(parent, id, pos, size, style)) + return false; + + m_windowStyle = style; + + m_gripperVisible = (style & wxAUI_TB_GRIPPER) ? true : false; + m_overflowVisible = (style & wxAUI_TB_OVERFLOW) ? true : false; + m_orientation = GetOrientation(style); if (m_orientation == wxBOTH) { m_orientation = wxHORIZONTAL; } - m_style = style | wxBORDER_NONE; - m_gripperVisible = (m_style & wxAUI_TB_GRIPPER) ? true : false; - m_overflowVisible = (m_style & wxAUI_TB_OVERFLOW) ? true : false; - m_overflowState = 0; + SetMargins(5, 5, 2, 2); SetFont(*wxNORMAL_FONT); SetArtFlags(); @@ -840,8 +861,9 @@ wxAuiToolBar::wxAuiToolBar(wxWindow* parent, if (style & wxAUI_TB_HORZ_LAYOUT) SetToolTextOrientation(wxAUI_TBTOOL_TEXT_RIGHT); SetBackgroundStyle(wxBG_STYLE_CUSTOM); -} + return true; +} wxAuiToolBar::~wxAuiToolBar() { @@ -857,20 +879,20 @@ void wxAuiToolBar::SetWindowStyleFlag(long style) wxControl::SetWindowStyleFlag(style); - m_style = style; + m_windowStyle = style; if (m_art) { SetArtFlags(); } - if (m_style & wxAUI_TB_GRIPPER) + if (m_windowStyle & wxAUI_TB_GRIPPER) m_gripperVisible = true; else m_gripperVisible = false; - if (m_style & wxAUI_TB_OVERFLOW) + if (m_windowStyle & wxAUI_TB_OVERFLOW) m_overflowVisible = true; else m_overflowVisible = false; @@ -881,11 +903,6 @@ void wxAuiToolBar::SetWindowStyleFlag(long style) SetToolTextOrientation(wxAUI_TBTOOL_TEXT_BOTTOM); } -long wxAuiToolBar::GetWindowStyleFlag() const -{ - return m_style; -} - void wxAuiToolBar::SetArtProvider(wxAuiToolBarArt* art) { delete m_art; @@ -1256,16 +1273,16 @@ void wxAuiToolBar::SetToolDropDown(int tool_id, bool dropdown) if (!item) return; - item->m_dropDown = dropdown; + item->SetHasDropDown(dropdown); } bool wxAuiToolBar::GetToolDropDown(int tool_id) const { wxAuiToolBarItem* item = FindTool(tool_id); if (!item) - return 0; + return false; - return item->m_dropDown; + return item->HasDropDown(); } void wxAuiToolBar::SetToolSticky(int tool_id, bool sticky) @@ -1368,9 +1385,9 @@ void wxAuiToolBar::SetGripperVisible(bool visible) { m_gripperVisible = visible; if (visible) - m_style |= wxAUI_TB_GRIPPER; + m_windowStyle |= wxAUI_TB_GRIPPER; else - m_style &= ~wxAUI_TB_GRIPPER; + m_windowStyle &= ~wxAUI_TB_GRIPPER; Realize(); Refresh(false); } @@ -1385,9 +1402,9 @@ void wxAuiToolBar::SetOverflowVisible(bool visible) { m_overflowVisible = visible; if (visible) - m_style |= wxAUI_TB_OVERFLOW; + m_windowStyle |= wxAUI_TB_OVERFLOW; else - m_style &= ~wxAUI_TB_OVERFLOW; + m_windowStyle &= ~wxAUI_TB_OVERFLOW; Refresh(false); } @@ -1406,6 +1423,9 @@ bool wxAuiToolBar::SetFont(const wxFont& font) void wxAuiToolBar::SetHoverItem(wxAuiToolBarItem* pitem) { + if (pitem && (pitem->m_state & wxAUI_BUTTON_STATE_DISABLED)) + pitem = NULL; + wxAuiToolBarItem* former_hover = NULL; size_t i, count; @@ -1671,7 +1691,7 @@ wxSize wxAuiToolBar::GetHintSize(int dock_direction) const bool wxAuiToolBar::IsPaneValid(const wxAuiPaneInfo& pane) const { - return IsPaneValid(m_style, pane); + return IsPaneValid(m_windowStyle, pane); } bool wxAuiToolBar::IsPaneValid(long style, const wxAuiPaneInfo& pane) @@ -1705,7 +1725,7 @@ bool wxAuiToolBar::IsPaneValid(long style) const void wxAuiToolBar::SetArtFlags() const { - unsigned int artflags = m_style & ~wxAUI_ORIENTATION_MASK; + unsigned int artflags = m_windowStyle & ~wxAUI_ORIENTATION_MASK; if (m_orientation == wxVERTICAL) { artflags |= wxAUI_TB_VERTICAL; @@ -1940,7 +1960,7 @@ bool wxAuiToolBar::RealizeHelper(wxClientDC& dc, bool horizontal) vert_sizer->AddStretchSpacer(1); ctrl_m_sizerItem = vert_sizer->Add(item.m_window, 0, wxEXPAND); vert_sizer->AddStretchSpacer(1); - if ( (m_style & wxAUI_TB_TEXT) && + if ( (m_windowStyle & wxAUI_TB_TEXT) && m_toolTextOrientation == wxAUI_TBTOOL_TEXT_BOTTOM && !item.GetLabel().empty() ) { @@ -1990,7 +2010,7 @@ bool wxAuiToolBar::RealizeHelper(wxClientDC& dc, bool horizontal) // add drop down area m_overflowSizerItem = NULL; - if (m_style & wxAUI_TB_OVERFLOW) + if (m_windowStyle & wxAUI_TB_OVERFLOW) { int overflow_size = m_art->GetElementSize(wxAUI_TBART_OVERFLOW_SIZE); if (overflow_size > 0 && m_overflowVisible) @@ -2057,7 +2077,7 @@ bool wxAuiToolBar::RealizeHelper(wxClientDC& dc, bool horizontal) m_minWidth = size.x; m_minHeight = size.y; - if ((m_style & wxAUI_TB_NO_AUTORESIZE) == 0) + if ((m_windowStyle & wxAUI_TB_NO_AUTORESIZE) == 0) { wxSize curSize = GetClientSize(); wxSize new_size = GetMinSize(); @@ -2277,7 +2297,7 @@ void wxAuiToolBar::OnIdle(wxIdleEvent& evt) // pane state member is public, so it might have been changed // without going through wxPaneInfo::SetFlag() check bool ok = pane.IsOk(); - wxCHECK2_MSG(!ok || IsPaneValid(m_style, pane), ok = false, + wxCHECK2_MSG(!ok || IsPaneValid(m_windowStyle, pane), ok = false, "window settings and pane settings are incompatible"); if (ok) { @@ -2299,7 +2319,7 @@ void wxAuiToolBar::OnIdle(wxIdleEvent& evt) } } else if (pane.IsResizable() && - GetOrientation(m_style) == wxBOTH) + GetOrientation(m_windowStyle) == wxBOTH) { // changing orientation in OnSize causes havoc int x, y; @@ -2359,8 +2379,10 @@ void wxAuiToolBar::OnPaint(wxPaintEvent& WXUNUSED(evt)) bool horizontal = m_orientation == wxHORIZONTAL; - - m_art->DrawBackground(dc, this, cli_rect); + if (m_windowStyle & wxAUI_TB_PLAIN_BACKGROUND) + m_art->DrawPlainBackground(dc, this, cli_rect); + else + m_art->DrawBackground(dc, this, cli_rect); int gripperSize = m_art->GetElementSize(wxAUI_TBART_GRIPPER_SIZE); int dropdown_size = m_art->GetElementSize(wxAUI_TBART_OVERFLOW_SIZE); @@ -2403,41 +2425,36 @@ void wxAuiToolBar::OnPaint(wxPaintEvent& WXUNUSED(evt)) break; } - if (item.m_kind == wxITEM_SEPARATOR) + switch ( item.m_kind ) { - // draw a separator - m_art->DrawSeparator(dc, this, item_rect); - } - else if (item.m_kind == wxITEM_LABEL) - { - // draw a text label only - m_art->DrawLabel(dc, this, item, item_rect); - } - else if (item.m_kind == wxITEM_NORMAL) - { - // draw a regular button or dropdown button - if (!item.m_dropDown) + case wxITEM_NORMAL: + // draw a regular or dropdown button + if (!item.m_dropDown) + m_art->DrawButton(dc, this, item, item_rect); + else + m_art->DrawDropDownButton(dc, this, item, item_rect); + break; + + case wxITEM_CHECK: + case wxITEM_RADIO: + // draw a toggle button m_art->DrawButton(dc, this, item, item_rect); - else - m_art->DrawDropDownButton(dc, this, item, item_rect); - } - else if (item.m_kind == wxITEM_CHECK) - { - // draw either a regular or dropdown toggle button - if (!item.m_dropDown) - m_art->DrawButton(dc, this, item, item_rect); - else - m_art->DrawDropDownButton(dc, this, item, item_rect); - } - else if (item.m_kind == wxITEM_RADIO) - { - // draw a toggle button - m_art->DrawButton(dc, this, item, item_rect); - } - else if (item.m_kind == wxITEM_CONTROL) - { - // draw the control's label - m_art->DrawControlLabel(dc, this, item, item_rect); + break; + + case wxITEM_SEPARATOR: + // draw a separator + m_art->DrawSeparator(dc, this, item_rect); + break; + + case wxITEM_LABEL: + // draw a text label only + m_art->DrawLabel(dc, this, item, item_rect); + break; + + case wxITEM_CONTROL: + // draw the control's label + m_art->DrawControlLabel(dc, this, item, item_rect); + break; } // fire a signal to see if the item wants to be custom-rendered @@ -2488,7 +2505,7 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt) m_overflowVisible && overflow_rect.Contains(evt.m_x, evt.m_y)) { - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_OVERFLOW_CLICK, -1); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_OVERFLOW_CLICK, -1); e.SetEventObject(this); e.SetToolId(-1); e.SetClickPoint(wxPoint(evt.GetX(), evt.GetY())); @@ -2527,9 +2544,9 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt) Refresh(false); if (res != -1) { - wxCommandEvent e(wxEVT_COMMAND_MENU_SELECTED, res); - e.SetEventObject(this); - GetParent()->GetEventHandler()->ProcessEvent(e); + wxCommandEvent event(wxEVT_MENU, res); + event.SetEventObject(this); + GetParent()->GetEventHandler()->ProcessEvent(event); } } @@ -2553,7 +2570,7 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt) UnsetToolTip(); // fire the tool dropdown event - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, m_actionItem->m_toolId); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, m_actionItem->m_toolId); e.SetEventObject(this); e.SetToolId(m_actionItem->m_toolId); @@ -2580,6 +2597,11 @@ void wxAuiToolBar::OnLeftDown(wxMouseEvent& evt) if(!GetEventHandler()->ProcessEvent(e) || e.GetSkipped()) CaptureMouse(); + // Ensure hovered item is really ok, as mouse may have moved during + // event processing + wxPoint cursor_pos_after_evt = ScreenToClient(wxGetMousePosition()); + SetHoverItem(FindToolByPosition(cursor_pos_after_evt.x, cursor_pos_after_evt.y)); + DoIdleUpdate(); } } @@ -2591,11 +2613,9 @@ void wxAuiToolBar::OnLeftUp(wxMouseEvent& evt) SetPressedItem(NULL); - wxAuiToolBarItem* hitItem = FindToolByPosition(evt.GetX(), evt.GetY()); - if (hitItem && !(hitItem->m_state & wxAUI_BUTTON_STATE_DISABLED)) - { - SetHoverItem(hitItem); - } + wxAuiToolBarItem* hitItem; + hitItem = FindToolByPosition(evt.GetX(), evt.GetY()); + SetHoverItem(hitItem); if (m_dragging) { @@ -2613,7 +2633,7 @@ void wxAuiToolBar::OnLeftUp(wxMouseEvent& evt) { UnsetToolTip(); - wxCommandEvent e(wxEVT_COMMAND_MENU_SELECTED, m_actionItem->m_toolId); + wxCommandEvent e(wxEVT_MENU, m_actionItem->m_toolId); e.SetEventObject(this); if (hitItem->m_kind == wxITEM_CHECK || hitItem->m_kind == wxITEM_RADIO) @@ -2636,6 +2656,12 @@ void wxAuiToolBar::OnLeftUp(wxMouseEvent& evt) ReleaseMouse(); GetEventHandler()->ProcessEvent(e); + + // Ensure hovered item is really ok, as mouse may have moved during + // event processing + wxPoint cursor_pos_after_evt = ScreenToClient(wxGetMousePosition()); + SetHoverItem(FindToolByPosition(cursor_pos_after_evt.x, cursor_pos_after_evt.y)); + DoIdleUpdate(); } else @@ -2686,7 +2712,7 @@ void wxAuiToolBar::OnRightUp(wxMouseEvent& evt) if (m_actionItem && hitItem == m_actionItem) { - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, m_actionItem->m_toolId); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_RIGHT_CLICK, m_actionItem->m_toolId); e.SetEventObject(this); e.SetToolId(m_actionItem->m_toolId); e.SetClickPoint(m_actionPos); @@ -2696,7 +2722,7 @@ void wxAuiToolBar::OnRightUp(wxMouseEvent& evt) else { // right-clicked on the invalid area of the toolbar - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_RIGHT_CLICK, -1); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_RIGHT_CLICK, -1); e.SetEventObject(this); e.SetToolId(-1); e.SetClickPoint(m_actionPos); @@ -2757,7 +2783,7 @@ void wxAuiToolBar::OnMiddleUp(wxMouseEvent& evt) { if (hitItem->m_kind == wxITEM_NORMAL) { - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_MIDDLE_CLICK, m_actionItem->m_toolId); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_MIDDLE_CLICK, m_actionItem->m_toolId); e.SetEventObject(this); e.SetToolId(m_actionItem->m_toolId); e.SetClickPoint(m_actionPos); @@ -2781,7 +2807,7 @@ void wxAuiToolBar::OnMotion(wxMouseEvent& evt) { // TODO: sending this event only makes sense if there is an 'END_DRAG' // event sent sometime in the future (see OnLeftUp()) - wxAuiToolBarEvent e(wxEVT_COMMAND_AUITOOLBAR_BEGIN_DRAG, GetId()); + wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_BEGIN_DRAG, GetId()); e.SetEventObject(this); e.SetToolId(m_actionItem->m_toolId); m_dragging = GetEventHandler()->ProcessEvent(e) && !e.GetSkipped(); @@ -2808,10 +2834,7 @@ void wxAuiToolBar::OnMotion(wxMouseEvent& evt) } else { - if (hitItem && (hitItem->m_state & wxAUI_BUTTON_STATE_DISABLED)) - SetHoverItem(NULL); - else - SetHoverItem(hitItem); + SetHoverItem(hitItem); // tooltips handling wxAuiToolBarItem* packingHitItem; diff --git a/Externals/wxWidgets3/src/aui/auibook.cpp b/Externals/wxWidgets3/src/aui/auibook.cpp index f299944023..2d1787ee0a 100644 --- a/Externals/wxWidgets3/src/aui/auibook.cpp +++ b/Externals/wxWidgets3/src/aui/auibook.cpp @@ -2,7 +2,7 @@ // Name: src/aui/auibook.cpp // Purpose: wxaui: wx advanced user interface - notebook // Author: Benjamin I. Williams -// Modified by: +// Modified by: Jens Lody // Created: 2006-06-28 // Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved // Licence: wxWindows Library Licence, Version 3.1 @@ -24,14 +24,11 @@ #ifndef WX_PRECOMP #include "wx/settings.h" - #include "wx/image.h" - #include "wx/menu.h" + #include "wx/dcclient.h" + #include "wx/dcmemory.h" #endif #include "wx/aui/tabmdi.h" -#include "wx/dcbuffer.h" - -#include "wx/renderer.h" #ifdef __WXMAC__ #include "wx/osx/private.h" @@ -41,1256 +38,28 @@ WX_DEFINE_OBJARRAY(wxAuiNotebookPageArray) WX_DEFINE_OBJARRAY(wxAuiTabContainerButtonArray) -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_CANCEL_DRAG, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent); -wxDEFINE_EVENT(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_PAGE_CLOSED, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_BUTTON, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_END_DRAG, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_CANCEL_DRAG, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_ALLOW_DND, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_BG_DCLICK, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_DRAG_DONE, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEvent); +wxDEFINE_EVENT(wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEvent); IMPLEMENT_CLASS(wxAuiNotebook, wxControl) IMPLEMENT_CLASS(wxAuiTabCtrl, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxAuiNotebookEvent, wxBookCtrlEvent) - - - -// these functions live in dockart.cpp -- they'll eventually -// be moved to a new utility cpp file - -wxBitmap wxAuiBitmapFromBits(const unsigned char bits[], int w, int h, - const wxColour& color); - -wxString wxAuiChopText(wxDC& dc, const wxString& text, int max_size); - -static void DrawButtons(wxDC& dc, - const wxRect& _rect, - const wxBitmap& bmp, - const wxColour& bkcolour, - int button_state) -{ - wxRect rect = _rect; - - if (button_state == wxAUI_BUTTON_STATE_PRESSED) - { - rect.x++; - rect.y++; - } - - if (button_state == wxAUI_BUTTON_STATE_HOVER || - button_state == wxAUI_BUTTON_STATE_PRESSED) - { - dc.SetBrush(wxBrush(bkcolour.ChangeLightness(120))); - dc.SetPen(wxPen(bkcolour.ChangeLightness(75))); - - // draw the background behind the button - dc.DrawRectangle(rect.x, rect.y, 15, 15); - } - - // draw the button itself - dc.DrawBitmap(bmp, rect.x, rect.y, true); -} - -static void IndentPressedBitmap(wxRect* rect, int button_state) -{ - if (button_state == wxAUI_BUTTON_STATE_PRESSED) - { - rect->x++; - rect->y++; - } -} - - - -// -- GUI helper classes and functions -- - -class wxAuiCommandCapture : public wxEvtHandler -{ -public: - - wxAuiCommandCapture() { m_lastId = 0; } - int GetCommandId() const { return m_lastId; } - - bool ProcessEvent(wxEvent& evt) - { - if (evt.GetEventType() == wxEVT_COMMAND_MENU_SELECTED) - { - m_lastId = evt.GetId(); - return true; - } - - if (GetNextHandler()) - return GetNextHandler()->ProcessEvent(evt); - - return false; - } - -private: - int m_lastId; -}; - - -// -- bitmaps -- - -#if defined( __WXMAC__ ) - static const unsigned char close_bits[]={ - 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFE, 0x03, 0xF8, 0x01, 0xF0, 0x19, 0xF3, - 0xB8, 0xE3, 0xF0, 0xE1, 0xE0, 0xE0, 0xF0, 0xE1, 0xB8, 0xE3, 0x19, 0xF3, - 0x01, 0xF0, 0x03, 0xF8, 0x0F, 0xFE, 0xFF, 0xFF }; -#elif defined( __WXGTK__) - static const unsigned char close_bits[]={ - 0xff, 0xff, 0xff, 0xff, 0x07, 0xf0, 0xfb, 0xef, 0xdb, 0xed, 0x8b, 0xe8, - 0x1b, 0xec, 0x3b, 0xee, 0x1b, 0xec, 0x8b, 0xe8, 0xdb, 0xed, 0xfb, 0xef, - 0x07, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; -#else - static const unsigned char close_bits[]={ - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xf3, 0xcf, 0xf9, - 0x9f, 0xfc, 0x3f, 0xfe, 0x3f, 0xfe, 0x9f, 0xfc, 0xcf, 0xf9, 0xe7, 0xf3, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; -#endif - -static const unsigned char left_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xfe, 0x3f, 0xfe, - 0x1f, 0xfe, 0x0f, 0xfe, 0x1f, 0xfe, 0x3f, 0xfe, 0x7f, 0xfe, 0xff, 0xfe, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - -static const unsigned char right_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x9f, 0xff, 0x1f, 0xff, - 0x1f, 0xfe, 0x1f, 0xfc, 0x1f, 0xfe, 0x1f, 0xff, 0x9f, 0xff, 0xdf, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - -static const unsigned char list_bits[] = { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0x0f, 0xf8, 0xff, 0xff, 0x0f, 0xf8, 0x1f, 0xfc, 0x3f, 0xfe, 0x7f, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - - - - - - -// -- wxAuiDefaultTabArt class implementation -- - -wxAuiDefaultTabArt::wxAuiDefaultTabArt() -{ - m_normalFont = *wxNORMAL_FONT; - m_selectedFont = *wxNORMAL_FONT; - m_selectedFont.SetWeight(wxBOLD); - m_measuringFont = m_selectedFont; - - m_fixedTabWidth = 100; - m_tabCtrlHeight = 0; - -#if defined( __WXMAC__ ) && wxOSX_USE_COCOA_OR_CARBON - wxColor baseColour = wxColour( wxMacCreateCGColorFromHITheme(kThemeBrushToolbarBackground)); -#else - wxColor baseColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); -#endif - - // the baseColour is too pale to use as our base colour, - // so darken it a bit -- - if ((255-baseColour.Red()) + - (255-baseColour.Green()) + - (255-baseColour.Blue()) < 60) - { - baseColour = baseColour.ChangeLightness(92); - } - - m_activeColour = baseColour; - m_baseColour = baseColour; - wxColor borderColour = baseColour.ChangeLightness(75); - - m_borderPen = wxPen(borderColour); - m_baseColourPen = wxPen(m_baseColour); - m_baseColourBrush = wxBrush(m_baseColour); - - m_activeCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK); - m_disabledCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128)); - - m_activeLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK); - m_disabledLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128)); - - m_activeRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK); - m_disabledRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128)); - - m_activeWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK); - m_disabledWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128)); - - m_flags = 0; -} - -wxAuiDefaultTabArt::~wxAuiDefaultTabArt() -{ -} - -wxAuiTabArt* wxAuiDefaultTabArt::Clone() -{ - return new wxAuiDefaultTabArt(*this); -} - -void wxAuiDefaultTabArt::SetFlags(unsigned int flags) -{ - m_flags = flags; -} - -void wxAuiDefaultTabArt::SetSizingInfo(const wxSize& tab_ctrl_size, - size_t tab_count) -{ - m_fixedTabWidth = 100; - - int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - 4; - - if (m_flags & wxAUI_NB_CLOSE_BUTTON) - tot_width -= m_activeCloseBmp.GetWidth(); - if (m_flags & wxAUI_NB_WINDOWLIST_BUTTON) - tot_width -= m_activeWindowListBmp.GetWidth(); - - if (tab_count > 0) - { - m_fixedTabWidth = tot_width/(int)tab_count; - } - - - if (m_fixedTabWidth < 100) - m_fixedTabWidth = 100; - - if (m_fixedTabWidth > tot_width/2) - m_fixedTabWidth = tot_width/2; - - if (m_fixedTabWidth > 220) - m_fixedTabWidth = 220; - - m_tabCtrlHeight = tab_ctrl_size.y; -} - - -void wxAuiDefaultTabArt::DrawBackground(wxDC& dc, - wxWindow* WXUNUSED(wnd), - const wxRect& rect) -{ - // draw background - - wxColor top_color = m_baseColour.ChangeLightness(90); - wxColor bottom_color = m_baseColour.ChangeLightness(170); - wxRect r; - - if (m_flags &wxAUI_NB_BOTTOM) - r = wxRect(rect.x, rect.y, rect.width+2, rect.height); - // TODO: else if (m_flags &wxAUI_NB_LEFT) {} - // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} - else //for wxAUI_NB_TOP - r = wxRect(rect.x, rect.y, rect.width+2, rect.height-3); - - dc.GradientFillLinear(r, top_color, bottom_color, wxSOUTH); - - - // draw base lines - - dc.SetPen(m_borderPen); - int y = rect.GetHeight(); - int w = rect.GetWidth(); - - if (m_flags &wxAUI_NB_BOTTOM) - { - dc.SetBrush(wxBrush(bottom_color)); - dc.DrawRectangle(-1, 0, w+2, 4); - } - // TODO: else if (m_flags &wxAUI_NB_LEFT) {} - // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} - else //for wxAUI_NB_TOP - { - dc.SetBrush(m_baseColourBrush); - dc.DrawRectangle(-1, y-4, w+2, 4); - } -} - - -// DrawTab() draws an individual tab. -// -// dc - output dc -// in_rect - rectangle the tab should be confined to -// caption - tab's caption -// active - whether or not the tab is active -// out_rect - actual output rectangle -// x_extent - the advance x; where the next tab should start - -void wxAuiDefaultTabArt::DrawTab(wxDC& dc, - wxWindow* wnd, - const wxAuiNotebookPage& page, - const wxRect& in_rect, - int close_button_state, - wxRect* out_tab_rect, - wxRect* out_button_rect, - int* x_extent) -{ - wxCoord normal_textx, normal_texty; - wxCoord selected_textx, selected_texty; - wxCoord texty; - - // if the caption is empty, measure some temporary text - wxString caption = page.caption; - if (caption.empty()) - caption = wxT("Xj"); - - dc.SetFont(m_selectedFont); - dc.GetTextExtent(caption, &selected_textx, &selected_texty); - - dc.SetFont(m_normalFont); - dc.GetTextExtent(caption, &normal_textx, &normal_texty); - - // figure out the size of the tab - wxSize tab_size = GetTabSize(dc, - wnd, - page.caption, - page.bitmap, - page.active, - close_button_state, - x_extent); - - wxCoord tab_height = m_tabCtrlHeight - 3; - wxCoord tab_width = tab_size.x; - wxCoord tab_x = in_rect.x; - wxCoord tab_y = in_rect.y + in_rect.height - tab_height; - - - caption = page.caption; - - - // select pen, brush and font for the tab to be drawn - - if (page.active) - { - dc.SetFont(m_selectedFont); - texty = selected_texty; - } - else - { - dc.SetFont(m_normalFont); - texty = normal_texty; - } - - - // create points that will make the tab outline - - int clip_width = tab_width; - if (tab_x + clip_width > in_rect.x + in_rect.width) - clip_width = (in_rect.x + in_rect.width) - tab_x; - -/* - wxPoint clip_points[6]; - clip_points[0] = wxPoint(tab_x, tab_y+tab_height-3); - clip_points[1] = wxPoint(tab_x, tab_y+2); - clip_points[2] = wxPoint(tab_x+2, tab_y); - clip_points[3] = wxPoint(tab_x+clip_width-1, tab_y); - clip_points[4] = wxPoint(tab_x+clip_width+1, tab_y+2); - clip_points[5] = wxPoint(tab_x+clip_width+1, tab_y+tab_height-3); - - // FIXME: these ports don't provide wxRegion ctor from array of points -#if !defined(__WXDFB__) && !defined(__WXCOCOA__) - // set the clipping region for the tab -- - wxRegion clipping_region(WXSIZEOF(clip_points), clip_points); - dc.SetClippingRegion(clipping_region); -#endif // !wxDFB && !wxCocoa -*/ - // since the above code above doesn't play well with WXDFB or WXCOCOA, - // we'll just use a rectangle for the clipping region for now -- - dc.SetClippingRegion(tab_x, tab_y, clip_width+1, tab_height-3); - - - wxPoint border_points[6]; - if (m_flags &wxAUI_NB_BOTTOM) - { - border_points[0] = wxPoint(tab_x, tab_y); - border_points[1] = wxPoint(tab_x, tab_y+tab_height-6); - border_points[2] = wxPoint(tab_x+2, tab_y+tab_height-4); - border_points[3] = wxPoint(tab_x+tab_width-2, tab_y+tab_height-4); - border_points[4] = wxPoint(tab_x+tab_width, tab_y+tab_height-6); - border_points[5] = wxPoint(tab_x+tab_width, tab_y); - } - else //if (m_flags & wxAUI_NB_TOP) {} - { - border_points[0] = wxPoint(tab_x, tab_y+tab_height-4); - border_points[1] = wxPoint(tab_x, tab_y+2); - border_points[2] = wxPoint(tab_x+2, tab_y); - border_points[3] = wxPoint(tab_x+tab_width-2, tab_y); - border_points[4] = wxPoint(tab_x+tab_width, tab_y+2); - border_points[5] = wxPoint(tab_x+tab_width, tab_y+tab_height-4); - } - // TODO: else if (m_flags &wxAUI_NB_LEFT) {} - // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} - - int drawn_tab_yoff = border_points[1].y; - int drawn_tab_height = border_points[0].y - border_points[1].y; - - - if (page.active) - { - // draw active tab - - // draw base background color - wxRect r(tab_x, tab_y, tab_width, tab_height); - dc.SetPen(wxPen(m_activeColour)); - dc.SetBrush(wxBrush(m_activeColour)); - dc.DrawRectangle(r.x+1, r.y+1, r.width-1, r.height-4); - - // this white helps fill out the gradient at the top of the tab - dc.SetPen(*wxWHITE_PEN); - dc.SetBrush(*wxWHITE_BRUSH); - dc.DrawRectangle(r.x+2, r.y+1, r.width-3, r.height-4); - - // these two points help the rounded corners appear more antialiased - dc.SetPen(wxPen(m_activeColour)); - dc.DrawPoint(r.x+2, r.y+1); - dc.DrawPoint(r.x+r.width-2, r.y+1); - - // set rectangle down a bit for gradient drawing - r.SetHeight(r.GetHeight()/2); - r.x += 2; - r.width -= 3; - r.y += r.height; - r.y -= 2; - - // draw gradient background - wxColor top_color = *wxWHITE; - wxColor bottom_color = m_activeColour; - dc.GradientFillLinear(r, bottom_color, top_color, wxNORTH); - } - else - { - // draw inactive tab - - wxRect r(tab_x, tab_y+1, tab_width, tab_height-3); - - // start the gradent up a bit and leave the inside border inset - // by a pixel for a 3D look. Only the top half of the inactive - // tab will have a slight gradient - r.x += 3; - r.y++; - r.width -= 4; - r.height /= 2; - r.height--; - - // -- draw top gradient fill for glossy look - wxColor top_color = m_baseColour; - wxColor bottom_color = top_color.ChangeLightness(160); - dc.GradientFillLinear(r, bottom_color, top_color, wxNORTH); - - r.y += r.height; - r.y--; - - // -- draw bottom fill for glossy look - top_color = m_baseColour; - bottom_color = m_baseColour; - dc.GradientFillLinear(r, top_color, bottom_color, wxSOUTH); - } - - // draw tab outline - dc.SetPen(m_borderPen); - dc.SetBrush(*wxTRANSPARENT_BRUSH); - dc.DrawPolygon(WXSIZEOF(border_points), border_points); - - // there are two horizontal grey lines at the bottom of the tab control, - // this gets rid of the top one of those lines in the tab control - if (page.active) - { - if (m_flags &wxAUI_NB_BOTTOM) - dc.SetPen(wxPen(m_baseColour.ChangeLightness(170))); - // TODO: else if (m_flags &wxAUI_NB_LEFT) {} - // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} - else //for wxAUI_NB_TOP - dc.SetPen(m_baseColourPen); - dc.DrawLine(border_points[0].x+1, - border_points[0].y, - border_points[5].x, - border_points[5].y); - } - - - int text_offset = tab_x + 8; - int close_button_width = 0; - if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) - { - close_button_width = m_activeCloseBmp.GetWidth(); - } - - int bitmap_offset = 0; - if (page.bitmap.IsOk()) - { - bitmap_offset = tab_x + 8; - - // draw bitmap - dc.DrawBitmap(page.bitmap, - bitmap_offset, - drawn_tab_yoff + (drawn_tab_height/2) - (page.bitmap.GetHeight()/2), - true); - - text_offset = bitmap_offset + page.bitmap.GetWidth(); - text_offset += 3; // bitmap padding - - } - else - { - text_offset = tab_x + 8; - } - - - wxString draw_text = wxAuiChopText(dc, - caption, - tab_width - (text_offset-tab_x) - close_button_width); - - // draw tab text - dc.DrawText(draw_text, - text_offset, - drawn_tab_yoff + (drawn_tab_height)/2 - (texty/2) - 1); - - // draw focus rectangle - if (page.active && (wnd->FindFocus() == wnd)) - { - wxRect focusRectText(text_offset, (drawn_tab_yoff + (drawn_tab_height)/2 - (texty/2) - 1), - selected_textx, selected_texty); - - wxRect focusRect; - wxRect focusRectBitmap; - - if (page.bitmap.IsOk()) - focusRectBitmap = wxRect(bitmap_offset, drawn_tab_yoff + (drawn_tab_height/2) - (page.bitmap.GetHeight()/2), - page.bitmap.GetWidth(), page.bitmap.GetHeight()); - - if (page.bitmap.IsOk() && draw_text.IsEmpty()) - focusRect = focusRectBitmap; - else if (!page.bitmap.IsOk() && !draw_text.IsEmpty()) - focusRect = focusRectText; - else if (page.bitmap.IsOk() && !draw_text.IsEmpty()) - focusRect = focusRectText.Union(focusRectBitmap); - - focusRect.Inflate(2, 2); - - wxRendererNative::Get().DrawFocusRect(wnd, dc, focusRect, 0); - } - - // draw close button if necessary - if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) - { - wxBitmap bmp = m_disabledCloseBmp; - - if (close_button_state == wxAUI_BUTTON_STATE_HOVER || - close_button_state == wxAUI_BUTTON_STATE_PRESSED) - { - bmp = m_activeCloseBmp; - } - - int offsetY = tab_y-1; - if (m_flags & wxAUI_NB_BOTTOM) - offsetY = 1; - - wxRect rect(tab_x + tab_width - close_button_width - 1, - offsetY + (tab_height/2) - (bmp.GetHeight()/2), - close_button_width, - tab_height); - - IndentPressedBitmap(&rect, close_button_state); - dc.DrawBitmap(bmp, rect.x, rect.y, true); - - *out_button_rect = rect; - } - - *out_tab_rect = wxRect(tab_x, tab_y, tab_width, tab_height); - - dc.DestroyClippingRegion(); -} - -int wxAuiDefaultTabArt::GetIndentSize() -{ - return 5; -} - -wxSize wxAuiDefaultTabArt::GetTabSize(wxDC& dc, - wxWindow* WXUNUSED(wnd), - const wxString& caption, - const wxBitmap& bitmap, - bool WXUNUSED(active), - int close_button_state, - int* x_extent) -{ - wxCoord measured_textx, measured_texty, tmp; - - dc.SetFont(m_measuringFont); - dc.GetTextExtent(caption, &measured_textx, &measured_texty); - - dc.GetTextExtent(wxT("ABCDEFXj"), &tmp, &measured_texty); - - // add padding around the text - wxCoord tab_width = measured_textx; - wxCoord tab_height = measured_texty; - - // if the close button is showing, add space for it - if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) - tab_width += m_activeCloseBmp.GetWidth() + 3; - - // if there's a bitmap, add space for it - if (bitmap.IsOk()) - { - tab_width += bitmap.GetWidth(); - tab_width += 3; // right side bitmap padding - tab_height = wxMax(tab_height, bitmap.GetHeight()); - } - - // add padding - tab_width += 16; - tab_height += 10; - - if (m_flags & wxAUI_NB_TAB_FIXED_WIDTH) - { - tab_width = m_fixedTabWidth; - } - - *x_extent = tab_width; - - return wxSize(tab_width, tab_height); -} - - -void wxAuiDefaultTabArt::DrawButton(wxDC& dc, - wxWindow* WXUNUSED(wnd), - const wxRect& in_rect, - int bitmap_id, - int button_state, - int orientation, - wxRect* out_rect) -{ - wxBitmap bmp; - wxRect rect; - - switch (bitmap_id) - { - case wxAUI_BUTTON_CLOSE: - if (button_state & wxAUI_BUTTON_STATE_DISABLED) - bmp = m_disabledCloseBmp; - else - bmp = m_activeCloseBmp; - break; - case wxAUI_BUTTON_LEFT: - if (button_state & wxAUI_BUTTON_STATE_DISABLED) - bmp = m_disabledLeftBmp; - else - bmp = m_activeLeftBmp; - break; - case wxAUI_BUTTON_RIGHT: - if (button_state & wxAUI_BUTTON_STATE_DISABLED) - bmp = m_disabledRightBmp; - else - bmp = m_activeRightBmp; - break; - case wxAUI_BUTTON_WINDOWLIST: - if (button_state & wxAUI_BUTTON_STATE_DISABLED) - bmp = m_disabledWindowListBmp; - else - bmp = m_activeWindowListBmp; - break; - } - - - if (!bmp.IsOk()) - return; - - rect = in_rect; - - if (orientation == wxLEFT) - { - rect.SetX(in_rect.x); - rect.SetY(((in_rect.y + in_rect.height)/2) - (bmp.GetHeight()/2)); - rect.SetWidth(bmp.GetWidth()); - rect.SetHeight(bmp.GetHeight()); - } - else - { - rect = wxRect(in_rect.x + in_rect.width - bmp.GetWidth(), - ((in_rect.y + in_rect.height)/2) - (bmp.GetHeight()/2), - bmp.GetWidth(), bmp.GetHeight()); - } - - IndentPressedBitmap(&rect, button_state); - dc.DrawBitmap(bmp, rect.x, rect.y, true); - - *out_rect = rect; -} - -int wxAuiDefaultTabArt::ShowDropDown(wxWindow* wnd, - const wxAuiNotebookPageArray& pages, - int /*active_idx*/) -{ - wxMenu menuPopup; - - size_t i, count = pages.GetCount(); - for (i = 0; i < count; ++i) - { - const wxAuiNotebookPage& page = pages.Item(i); - wxString caption = page.caption; - - // if there is no caption, make it a space. This will prevent - // an assert in the menu code. - if (caption.IsEmpty()) - caption = wxT(" "); - - wxMenuItem* item = new wxMenuItem(NULL, 1000+i, caption); - if (page.bitmap.IsOk()) - item->SetBitmap(page.bitmap); - menuPopup.Append(item); - } - - // find out where to put the popup menu of window items - wxPoint pt = ::wxGetMousePosition(); - pt = wnd->ScreenToClient(pt); - - // find out the screen coordinate at the bottom of the tab ctrl - wxRect cli_rect = wnd->GetClientRect(); - pt.y = cli_rect.y + cli_rect.height; - - wxAuiCommandCapture* cc = new wxAuiCommandCapture; - wnd->PushEventHandler(cc); - wnd->PopupMenu(&menuPopup, pt); - int command = cc->GetCommandId(); - wnd->PopEventHandler(true); - - if (command >= 1000) - return command-1000; - - return -1; -} - -int wxAuiDefaultTabArt::GetBestTabCtrlSize(wxWindow* wnd, - const wxAuiNotebookPageArray& pages, - const wxSize& requiredBmp_size) -{ - wxClientDC dc(wnd); - dc.SetFont(m_measuringFont); - - // sometimes a standard bitmap size needs to be enforced, especially - // if some tabs have bitmaps and others don't. This is important because - // it prevents the tab control from resizing when tabs are added. - wxBitmap measureBmp; - if (requiredBmp_size.IsFullySpecified()) - { - measureBmp.Create(requiredBmp_size.x, - requiredBmp_size.y); - } - - - int max_y = 0; - size_t i, page_count = pages.GetCount(); - for (i = 0; i < page_count; ++i) - { - wxAuiNotebookPage& page = pages.Item(i); - - wxBitmap bmp; - if (measureBmp.IsOk()) - bmp = measureBmp; - else - bmp = page.bitmap; - - // we don't use the caption text because we don't - // want tab heights to be different in the case - // of a very short piece of text on one tab and a very - // tall piece of text on another tab - int x_ext = 0; - wxSize s = GetTabSize(dc, - wnd, - wxT("ABCDEFGHIj"), - bmp, - true, - wxAUI_BUTTON_STATE_HIDDEN, - &x_ext); - - max_y = wxMax(max_y, s.y); - } - - return max_y+2; -} - -void wxAuiDefaultTabArt::SetNormalFont(const wxFont& font) -{ - m_normalFont = font; -} - -void wxAuiDefaultTabArt::SetSelectedFont(const wxFont& font) -{ - m_selectedFont = font; -} - -void wxAuiDefaultTabArt::SetMeasuringFont(const wxFont& font) -{ - m_measuringFont = font; -} - -void wxAuiDefaultTabArt::SetColour(const wxColour& colour) -{ - m_baseColour = colour; - m_borderPen = wxPen(m_baseColour.ChangeLightness(75)); - m_baseColourPen = wxPen(m_baseColour); - m_baseColourBrush = wxBrush(m_baseColour); -} - -void wxAuiDefaultTabArt::SetActiveColour(const wxColour& colour) -{ - m_activeColour = colour; -} - -// -- wxAuiSimpleTabArt class implementation -- - -wxAuiSimpleTabArt::wxAuiSimpleTabArt() -{ - m_normalFont = *wxNORMAL_FONT; - m_selectedFont = *wxNORMAL_FONT; - m_selectedFont.SetWeight(wxBOLD); - m_measuringFont = m_selectedFont; - - m_flags = 0; - m_fixedTabWidth = 100; - - wxColour baseColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); - - wxColour backgroundColour = baseColour; - wxColour normaltabColour = baseColour; - wxColour selectedtabColour = *wxWHITE; - - m_bkBrush = wxBrush(backgroundColour); - m_normalBkBrush = wxBrush(normaltabColour); - m_normalBkPen = wxPen(normaltabColour); - m_selectedBkBrush = wxBrush(selectedtabColour); - m_selectedBkPen = wxPen(selectedtabColour); - - m_activeCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK); - m_disabledCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128)); - - m_activeLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK); - m_disabledLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128)); - - m_activeRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK); - m_disabledRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128)); - - m_activeWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK); - m_disabledWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128)); - -} - -wxAuiSimpleTabArt::~wxAuiSimpleTabArt() -{ -} - -wxAuiTabArt* wxAuiSimpleTabArt::Clone() -{ - return new wxAuiSimpleTabArt(*this); -} - -void wxAuiSimpleTabArt::SetFlags(unsigned int flags) -{ - m_flags = flags; -} - -void wxAuiSimpleTabArt::SetSizingInfo(const wxSize& tab_ctrl_size, - size_t tab_count) -{ - m_fixedTabWidth = 100; - - int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - 4; - - if (m_flags & wxAUI_NB_CLOSE_BUTTON) - tot_width -= m_activeCloseBmp.GetWidth(); - if (m_flags & wxAUI_NB_WINDOWLIST_BUTTON) - tot_width -= m_activeWindowListBmp.GetWidth(); - - if (tab_count > 0) - { - m_fixedTabWidth = tot_width/(int)tab_count; - } - - - if (m_fixedTabWidth < 100) - m_fixedTabWidth = 100; - - if (m_fixedTabWidth > tot_width/2) - m_fixedTabWidth = tot_width/2; - - if (m_fixedTabWidth > 220) - m_fixedTabWidth = 220; -} - -void wxAuiSimpleTabArt::SetColour(const wxColour& colour) -{ - m_bkBrush = wxBrush(colour); - m_normalBkBrush = wxBrush(colour); - m_normalBkPen = wxPen(colour); -} - -void wxAuiSimpleTabArt::SetActiveColour(const wxColour& colour) -{ - m_selectedBkBrush = wxBrush(colour); - m_selectedBkPen = wxPen(colour); -} - -void wxAuiSimpleTabArt::DrawBackground(wxDC& dc, - wxWindow* WXUNUSED(wnd), - const wxRect& rect) -{ - // draw background - dc.SetBrush(m_bkBrush); - dc.SetPen(*wxTRANSPARENT_PEN); - dc.DrawRectangle(-1, -1, rect.GetWidth()+2, rect.GetHeight()+2); - - // draw base line - dc.SetPen(*wxGREY_PEN); - dc.DrawLine(0, rect.GetHeight()-1, rect.GetWidth(), rect.GetHeight()-1); -} - - -// DrawTab() draws an individual tab. -// -// dc - output dc -// in_rect - rectangle the tab should be confined to -// caption - tab's caption -// active - whether or not the tab is active -// out_rect - actual output rectangle -// x_extent - the advance x; where the next tab should start - -void wxAuiSimpleTabArt::DrawTab(wxDC& dc, - wxWindow* wnd, - const wxAuiNotebookPage& page, - const wxRect& in_rect, - int close_button_state, - wxRect* out_tab_rect, - wxRect* out_button_rect, - int* x_extent) -{ - wxCoord normal_textx, normal_texty; - wxCoord selected_textx, selected_texty; - wxCoord textx, texty; - - // if the caption is empty, measure some temporary text - wxString caption = page.caption; - if (caption.empty()) - caption = wxT("Xj"); - - dc.SetFont(m_selectedFont); - dc.GetTextExtent(caption, &selected_textx, &selected_texty); - - dc.SetFont(m_normalFont); - dc.GetTextExtent(caption, &normal_textx, &normal_texty); - - // figure out the size of the tab - wxSize tab_size = GetTabSize(dc, - wnd, - page.caption, - page.bitmap, - page.active, - close_button_state, - x_extent); - - wxCoord tab_height = tab_size.y; - wxCoord tab_width = tab_size.x; - wxCoord tab_x = in_rect.x; - wxCoord tab_y = in_rect.y + in_rect.height - tab_height; - - caption = page.caption; - - // select pen, brush and font for the tab to be drawn - - if (page.active) - { - dc.SetPen(m_selectedBkPen); - dc.SetBrush(m_selectedBkBrush); - dc.SetFont(m_selectedFont); - textx = selected_textx; - texty = selected_texty; - } - else - { - dc.SetPen(m_normalBkPen); - dc.SetBrush(m_normalBkBrush); - dc.SetFont(m_normalFont); - textx = normal_textx; - texty = normal_texty; - } - - - // -- draw line -- - - wxPoint points[7]; - points[0].x = tab_x; - points[0].y = tab_y + tab_height - 1; - points[1].x = tab_x + tab_height - 3; - points[1].y = tab_y + 2; - points[2].x = tab_x + tab_height + 3; - points[2].y = tab_y; - points[3].x = tab_x + tab_width - 2; - points[3].y = tab_y; - points[4].x = tab_x + tab_width; - points[4].y = tab_y + 2; - points[5].x = tab_x + tab_width; - points[5].y = tab_y + tab_height - 1; - points[6] = points[0]; - - dc.SetClippingRegion(in_rect); - - dc.DrawPolygon(WXSIZEOF(points) - 1, points); - - dc.SetPen(*wxGREY_PEN); - - //dc.DrawLines(active ? WXSIZEOF(points) - 1 : WXSIZEOF(points), points); - dc.DrawLines(WXSIZEOF(points), points); - - - int text_offset; - - int close_button_width = 0; - if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) - { - close_button_width = m_activeCloseBmp.GetWidth(); - text_offset = tab_x + (tab_height/2) + ((tab_width-close_button_width)/2) - (textx/2); - } - else - { - text_offset = tab_x + (tab_height/3) + (tab_width/2) - (textx/2); - } - - // set minimum text offset - if (text_offset < tab_x + tab_height) - text_offset = tab_x + tab_height; - - // chop text if necessary - wxString draw_text = wxAuiChopText(dc, - caption, - tab_width - (text_offset-tab_x) - close_button_width); - - // draw tab text - dc.DrawText(draw_text, - text_offset, - (tab_y + tab_height)/2 - (texty/2) + 1); - - - // draw focus rectangle - if (page.active && (wnd->FindFocus() == wnd)) - { - wxRect focusRect(text_offset, ((tab_y + tab_height)/2 - (texty/2) + 1), - selected_textx, selected_texty); - - focusRect.Inflate(2, 2); - - wxRendererNative::Get().DrawFocusRect(wnd, dc, focusRect, 0); - } - - // draw close button if necessary - if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) - { - wxBitmap bmp; - if (page.active) - bmp = m_activeCloseBmp; - else - bmp = m_disabledCloseBmp; - - wxRect rect(tab_x + tab_width - close_button_width - 1, - tab_y + (tab_height/2) - (bmp.GetHeight()/2) + 1, - close_button_width, - tab_height - 1); - DrawButtons(dc, rect, bmp, *wxWHITE, close_button_state); - - *out_button_rect = rect; - } - - - *out_tab_rect = wxRect(tab_x, tab_y, tab_width, tab_height); - - dc.DestroyClippingRegion(); -} - -int wxAuiSimpleTabArt::GetIndentSize() -{ - return 0; -} - -wxSize wxAuiSimpleTabArt::GetTabSize(wxDC& dc, - wxWindow* WXUNUSED(wnd), - const wxString& caption, - const wxBitmap& WXUNUSED(bitmap), - bool WXUNUSED(active), - int close_button_state, - int* x_extent) -{ - wxCoord measured_textx, measured_texty; - - dc.SetFont(m_measuringFont); - dc.GetTextExtent(caption, &measured_textx, &measured_texty); - - wxCoord tab_height = measured_texty + 4; - wxCoord tab_width = measured_textx + tab_height + 5; - - if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) - tab_width += m_activeCloseBmp.GetWidth(); - - if (m_flags & wxAUI_NB_TAB_FIXED_WIDTH) - { - tab_width = m_fixedTabWidth; - } - - *x_extent = tab_width - (tab_height/2) - 1; - - return wxSize(tab_width, tab_height); -} - - -void wxAuiSimpleTabArt::DrawButton(wxDC& dc, - wxWindow* WXUNUSED(wnd), - const wxRect& in_rect, - int bitmap_id, - int button_state, - int orientation, - wxRect* out_rect) -{ - wxBitmap bmp; - wxRect rect; - - switch (bitmap_id) - { - case wxAUI_BUTTON_CLOSE: - if (button_state & wxAUI_BUTTON_STATE_DISABLED) - bmp = m_disabledCloseBmp; - else - bmp = m_activeCloseBmp; - break; - case wxAUI_BUTTON_LEFT: - if (button_state & wxAUI_BUTTON_STATE_DISABLED) - bmp = m_disabledLeftBmp; - else - bmp = m_activeLeftBmp; - break; - case wxAUI_BUTTON_RIGHT: - if (button_state & wxAUI_BUTTON_STATE_DISABLED) - bmp = m_disabledRightBmp; - else - bmp = m_activeRightBmp; - break; - case wxAUI_BUTTON_WINDOWLIST: - if (button_state & wxAUI_BUTTON_STATE_DISABLED) - bmp = m_disabledWindowListBmp; - else - bmp = m_activeWindowListBmp; - break; - } - - if (!bmp.IsOk()) - return; - - rect = in_rect; - - if (orientation == wxLEFT) - { - rect.SetX(in_rect.x); - rect.SetY(((in_rect.y + in_rect.height)/2) - (bmp.GetHeight()/2)); - rect.SetWidth(bmp.GetWidth()); - rect.SetHeight(bmp.GetHeight()); - } - else - { - rect = wxRect(in_rect.x + in_rect.width - bmp.GetWidth(), - ((in_rect.y + in_rect.height)/2) - (bmp.GetHeight()/2), - bmp.GetWidth(), bmp.GetHeight()); - } - - - DrawButtons(dc, rect, bmp, *wxWHITE, button_state); - - *out_rect = rect; -} - -int wxAuiSimpleTabArt::ShowDropDown(wxWindow* wnd, - const wxAuiNotebookPageArray& pages, - int active_idx) -{ - wxMenu menuPopup; - - size_t i, count = pages.GetCount(); - for (i = 0; i < count; ++i) - { - const wxAuiNotebookPage& page = pages.Item(i); - menuPopup.AppendCheckItem(1000+i, page.caption); - } - - if (active_idx != -1) - { - menuPopup.Check(1000+active_idx, true); - } - - // find out where to put the popup menu of window - // items. Subtract 100 for now to center the menu - // a bit, until a better mechanism can be implemented - wxPoint pt = ::wxGetMousePosition(); - pt = wnd->ScreenToClient(pt); - if (pt.x < 100) - pt.x = 0; - else - pt.x -= 100; - - // find out the screen coordinate at the bottom of the tab ctrl - wxRect cli_rect = wnd->GetClientRect(); - pt.y = cli_rect.y + cli_rect.height; - - wxAuiCommandCapture* cc = new wxAuiCommandCapture; - wnd->PushEventHandler(cc); - wnd->PopupMenu(&menuPopup, pt); - int command = cc->GetCommandId(); - wnd->PopEventHandler(true); - - if (command >= 1000) - return command-1000; - - return -1; -} - -int wxAuiSimpleTabArt::GetBestTabCtrlSize(wxWindow* wnd, - const wxAuiNotebookPageArray& WXUNUSED(pages), - const wxSize& WXUNUSED(requiredBmp_size)) -{ - wxClientDC dc(wnd); - dc.SetFont(m_measuringFont); - int x_ext = 0; - wxSize s = GetTabSize(dc, - wnd, - wxT("ABCDEFGHIj"), - wxNullBitmap, - true, - wxAUI_BUTTON_STATE_HIDDEN, - &x_ext); - return s.y+3; -} - -void wxAuiSimpleTabArt::SetNormalFont(const wxFont& font) -{ - m_normalFont = font; -} - -void wxAuiSimpleTabArt::SetSelectedFont(const wxFont& font) -{ - m_selectedFont = font; -} - -void wxAuiSimpleTabArt::SetMeasuringFont(const wxFont& font) -{ - m_measuringFont = font; -} - - - - // -- wxAuiTabContainer class implementation -- @@ -1654,7 +423,7 @@ void wxAuiTabContainer::Render(wxDC* raw_dc, wxWindow* wnd) size_t button_count = m_buttons.GetCount(); // create off-screen bitmap - bmp.Create(m_rect.GetWidth(), m_rect.GetHeight()); + bmp.Create(m_rect.GetWidth(), m_rect.GetHeight(),*raw_dc); dc.SelectObject(bmp); if (!dc.IsOk()) @@ -1758,10 +527,8 @@ void wxAuiTabContainer::Render(wxDC* raw_dc, wxWindow* wnd) int left_buttons_width = 0; int right_buttons_width = 0; - int offset = 0; - // draw the buttons on the right side - offset = m_rect.x + m_rect.width; + int offset = m_rect.x + m_rect.width; for (i = 0; i < button_count; ++i) { wxAuiTabContainerButton& button = m_buttons.Item(button_count - i - 1); @@ -1974,10 +741,8 @@ bool wxAuiTabContainer::IsTabVisible(int tabPage, int tabOffset, wxDC* dc, wxWin int left_buttons_width = 0; int right_buttons_width = 0; - int offset = 0; - // calculate size of the buttons on the right side - offset = m_rect.x + m_rect.width; + int offset = m_rect.x + m_rect.width; for (i = 0; i < button_count; ++i) { wxAuiTabContainerButton& button = m_buttons.Item(button_count - i - 1); @@ -2156,7 +921,7 @@ bool wxAuiTabContainer::ButtonHitTest(int x, int y, static void ShowWnd(wxWindow* wnd, bool show) { #if wxUSE_MDI - if (wnd->IsKindOf(CLASSINFO(wxAuiMDIChildFrame))) + if (wxDynamicCast(wnd, wxAuiMDIChildFrame)) { wxAuiMDIChildFrame* cf = (wxAuiMDIChildFrame*)wnd; cf->DoShow(show); @@ -2281,10 +1046,10 @@ void wxAuiTabCtrl::OnLeftDown(wxMouseEvent& evt) // wxAuiNotebooks always want to receive this event // even if the tab is already active, because they may // have multiple tab controls - if (new_selection != GetActivePage() || - GetParent()->IsKindOf(CLASSINFO(wxAuiNotebook))) + if ((new_selection != GetActivePage() || + wxDynamicCast(GetParent(), wxAuiNotebook)) && !m_hoverButton) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_PAGE_CHANGING, m_windowId); e.SetSelection(new_selection); e.SetOldSelection(GetActivePage()); e.SetEventObject(this); @@ -2311,7 +1076,7 @@ void wxAuiTabCtrl::OnCaptureLost(wxMouseCaptureLostEvent& WXUNUSED(event)) { m_isDragging = false; - wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_CANCEL_DRAG, m_windowId); + wxAuiNotebookEvent evt(wxEVT_AUINOTEBOOK_CANCEL_DRAG, m_windowId); evt.SetSelection(GetIdxFromWindow(m_clickTab)); evt.SetOldSelection(evt.GetSelection()); evt.SetEventObject(this); @@ -2328,11 +1093,11 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt) { m_isDragging = false; - wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, m_windowId); - evt.SetSelection(GetIdxFromWindow(m_clickTab)); - evt.SetOldSelection(evt.GetSelection()); - evt.SetEventObject(this); - GetEventHandler()->ProcessEvent(evt); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_END_DRAG, m_windowId); + e.SetSelection(GetIdxFromWindow(m_clickTab)); + e.SetOldSelection(e.GetSelection()); + e.SetEventObject(this); + GetEventHandler()->ProcessEvent(e); return; } @@ -2356,11 +1121,11 @@ void wxAuiTabCtrl::OnLeftUp(wxMouseEvent& evt) if (!(m_pressedButton->curState & wxAUI_BUTTON_STATE_DISABLED)) { - wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, m_windowId); - evt.SetSelection(GetIdxFromWindow(m_clickTab)); - evt.SetInt(m_pressedButton->id); - evt.SetEventObject(this); - GetEventHandler()->ProcessEvent(evt); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_BUTTON, m_windowId); + e.SetSelection(GetIdxFromWindow(m_clickTab)); + e.SetInt(m_pressedButton->id); + e.SetEventObject(this); + GetEventHandler()->ProcessEvent(e); } m_pressedButton = NULL; @@ -2377,7 +1142,7 @@ void wxAuiTabCtrl::OnMiddleUp(wxMouseEvent& evt) if (!TabHitTest(evt.m_x, evt.m_y, &wnd)) return; - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, m_windowId); e.SetEventObject(this); e.SetSelection(GetIdxFromWindow(wnd)); GetEventHandler()->ProcessEvent(e); @@ -2389,7 +1154,7 @@ void wxAuiTabCtrl::OnMiddleDown(wxMouseEvent& evt) if (!TabHitTest(evt.m_x, evt.m_y, &wnd)) return; - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, m_windowId); e.SetEventObject(this); e.SetSelection(GetIdxFromWindow(wnd)); GetEventHandler()->ProcessEvent(e); @@ -2401,7 +1166,7 @@ void wxAuiTabCtrl::OnRightUp(wxMouseEvent& evt) if (!TabHitTest(evt.m_x, evt.m_y, &wnd)) return; - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, m_windowId); e.SetEventObject(this); e.SetSelection(GetIdxFromWindow(wnd)); GetEventHandler()->ProcessEvent(e); @@ -2413,7 +1178,7 @@ void wxAuiTabCtrl::OnRightDown(wxMouseEvent& evt) if (!TabHitTest(evt.m_x, evt.m_y, &wnd)) return; - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, m_windowId); e.SetEventObject(this); e.SetSelection(GetIdxFromWindow(wnd)); GetEventHandler()->ProcessEvent(e); @@ -2425,7 +1190,7 @@ void wxAuiTabCtrl::OnLeftDClick(wxMouseEvent& evt) wxAuiTabContainerButton* button; if (!TabHitTest(evt.m_x, evt.m_y, &wnd) && !ButtonHitTest(evt.m_x, evt.m_y, &button)) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_BG_DCLICK, m_windowId); e.SetEventObject(this); GetEventHandler()->ProcessEvent(e); } @@ -2468,17 +1233,31 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt) } } +#if wxUSE_TOOLTIPS + wxWindow* wnd = NULL; + if (evt.Moving() && TabHitTest(evt.m_x, evt.m_y, &wnd)) + { + wxString tooltip(m_pages[GetIdxFromWindow(wnd)].tooltip); + + // If the text changes, set it else, keep old, to avoid + // 'moving tooltip' effect + if (GetToolTipText() != tooltip) + SetToolTip(tooltip); + } + else + UnsetToolTip(); +#endif // wxUSE_TOOLTIPS if (!evt.LeftIsDown() || m_clickPt == wxDefaultPosition) return; if (m_isDragging) { - wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, m_windowId); - evt.SetSelection(GetIdxFromWindow(m_clickTab)); - evt.SetOldSelection(evt.GetSelection()); - evt.SetEventObject(this); - GetEventHandler()->ProcessEvent(evt); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_DRAG_MOTION, m_windowId); + e.SetSelection(GetIdxFromWindow(m_clickTab)); + e.SetOldSelection(e.GetSelection()); + e.SetEventObject(this); + GetEventHandler()->ProcessEvent(e); return; } @@ -2489,11 +1268,11 @@ void wxAuiTabCtrl::OnMotion(wxMouseEvent& evt) if (abs(pos.x - m_clickPt.x) > drag_x_threshold || abs(pos.y - m_clickPt.y) > drag_y_threshold) { - wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, m_windowId); - evt.SetSelection(GetIdxFromWindow(m_clickTab)); - evt.SetOldSelection(evt.GetSelection()); - evt.SetEventObject(this); - GetEventHandler()->ProcessEvent(evt); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_BEGIN_DRAG, m_windowId); + e.SetSelection(GetIdxFromWindow(m_clickTab)); + e.SetOldSelection(e.GetSelection()); + e.SetEventObject(this); + GetEventHandler()->ProcessEvent(e); m_isDragging = true; } @@ -2538,7 +1317,7 @@ void wxAuiTabCtrl::OnButton(wxAuiNotebookEvent& event) if (idx != -1) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_PAGE_CHANGING, m_windowId); e.SetSelection(idx); e.SetOldSelection(GetActivePage()); e.SetEventObject(this); @@ -2674,7 +1453,7 @@ void wxAuiTabCtrl::OnChar(wxKeyEvent& event) if (newPage != -1) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_PAGE_CHANGING, m_windowId); e.SetSelection(newPage); e.SetOldSelection(newPage); e.SetEventObject(this); @@ -2763,7 +1542,10 @@ public: for (i = 0; i < page_count; ++i) { - int height = m_rect.height - m_tabCtrlHeight; + wxAuiNotebookPage& page = pages.Item(i); + int border_space = m_tabs->GetArtProvider()->GetAdditionalBorderSpace(page.window); + + int height = m_rect.height - m_tabCtrlHeight - border_space; if ( height < 0 ) { // avoid passing negative height to wxWindow::SetSize(), this @@ -2771,21 +1553,25 @@ public: height = 0; } - wxAuiNotebookPage& page = pages.Item(i); if (m_tabs->GetFlags() & wxAUI_NB_BOTTOM) { - page.window->SetSize(m_rect.x, m_rect.y, m_rect.width, height); + page.window->SetSize(m_rect.x + border_space, + m_rect.y + border_space, + m_rect.width - 2 * border_space, + height); } else //TODO: if (GetFlags() & wxAUI_NB_TOP) { - page.window->SetSize(m_rect.x, m_rect.y + m_tabCtrlHeight, - m_rect.width, height); + page.window->SetSize(m_rect.x + border_space, + m_rect.y + m_tabCtrlHeight, + m_rect.width - 2 * border_space, + height); } // TODO: else if (GetFlags() & wxAUI_NB_LEFT){} // TODO: else if (GetFlags() & wxAUI_NB_RIGHT){} #if wxUSE_MDI - if (page.window->IsKindOf(CLASSINFO(wxAuiMDIChildFrame))) + if (wxDynamicCast(page.window, wxAuiMDIChildFrame)) { wxAuiMDIChildFrame* wnd = (wxAuiMDIChildFrame*)page.window; wnd->ApplyMDIChildFrameRect(); @@ -2828,37 +1614,37 @@ BEGIN_EVENT_TABLE(wxAuiNotebook, wxControl) EVT_SIZE(wxAuiNotebook::OnSize) EVT_CHILD_FOCUS(wxAuiNotebook::OnChildFocusNotebook) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, + wxEVT_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebook::OnTabClicked) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, + wxEVT_AUINOTEBOOK_BEGIN_DRAG, wxAuiNotebook::OnTabBeginDrag) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, + wxEVT_AUINOTEBOOK_END_DRAG, wxAuiNotebook::OnTabEndDrag) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_CANCEL_DRAG, + wxEVT_AUINOTEBOOK_CANCEL_DRAG, wxAuiNotebook::OnTabCancelDrag) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, + wxEVT_AUINOTEBOOK_DRAG_MOTION, wxAuiNotebook::OnTabDragMotion) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_BUTTON, + wxEVT_AUINOTEBOOK_BUTTON, wxAuiNotebook::OnTabButton) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, + wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, wxAuiNotebook::OnTabMiddleDown) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, + wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, wxAuiNotebook::OnTabMiddleUp) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, + wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebook::OnTabRightDown) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, + wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebook::OnTabRightUp) EVT_AUI_RANGE(wxAuiBaseTabCtrlId, wxAuiBaseTabCtrlId+500, - wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, + wxEVT_AUINOTEBOOK_BG_DCLICK, wxAuiNotebook::OnTabBgDClick) EVT_NAVIGATION_KEY(wxAuiNotebook::OnNavigationKeyNotebook) END_EVENT_TABLE() @@ -3204,7 +1990,7 @@ bool wxAuiNotebook::DeletePage(size_t page_idx) #if wxUSE_MDI // actually destroy the window now - if (wnd->IsKindOf(CLASSINFO(wxAuiMDIChildFrame))) + if (wxDynamicCast(wnd, wxAuiMDIChildFrame)) { // delete the child frame with pending delete, as is // customary with frame windows @@ -3357,6 +2143,37 @@ wxString wxAuiNotebook::GetPageText(size_t page_idx) const return page_info.caption; } +bool wxAuiNotebook::SetPageToolTip(size_t page_idx, const wxString& text) +{ + if (page_idx >= m_tabs.GetPageCount()) + return false; + + // update our own tab catalog + wxAuiNotebookPage& page_info = m_tabs.GetPage(page_idx); + page_info.tooltip = text; + + wxAuiTabCtrl* ctrl; + int ctrl_idx; + if (!FindTab(page_info.window, &ctrl, &ctrl_idx)) + return false; + + wxAuiNotebookPage& info = ctrl->GetPage(ctrl_idx); + info.tooltip = text; + + // NB: we don't update the tooltip if it is already being displayed, it + // typically never happens, no need to code that + return true; +} + +wxString wxAuiNotebook::GetPageToolTip(size_t page_idx) const +{ + if (page_idx >= m_tabs.GetPageCount()) + return wxString(); + + const wxAuiNotebookPage& page_info = m_tabs.GetPage(page_idx); + return page_info.tooltip; +} + bool wxAuiNotebook::SetPageBitmap(size_t page_idx, const wxBitmap& bitmap) { if (page_idx >= m_tabs.GetPageCount()) @@ -3665,10 +2482,21 @@ void wxAuiNotebook::OnTabClicked(wxAuiNotebookEvent& evt) SetSelectionToWindow(wnd); } -void wxAuiNotebook::OnTabBgDClick(wxAuiNotebookEvent& WXUNUSED(evt)) +void wxAuiNotebook::OnTabBgDClick(wxAuiNotebookEvent& evt) { + // select the tab ctrl which received the db click + int selection; + wxWindow* wnd; + wxAuiTabCtrl* ctrl = (wxAuiTabCtrl*)evt.GetEventObject(); + if ( (ctrl != NULL) + && ((selection = ctrl->GetActivePage()) != wxNOT_FOUND) + && ((wnd = ctrl->GetWindowFromIdx(selection)) != NULL)) + { + SetSelectionToWindow(wnd); + } + // notify owner that the tabbar background has been double-clicked - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_BG_DCLICK, m_windowId); e.SetEventObject(this); GetEventHandler()->ProcessEvent(e); } @@ -3724,6 +2552,7 @@ void wxAuiNotebook::OnTabDragMotion(wxAuiNotebookEvent& evt) wxWindow* src_tab = dest_tabs->GetWindowFromIdx(src_idx); dest_tabs->MovePage(src_tab, dest_idx); + m_tabs.MovePage(m_tabs.GetPage(src_idx).window, dest_idx); dest_tabs->SetActivePage((size_t)dest_idx); dest_tabs->DoShowHide(); dest_tabs->Refresh(); @@ -3746,11 +2575,11 @@ void wxAuiNotebook::OnTabDragMotion(wxAuiNotebookEvent& evt) return; // make sure we are not over the hint window - if (!tab_ctrl->IsKindOf(CLASSINFO(wxFrame))) + if (!wxDynamicCast(tab_ctrl, wxFrame)) { while (tab_ctrl) { - if (tab_ctrl->IsKindOf(CLASSINFO(wxAuiTabCtrl))) + if (wxDynamicCast(tab_ctrl, wxAuiTabCtrl)) break; tab_ctrl = tab_ctrl->GetParent(); } @@ -3832,7 +2661,7 @@ void wxAuiNotebook::OnTabEndDrag(wxAuiNotebookEvent& evt) while (tab_ctrl) { - if (tab_ctrl->IsKindOf(CLASSINFO(wxAuiTabCtrl))) + if (wxDynamicCast(tab_ctrl, wxAuiTabCtrl)) break; tab_ctrl = tab_ctrl->GetParent(); } @@ -3845,7 +2674,7 @@ void wxAuiNotebook::OnTabEndDrag(wxAuiNotebookEvent& evt) { // find out from the destination control // if it's ok to drop this tab here - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_ALLOW_DND, m_windowId); e.SetSelection(evt.GetSelection()); e.SetOldSelection(evt.GetSelection()); e.SetEventObject(this); @@ -3908,7 +2737,7 @@ void wxAuiNotebook::OnTabEndDrag(wxAuiNotebookEvent& evt) if (insert_idx == -1) insert_idx = dest_tabs->GetPageCount(); dest_tabs->InsertPage(page_info.window, page_info, insert_idx); - nb->m_tabs.AddPage(page_info.window, page_info); + nb->m_tabs.InsertPage(page_info.window, page_info, insert_idx); nb->DoSizing(); dest_tabs->DoShowHide(); @@ -3918,7 +2747,7 @@ void wxAuiNotebook::OnTabEndDrag(wxAuiNotebookEvent& evt) nb->SetSelectionToPage(page_info); // notify owner that the tab has been dragged - wxAuiNotebookEvent e2(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, m_windowId); + wxAuiNotebookEvent e2(wxEVT_AUINOTEBOOK_DRAG_DONE, m_windowId); e2.SetSelection(evt.GetSelection()); e2.SetOldSelection(evt.GetSelection()); e2.SetEventObject(this); @@ -4027,7 +2856,7 @@ void wxAuiNotebook::OnTabEndDrag(wxAuiNotebookEvent& evt) } // notify owner that the tab has been dragged - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_DRAG_DONE, m_windowId); e.SetSelection(evt.GetSelection()); e.SetOldSelection(evt.GetSelection()); e.SetEventObject(this); @@ -4164,9 +2993,21 @@ void wxAuiNotebook::OnChildFocusNotebook(wxChildFocusEvent& evt) } - // change the tab selection to the child - // which was focused - int idx = m_tabs.GetIdxFromWindow(evt.GetWindow()); + // find the page containing the focused child + wxWindow* win = evt.GetWindow(); + while ( win ) + { + // pages have the notebook as the parent, so stop when we reach one + // (and also stop in the impossible case of no parent at all) + wxWindow* const parent = win->GetParent(); + if ( !parent || parent == this ) + break; + + win = parent; + } + + // change the tab selection to this page + int idx = m_tabs.GetIdxFromWindow(win); if (idx != -1 && idx != m_curPage) { SetSelection(idx); @@ -4270,7 +3111,7 @@ void wxAuiNotebook::OnTabButton(wxAuiNotebookEvent& evt) wxWindow* close_wnd = tabs->GetWindowFromIdx(selection); // ask owner if it's ok to close the tab - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_PAGE_CLOSE, m_windowId); e.SetSelection(m_tabs.GetIdxFromWindow(close_wnd)); const int idx = m_tabs.GetIdxFromWindow(close_wnd); e.SetSelection(idx); @@ -4282,7 +3123,7 @@ void wxAuiNotebook::OnTabButton(wxAuiNotebookEvent& evt) #if wxUSE_MDI - if (close_wnd->IsKindOf(CLASSINFO(wxAuiMDIChildFrame))) + if (wxDynamicCast(close_wnd, wxAuiMDIChildFrame)) { close_wnd->Close(); } @@ -4296,7 +3137,7 @@ void wxAuiNotebook::OnTabButton(wxAuiNotebookEvent& evt) } // notify owner that the tab has been closed - wxAuiNotebookEvent e2(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, m_windowId); + wxAuiNotebookEvent e2(wxEVT_AUINOTEBOOK_PAGE_CLOSED, m_windowId); e2.SetSelection(idx); e2.SetEventObject(this); GetEventHandler()->ProcessEvent(e2); @@ -4311,7 +3152,7 @@ void wxAuiNotebook::OnTabMiddleDown(wxAuiNotebookEvent& evt) wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject(); wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection()); - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_MIDDLE_DOWN, m_windowId); e.SetSelection(m_tabs.GetIdxFromWindow(wnd)); e.SetEventObject(this); GetEventHandler()->ProcessEvent(e); @@ -4327,7 +3168,7 @@ void wxAuiNotebook::OnTabMiddleUp(wxAuiNotebookEvent& evt) wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject(); wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection()); - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_MIDDLE_UP, m_windowId); e.SetSelection(m_tabs.GetIdxFromWindow(wnd)); e.SetEventObject(this); if (GetEventHandler()->ProcessEvent(e)) @@ -4350,7 +3191,7 @@ void wxAuiNotebook::OnTabRightDown(wxAuiNotebookEvent& evt) wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject(); wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection()); - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_RIGHT_DOWN, m_windowId); e.SetSelection(m_tabs.GetIdxFromWindow(wnd)); e.SetEventObject(this); GetEventHandler()->ProcessEvent(e); @@ -4362,7 +3203,7 @@ void wxAuiNotebook::OnTabRightUp(wxAuiNotebookEvent& evt) wxAuiTabCtrl* tabs = (wxAuiTabCtrl*)evt.GetEventObject(); wxWindow* wnd = tabs->GetWindowFromIdx(evt.GetSelection()); - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, m_windowId); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_TAB_RIGHT_UP, m_windowId); e.SetSelection(m_tabs.GetIdxFromWindow(wnd)); e.SetEventObject(this); GetEventHandler()->ProcessEvent(e); @@ -4420,34 +3261,6 @@ int wxAuiNotebook::GetHeightForPageHeight(int pageHeight) return tabCtrlHeight + pageHeight + decorHeight; } -// Advances the selection, generation page selection events -void wxAuiNotebook::AdvanceSelection(bool forward) -{ - if (GetPageCount() <= 1) - return; - - int currentSelection = GetSelection(); - - if (forward) - { - if (currentSelection == (int) (GetPageCount() - 1)) - return; - else if (currentSelection == -1) - currentSelection = 0; - else - currentSelection ++; - } - else - { - if (currentSelection <= 0) - return; - else - currentSelection --; - } - - SetSelection(currentSelection); -} - // Shows the window menu bool wxAuiNotebook::ShowWindowMenu() { @@ -4457,7 +3270,7 @@ bool wxAuiNotebook::ShowWindowMenu() if (idx != -1) { - wxAuiNotebookEvent e(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, tabCtrl->GetId()); + wxAuiNotebookEvent e(wxEVT_AUINOTEBOOK_PAGE_CHANGING, tabCtrl->GetId()); e.SetSelection(idx); e.SetOldSelection(tabCtrl->GetActivePage()); e.SetEventObject(tabCtrl); @@ -4469,11 +3282,11 @@ bool wxAuiNotebook::ShowWindowMenu() return false; } -void wxAuiNotebook::Thaw() +void wxAuiNotebook::DoThaw() { DoSizing(); - wxControl::Thaw(); + wxBookCtrlBase::DoThaw(); } void wxAuiNotebook::SetPageSize (const wxSize& WXUNUSED(size)) @@ -4498,13 +3311,6 @@ bool wxAuiNotebook::SetPageImage(size_t n, int imageId) return SetPageBitmap(n, GetImageList()->GetBitmap(imageId)); } -wxWindow* wxAuiNotebook::GetCurrentPage () const -{ - const int sel = GetSelection(); - - return sel == wxNOT_FOUND ? NULL : GetPage(sel); -} - int wxAuiNotebook::ChangeSelection(size_t n) { return DoModifySelection(n, false); @@ -4570,7 +3376,7 @@ int wxAuiNotebook::DoModifySelection(size_t n, bool events) bool vetoed = false; - wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, m_windowId); + wxAuiNotebookEvent evt(wxEVT_AUINOTEBOOK_PAGE_CHANGING, m_windowId); if(events) { @@ -4589,7 +3395,7 @@ int wxAuiNotebook::DoModifySelection(size_t n, bool events) // program allows the page change if(events) { - evt.SetEventType(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED); + evt.SetEventType(wxEVT_AUINOTEBOOK_PAGE_CHANGED); (void)GetEventHandler()->ProcessEvent(evt); } diff --git a/Externals/wxWidgets3/src/aui/descrip.mms b/Externals/wxWidgets3/src/aui/descrip.mms old mode 100755 new mode 100644 index d2b4d86895..9eb2dff9e7 --- a/Externals/wxWidgets3/src/aui/descrip.mms +++ b/Externals/wxWidgets3/src/aui/descrip.mms @@ -2,7 +2,7 @@ # * # Make file for VMS * # Author : J.Jansen (joukj@hrem.nano.tudelft.nl) * -# Date : 14 December 2010 * +# Date : 2 April 2011 * # * #***************************************************************************** .first @@ -44,10 +44,10 @@ CC_DEFINE = cc $(CFLAGS)$(CC_DEFINE) $(MMS$TARGET_NAME).c OBJECTS = dockart.obj,floatpane.obj,framemanager.obj,auibook.obj,tabmdi.obj,\ - auibar.obj + auibar.obj,tabart.obj SOURCES = dockart.cpp floatpane.cpp framemanager.cpp auibook.cpp tabmdi.cpp \ - auibar.cpp + auibar.cpp tabart.cpp all : $(SOURCES) $(MMS)$(MMSQUALIFIERS) $(OBJECTS) @@ -75,3 +75,4 @@ framemanager.obj : framemanager.cpp auibook.obj : auibook.cpp tabmdi.obj : tabmdi.cpp auibar.obj : auibar.cpp +tabart.obj : tabart.cpp diff --git a/Externals/wxWidgets3/src/aui/dockart.cpp b/Externals/wxWidgets3/src/aui/dockart.cpp index 74dac023ce..df5c65febe 100644 --- a/Externals/wxWidgets3/src/aui/dockart.cpp +++ b/Externals/wxWidgets3/src/aui/dockart.cpp @@ -4,7 +4,6 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id: dockart.cpp 69590 2011-10-30 14:20:03Z VZ $ // Copyright: (C) Copyright 2005-2006, Kirix Corporation, All Rights Reserved // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -27,6 +26,8 @@ #include "wx/aui/framemanager.h" #include "wx/aui/dockart.h" +#include "wx/aui/auibook.h" +#include "wx/aui/tabart.h" #ifndef WX_PRECOMP #include "wx/settings.h" @@ -43,11 +44,14 @@ #ifdef __WXGTK__ #include #include "wx/renderer.h" -#if GTK_CHECK_VERSION(2,0,0) +#ifdef __WXGTK20__ #include "wx/gtk/private/gtk2-compat.h" #else #define gtk_widget_is_drawable GTK_WIDGET_DRAWABLE #endif +#ifdef __WXGTK3__ + #include "wx/graphics.h" +#endif #endif @@ -420,11 +424,17 @@ void wxAuiDefaultDockArt::DrawSash(wxDC& dc, wxWindow *window, int orientation, gtk_paint_handle ( gtk_widget_get_style(window->m_wxwindow), +#ifdef __WXGTK3__ + static_cast(dc.GetGraphicsContext()->GetNativeContext()), +#else window->GTKGetDrawingWindow(), +#endif // flags & wxCONTROL_CURRENT ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL, GTK_STATE_NORMAL, GTK_SHADOW_NONE, +#ifndef __WXGTK3__ NULL /* no clipping */, +#endif window->m_wxwindow, "paned", rect.x, @@ -457,7 +467,7 @@ void wxAuiDefaultDockArt::DrawBackground(wxDC& dc, wxWindow *WXUNUSED(window), i dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height); } -void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const wxRect& _rect, +void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow* window, const wxRect& _rect, wxAuiPaneInfo& pane) { dc.SetPen(m_borderPen); @@ -483,10 +493,21 @@ void wxAuiDefaultDockArt::DrawBorder(wxDC& dc, wxWindow *WXUNUSED(window), const } else { - for (i = 0; i < border_width; ++i) + // notebooks draw the border themselves, so they can use native rendering (e.g. tabartgtk) + wxAuiTabArt* art = 0; + wxAuiNotebook* nb = wxDynamicCast(window, wxAuiNotebook); + if (nb) + art = nb->GetArtProvider(); + + if (art) + art->DrawBorder(dc, window, rect); + else { - dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height); - rect.Deflate(1); + for (i = 0; i < border_width; ++i) + { + dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height); + rect.Deflate(1); + } } } } diff --git a/Externals/wxWidgets3/src/aui/floatpane.cpp b/Externals/wxWidgets3/src/aui/floatpane.cpp index a4ce130fd8..837c0a0aa5 100644 --- a/Externals/wxWidgets3/src/aui/floatpane.cpp +++ b/Externals/wxWidgets3/src/aui/floatpane.cpp @@ -4,7 +4,6 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id: floatpane.cpp 69590 2011-10-30 14:20:03Z VZ $ // Copyright: (C) Copyright 2005-2006, Kirix Corporation, All Rights Reserved // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -216,6 +215,9 @@ void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event) return; } + // as on OSX moving windows are not getting all move events, only sporadically, this difference + // is almost always big on OSX, so avoid this early exit opportunity +#ifndef __WXOSX__ // skip if moving too fast to avoid massive redraws and // jumping hint windows if ((abs(winRect.x - m_lastRect.x) > 3) || @@ -235,6 +237,7 @@ void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event) return; } +#endif // prevent frame redocking during resize if (m_lastRect.GetSize() != winRect.GetSize()) @@ -281,7 +284,10 @@ void wxAuiFloatingFrame::OnMoveEvent(wxMoveEvent& event) if (m_last3Rect.IsEmpty()) return; - OnMoving(event.GetRect(), dir); + if ( event.GetEventType() == wxEVT_MOVING ) + OnMoving(event.GetRect(), dir); + else + OnMoving(wxRect(event.GetPosition(),GetSize()), dir); } void wxAuiFloatingFrame::OnIdle(wxIdleEvent& event) @@ -337,7 +343,7 @@ void wxAuiFloatingFrame::OnActivate(wxActivateEvent& event) } // utility function which determines the state of the mouse button -// (independant of having a wxMouseEvent handy) - utimately a better +// (independent of having a wxMouseEvent handy) - utimately a better // mechanism for this should be found (possibly by adding the // functionality to wxWidgets itself) bool wxAuiFloatingFrame::isMouseDown() diff --git a/Externals/wxWidgets3/src/aui/framemanager.cpp b/Externals/wxWidgets3/src/aui/framemanager.cpp index 1fee9e8ffa..20e654791a 100644 --- a/Externals/wxWidgets3/src/aui/framemanager.cpp +++ b/Externals/wxWidgets3/src/aui/framemanager.cpp @@ -4,7 +4,6 @@ // Author: Benjamin I. Williams // Modified by: // Created: 2005-05-17 -// RCS-ID: $Id: framemanager.cpp 70807 2012-03-04 20:31:34Z VZ $ // Copyright: (C) Copyright 2005-2006, Kirix Corporation, All Rights Reserved // Licence: wxWindows Library Licence, Version 3.1 /////////////////////////////////////////////////////////////////////////////// @@ -822,7 +821,7 @@ void wxAuiManager::UpdateHintWindowConfig() wxWindow* w = m_frame; while (w) { - if (w->IsKindOf(CLASSINFO(wxFrame))) + if (wxDynamicCast(w, wxFrame)) { wxFrame* f = static_cast(w); can_do_transparent = f->CanSetTransparent(); @@ -913,7 +912,7 @@ void wxAuiManager::SetManagedWindow(wxWindow* wnd) // we need to add the MDI client window as the default // center pane - if (m_frame->IsKindOf(CLASSINFO(wxMDIParentFrame))) + if (wxDynamicCast(m_frame, wxMDIParentFrame)) { wxMDIParentFrame* mdi_frame = (wxMDIParentFrame*)m_frame; wxWindow* client_window = mdi_frame->GetClientWindow(); @@ -924,7 +923,7 @@ void wxAuiManager::SetManagedWindow(wxWindow* wnd) wxAuiPaneInfo().Name(wxT("mdiclient")). CenterPane().PaneBorder(false)); } - else if (m_frame->IsKindOf(CLASSINFO(wxAuiMDIParentFrame))) + else if (wxDynamicCast(m_frame, wxAuiMDIParentFrame)) { wxAuiMDIParentFrame* mdi_frame = (wxAuiMDIParentFrame*)m_frame; wxAuiMDIClientWindow* client_window = mdi_frame->GetClientWindow(); @@ -1097,7 +1096,7 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& paneInfo) if (pinfo.HasGripper()) { - if (pinfo.window->IsKindOf(CLASSINFO(wxAuiToolBar))) + if (wxDynamicCast(pinfo.window, wxAuiToolBar)) { // prevent duplicate gripper -- both wxAuiManager and wxAuiToolBar // have a gripper control. The toolbar's built-in gripper @@ -1117,7 +1116,7 @@ bool wxAuiManager::AddPane(wxWindow* window, const wxAuiPaneInfo& paneInfo) pinfo.best_size = pinfo.window->GetClientSize(); #if wxUSE_TOOLBAR - if (pinfo.window->IsKindOf(CLASSINFO(wxToolBar))) + if (wxDynamicCast(pinfo.window, wxToolBar)) { // GetClientSize() doesn't get the best size for // a toolbar under some newer versions of wxWidgets, @@ -3236,16 +3235,16 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks, // determine the mouse offset and the pane size, both in the // direction of the dock itself, and perpendicular to the dock - int offset, size; + int mouseOffset, size; if (part->orientation == wxVERTICAL) { - offset = pt.y - part->rect.y; + mouseOffset = pt.y - part->rect.y; size = part->rect.GetHeight(); } else { - offset = pt.x - part->rect.x; + mouseOffset = pt.x - part->rect.x; size = part->rect.GetWidth(); } @@ -3253,7 +3252,7 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks, // if we are in the top/left part of the pane, // insert the pane before the pane being hovered over - if (offset <= size/2) + if (mouseOffset <= size/2) { drop_position = part->pane->dock_pos; DoInsertPane(panes, @@ -3265,7 +3264,7 @@ bool wxAuiManager::DoDrop(wxAuiDockInfoArray& docks, // if we are in the bottom/right part of the pane, // insert the pane before the pane being hovered over - if (offset > size/2) + if (mouseOffset > size/2) { drop_position = part->pane->dock_pos+1; DoInsertPane(panes, @@ -3313,7 +3312,7 @@ void wxAuiManager::ShowHint(const wxRect& rect) m_hintFadeAmt = m_hintFadeMax; if ((m_flags & wxAUI_MGR_HINT_FADE) - && !((m_hintWnd->IsKindOf(CLASSINFO(wxPseudoTransparentFrame))) && + && !((wxDynamicCast(m_hintWnd, wxPseudoTransparentFrame)) && (m_flags & wxAUI_MGR_NO_VENETIAN_BLINDS_FADE)) ) m_hintFadeAmt = 0; @@ -3367,15 +3366,15 @@ void wxAuiManager::ShowHint(const wxRect& rect) pane.frame && pane.frame->IsShown()) { - wxRect rect = pane.frame->GetRect(); + wxRect r = pane.frame->GetRect(); #ifdef __WXGTK__ // wxGTK returns the client size, not the whole frame size - rect.width += 15; - rect.height += 35; - rect.Inflate(5); + r.width += 15; + r.height += 35; + r.Inflate(5); #endif - clip.Subtract(rect); + clip.Subtract(r); } } @@ -3959,7 +3958,7 @@ void wxAuiManager::OnSize(wxSizeEvent& event) Repaint(); #if wxUSE_MDI - if (m_frame->IsKindOf(CLASSINFO(wxMDIParentFrame))) + if (wxDynamicCast(m_frame, wxMDIParentFrame)) { // for MDI parent frames, this event must not // be "skipped". In other words, the parent frame @@ -3983,7 +3982,7 @@ void wxAuiManager::OnFindManager(wxAuiManagerEvent& evt) } // if we are managing a child frame, get the 'real' manager - if (window->IsKindOf(CLASSINFO(wxAuiFloatingFrame))) + if (wxDynamicCast(window, wxAuiFloatingFrame)) { wxAuiFloatingFrame* float_frame = static_cast(window); evt.SetManager(float_frame->GetOwnerManager()); @@ -4126,7 +4125,7 @@ void wxAuiManager::OnLeftDown(wxMouseEvent& event) if (part->pane && part->pane->window && managed_wnd && - managed_wnd->IsKindOf(CLASSINFO(wxAuiFloatingFrame))) + wxDynamicCast(managed_wnd, wxAuiFloatingFrame)) { wxAuiFloatingFrame* floating_frame = (wxAuiFloatingFrame*)managed_wnd; wxAuiManager* owner_mgr = floating_frame->GetOwnerManager(); @@ -4211,7 +4210,7 @@ bool wxAuiManager::DoEndResizeAction(wxMouseEvent& event) #if wxUSE_STATUSBAR // if there's a status control, the available // height decreases accordingly - if (m_frame && m_frame->IsKindOf(CLASSINFO(wxFrame))) + if (wxDynamicCast(m_frame, wxFrame)) { wxFrame* frame = static_cast(m_frame); wxStatusBar* status = frame->GetStatusBar(); @@ -4640,7 +4639,7 @@ void wxAuiManager::OnMotion(wxMouseEvent& event) // We can't move the child window so we need to get the frame that // we want to be really moving. This is probably not the best place // to do this but at least it fixes the bug (#13177) for now. - if (!m_actionWindow->IsKindOf(CLASSINFO(wxAuiFloatingFrame))) + if (!wxDynamicCast(m_actionWindow, wxAuiFloatingFrame)) { wxAuiPaneInfo& pane = GetPane(m_actionWindow); m_actionWindow = pane.frame; @@ -4658,8 +4657,8 @@ void wxAuiManager::OnMotion(wxMouseEvent& event) pane.SetFlag(wxAuiPaneInfo::actionPane, true); - wxPoint pt = event.GetPosition(); - DoDrop(m_docks, m_panes, pane, pt, m_actionOffset); + wxPoint point = event.GetPosition(); + DoDrop(m_docks, m_panes, pane, point, m_actionOffset); // if DoDrop() decided to float the pane, set up // the floating pane's initial position @@ -4793,7 +4792,7 @@ void wxAuiManager::OnPaneButton(wxAuiManagerEvent& evt) } else if (evt.button == wxAUI_BUTTON_MAXIMIZE_RESTORE && !pane.IsMaximized()) { - // fire pane close event + // fire pane maximize event wxAuiManagerEvent e(wxEVT_AUI_PANE_MAXIMIZE); e.SetManager(this); e.SetPane(evt.pane); @@ -4807,7 +4806,7 @@ void wxAuiManager::OnPaneButton(wxAuiManagerEvent& evt) } else if (evt.button == wxAUI_BUTTON_MAXIMIZE_RESTORE && pane.IsMaximized()) { - // fire pane close event + // fire pane restore event wxAuiManagerEvent e(wxEVT_AUI_PANE_RESTORE); e.SetManager(this); e.SetPane(evt.pane); @@ -4819,11 +4818,29 @@ void wxAuiManager::OnPaneButton(wxAuiManagerEvent& evt) Update(); } } - else if (evt.button == wxAUI_BUTTON_PIN) + else if (evt.button == wxAUI_BUTTON_PIN && + (m_flags & wxAUI_MGR_ALLOW_FLOATING) && pane.IsFloatable()) { - if ((m_flags & wxAUI_MGR_ALLOW_FLOATING) && - pane.IsFloatable()) - pane.Float(); + if (pane.IsMaximized()) + { + // If the pane is maximized, the original state must be restored + // before trying to float the pane, otherwise the other panels + // wouldn't appear correctly when it becomes floating. + wxAuiManagerEvent e(wxEVT_AUI_PANE_RESTORE); + e.SetManager(this); + e.SetPane(evt.pane); + ProcessMgrEvent(e); + + if (e.GetVeto()) + { + // If it can't be restored, it can't be floated neither. + return; + } + + RestorePane(pane); + } + + pane.Float(); Update(); } } diff --git a/Externals/wxWidgets3/src/aui/tabart.cpp b/Externals/wxWidgets3/src/aui/tabart.cpp new file mode 100644 index 0000000000..f736f0b6e5 --- /dev/null +++ b/Externals/wxWidgets3/src/aui/tabart.cpp @@ -0,0 +1,1319 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/aui/tabart.cpp +// Purpose: wxaui: wx advanced user interface - notebook-art +// Author: Benjamin I. Williams +// Modified by: Jens Lody (moved from auibook.cpp in extra file) +// Created: 2012-03-21 +// Copyright: (C) Copyright 2006, Kirix Corporation, All Rights Reserved +// Licence: wxWindows Library Licence, Version 3.1 +/////////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_AUI + +#ifndef WX_PRECOMP + #include "wx/dc.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/bitmap.h" + #include "wx/menu.h" +#endif + +#include "wx/renderer.h" +#include "wx/aui/auibook.h" +#include "wx/aui/framemanager.h" +#include "wx/aui/dockart.h" + +#ifdef __WXMAC__ +#include "wx/osx/private.h" +#endif + + +// -- GUI helper classes and functions -- + +class wxAuiCommandCapture : public wxEvtHandler +{ +public: + + wxAuiCommandCapture() { m_lastId = 0; } + int GetCommandId() const { return m_lastId; } + + bool ProcessEvent(wxEvent& evt) + { + if (evt.GetEventType() == wxEVT_MENU) + { + m_lastId = evt.GetId(); + return true; + } + + if (GetNextHandler()) + return GetNextHandler()->ProcessEvent(evt); + + return false; + } + +private: + int m_lastId; +}; + + +// these functions live in dockart.cpp -- they'll eventually +// be moved to a new utility cpp file + +wxBitmap wxAuiBitmapFromBits(const unsigned char bits[], int w, int h, + const wxColour& color); + +wxString wxAuiChopText(wxDC& dc, const wxString& text, int max_size); + +static void DrawButtons(wxDC& dc, + const wxRect& _rect, + const wxBitmap& bmp, + const wxColour& bkcolour, + int button_state) +{ + wxRect rect = _rect; + + if (button_state == wxAUI_BUTTON_STATE_PRESSED) + { + rect.x++; + rect.y++; + } + + if (button_state == wxAUI_BUTTON_STATE_HOVER || + button_state == wxAUI_BUTTON_STATE_PRESSED) + { + dc.SetBrush(wxBrush(bkcolour.ChangeLightness(120))); + dc.SetPen(wxPen(bkcolour.ChangeLightness(75))); + + // draw the background behind the button + dc.DrawRectangle(rect.x, rect.y, 15, 15); + } + + // draw the button itself + dc.DrawBitmap(bmp, rect.x, rect.y, true); +} + +static void IndentPressedBitmap(wxRect* rect, int button_state) +{ + if (button_state == wxAUI_BUTTON_STATE_PRESSED) + { + rect->x++; + rect->y++; + } +} + +// -- bitmaps -- + +#if defined( __WXMAC__ ) + static const unsigned char close_bits[]={ + 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0xFE, 0x03, 0xF8, 0x01, 0xF0, 0x19, 0xF3, + 0xB8, 0xE3, 0xF0, 0xE1, 0xE0, 0xE0, 0xF0, 0xE1, 0xB8, 0xE3, 0x19, 0xF3, + 0x01, 0xF0, 0x03, 0xF8, 0x0F, 0xFE, 0xFF, 0xFF }; +#elif defined( __WXGTK__) + static const unsigned char close_bits[]={ + 0xff, 0xff, 0xff, 0xff, 0x07, 0xf0, 0xfb, 0xef, 0xdb, 0xed, 0x8b, 0xe8, + 0x1b, 0xec, 0x3b, 0xee, 0x1b, 0xec, 0x8b, 0xe8, 0xdb, 0xed, 0xfb, 0xef, + 0x07, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; +#else + static const unsigned char close_bits[]={ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xf3, 0xcf, 0xf9, + 0x9f, 0xfc, 0x3f, 0xfe, 0x3f, 0xfe, 0x9f, 0xfc, 0xcf, 0xf9, 0xe7, 0xf3, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; +#endif + +static const unsigned char left_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xfe, 0x3f, 0xfe, + 0x1f, 0xfe, 0x0f, 0xfe, 0x1f, 0xfe, 0x3f, 0xfe, 0x7f, 0xfe, 0xff, 0xfe, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; + +static const unsigned char right_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xdf, 0xff, 0x9f, 0xff, 0x1f, 0xff, + 0x1f, 0xfe, 0x1f, 0xfc, 0x1f, 0xfe, 0x1f, 0xff, 0x9f, 0xff, 0xdf, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; + +static const unsigned char list_bits[] = { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x0f, 0xf8, 0xff, 0xff, 0x0f, 0xf8, 0x1f, 0xfc, 0x3f, 0xfe, 0x7f, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; + + + + + + +// -- wxAuiGenericTabArt class implementation -- + +wxAuiGenericTabArt::wxAuiGenericTabArt() +{ + m_normalFont = *wxNORMAL_FONT; + m_selectedFont = *wxNORMAL_FONT; + m_selectedFont.SetWeight(wxBOLD); + m_measuringFont = m_selectedFont; + + m_fixedTabWidth = 100; + m_tabCtrlHeight = 0; + +#if defined( __WXMAC__ ) && wxOSX_USE_COCOA_OR_CARBON + wxColor baseColour = wxColour( wxMacCreateCGColorFromHITheme(kThemeBrushToolbarBackground)); +#else + wxColor baseColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); +#endif + + // the baseColour is too pale to use as our base colour, + // so darken it a bit -- + if ((255-baseColour.Red()) + + (255-baseColour.Green()) + + (255-baseColour.Blue()) < 60) + { + baseColour = baseColour.ChangeLightness(92); + } + + m_activeColour = baseColour; + m_baseColour = baseColour; + wxColor borderColour = baseColour.ChangeLightness(75); + + m_borderPen = wxPen(borderColour); + m_baseColourPen = wxPen(m_baseColour); + m_baseColourBrush = wxBrush(m_baseColour); + + m_activeCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK); + m_disabledCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128)); + + m_activeLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK); + m_disabledLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128)); + + m_activeRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK); + m_disabledRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128)); + + m_activeWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK); + m_disabledWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128)); + + m_flags = 0; +} + +wxAuiGenericTabArt::~wxAuiGenericTabArt() +{ +} + +wxAuiTabArt* wxAuiGenericTabArt::Clone() +{ + return new wxAuiGenericTabArt(*this); +} + +void wxAuiGenericTabArt::SetFlags(unsigned int flags) +{ + m_flags = flags; +} + +void wxAuiGenericTabArt::SetSizingInfo(const wxSize& tab_ctrl_size, + size_t tab_count) +{ + m_fixedTabWidth = 100; + + int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - 4; + + if (m_flags & wxAUI_NB_CLOSE_BUTTON) + tot_width -= m_activeCloseBmp.GetWidth(); + if (m_flags & wxAUI_NB_WINDOWLIST_BUTTON) + tot_width -= m_activeWindowListBmp.GetWidth(); + + if (tab_count > 0) + { + m_fixedTabWidth = tot_width/(int)tab_count; + } + + + if (m_fixedTabWidth < 100) + m_fixedTabWidth = 100; + + if (m_fixedTabWidth > tot_width/2) + m_fixedTabWidth = tot_width/2; + + if (m_fixedTabWidth > 220) + m_fixedTabWidth = 220; + + m_tabCtrlHeight = tab_ctrl_size.y; +} + + +void wxAuiGenericTabArt::DrawBorder(wxDC& dc, wxWindow* wnd, const wxRect& rect) +{ + int i, border_width = GetBorderWidth(wnd); + + wxRect theRect(rect); + for (i = 0; i < border_width; ++i) + { + dc.DrawRectangle(theRect.x, theRect.y, theRect.width, theRect.height); + theRect.Deflate(1); + } +} + +void wxAuiGenericTabArt::DrawBackground(wxDC& dc, + wxWindow* WXUNUSED(wnd), + const wxRect& rect) +{ + // draw background + + wxColor top_color = m_baseColour.ChangeLightness(90); + wxColor bottom_color = m_baseColour.ChangeLightness(170); + wxRect r; + + if (m_flags &wxAUI_NB_BOTTOM) + r = wxRect(rect.x, rect.y, rect.width+2, rect.height); + // TODO: else if (m_flags &wxAUI_NB_LEFT) {} + // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} + else //for wxAUI_NB_TOP + r = wxRect(rect.x, rect.y, rect.width+2, rect.height-3); + + dc.GradientFillLinear(r, top_color, bottom_color, wxSOUTH); + + + // draw base lines + + dc.SetPen(m_borderPen); + int y = rect.GetHeight(); + int w = rect.GetWidth(); + + if (m_flags &wxAUI_NB_BOTTOM) + { + dc.SetBrush(wxBrush(bottom_color)); + dc.DrawRectangle(-1, 0, w+2, 4); + } + // TODO: else if (m_flags &wxAUI_NB_LEFT) {} + // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} + else //for wxAUI_NB_TOP + { + dc.SetBrush(m_baseColourBrush); + dc.DrawRectangle(-1, y-4, w+2, 4); + } +} + + +// DrawTab() draws an individual tab. +// +// dc - output dc +// in_rect - rectangle the tab should be confined to +// caption - tab's caption +// active - whether or not the tab is active +// out_rect - actual output rectangle +// x_extent - the advance x; where the next tab should start + +void wxAuiGenericTabArt::DrawTab(wxDC& dc, + wxWindow* wnd, + const wxAuiNotebookPage& page, + const wxRect& in_rect, + int close_button_state, + wxRect* out_tab_rect, + wxRect* out_button_rect, + int* x_extent) +{ + wxCoord normal_textx, normal_texty; + wxCoord selected_textx, selected_texty; + wxCoord texty; + + // if the caption is empty, measure some temporary text + wxString caption = page.caption; + if (caption.empty()) + caption = wxT("Xj"); + + dc.SetFont(m_selectedFont); + dc.GetTextExtent(caption, &selected_textx, &selected_texty); + + dc.SetFont(m_normalFont); + dc.GetTextExtent(caption, &normal_textx, &normal_texty); + + // figure out the size of the tab + wxSize tab_size = GetTabSize(dc, + wnd, + page.caption, + page.bitmap, + page.active, + close_button_state, + x_extent); + + wxCoord tab_height = m_tabCtrlHeight - 3; + wxCoord tab_width = tab_size.x; + wxCoord tab_x = in_rect.x; + wxCoord tab_y = in_rect.y + in_rect.height - tab_height; + + + caption = page.caption; + + + // select pen, brush and font for the tab to be drawn + + if (page.active) + { + dc.SetFont(m_selectedFont); + texty = selected_texty; + } + else + { + dc.SetFont(m_normalFont); + texty = normal_texty; + } + + + // create points that will make the tab outline + + int clip_width = tab_width; + if (tab_x + clip_width > in_rect.x + in_rect.width) + clip_width = (in_rect.x + in_rect.width) - tab_x; + +/* + wxPoint clip_points[6]; + clip_points[0] = wxPoint(tab_x, tab_y+tab_height-3); + clip_points[1] = wxPoint(tab_x, tab_y+2); + clip_points[2] = wxPoint(tab_x+2, tab_y); + clip_points[3] = wxPoint(tab_x+clip_width-1, tab_y); + clip_points[4] = wxPoint(tab_x+clip_width+1, tab_y+2); + clip_points[5] = wxPoint(tab_x+clip_width+1, tab_y+tab_height-3); + + // FIXME: these ports don't provide wxRegion ctor from array of points +#if !defined(__WXDFB__) && !defined(__WXCOCOA__) + // set the clipping region for the tab -- + wxRegion clipping_region(WXSIZEOF(clip_points), clip_points); + dc.SetClippingRegion(clipping_region); +#endif // !wxDFB && !wxCocoa +*/ + // since the above code above doesn't play well with WXDFB or WXCOCOA, + // we'll just use a rectangle for the clipping region for now -- + dc.SetClippingRegion(tab_x, tab_y, clip_width+1, tab_height-3); + + + wxPoint border_points[6]; + if (m_flags &wxAUI_NB_BOTTOM) + { + border_points[0] = wxPoint(tab_x, tab_y); + border_points[1] = wxPoint(tab_x, tab_y+tab_height-6); + border_points[2] = wxPoint(tab_x+2, tab_y+tab_height-4); + border_points[3] = wxPoint(tab_x+tab_width-2, tab_y+tab_height-4); + border_points[4] = wxPoint(tab_x+tab_width, tab_y+tab_height-6); + border_points[5] = wxPoint(tab_x+tab_width, tab_y); + } + else //if (m_flags & wxAUI_NB_TOP) {} + { + border_points[0] = wxPoint(tab_x, tab_y+tab_height-4); + border_points[1] = wxPoint(tab_x, tab_y+2); + border_points[2] = wxPoint(tab_x+2, tab_y); + border_points[3] = wxPoint(tab_x+tab_width-2, tab_y); + border_points[4] = wxPoint(tab_x+tab_width, tab_y+2); + border_points[5] = wxPoint(tab_x+tab_width, tab_y+tab_height-4); + } + // TODO: else if (m_flags &wxAUI_NB_LEFT) {} + // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} + + int drawn_tab_yoff = border_points[1].y; + int drawn_tab_height = border_points[0].y - border_points[1].y; + + + if (page.active) + { + // draw active tab + + // draw base background color + wxRect r(tab_x, tab_y, tab_width, tab_height); + dc.SetPen(wxPen(m_activeColour)); + dc.SetBrush(wxBrush(m_activeColour)); + dc.DrawRectangle(r.x+1, r.y+1, r.width-1, r.height-4); + + // this white helps fill out the gradient at the top of the tab + dc.SetPen(*wxWHITE_PEN); + dc.SetBrush(*wxWHITE_BRUSH); + dc.DrawRectangle(r.x+2, r.y+1, r.width-3, r.height-4); + + // these two points help the rounded corners appear more antialiased + dc.SetPen(wxPen(m_activeColour)); + dc.DrawPoint(r.x+2, r.y+1); + dc.DrawPoint(r.x+r.width-2, r.y+1); + + // set rectangle down a bit for gradient drawing + r.SetHeight(r.GetHeight()/2); + r.x += 2; + r.width -= 3; + r.y += r.height; + r.y -= 2; + + // draw gradient background + wxColor top_color = *wxWHITE; + wxColor bottom_color = m_activeColour; + dc.GradientFillLinear(r, bottom_color, top_color, wxNORTH); + } + else + { + // draw inactive tab + + wxRect r(tab_x, tab_y+1, tab_width, tab_height-3); + + // start the gradent up a bit and leave the inside border inset + // by a pixel for a 3D look. Only the top half of the inactive + // tab will have a slight gradient + r.x += 3; + r.y++; + r.width -= 4; + r.height /= 2; + r.height--; + + // -- draw top gradient fill for glossy look + wxColor top_color = m_baseColour; + wxColor bottom_color = top_color.ChangeLightness(160); + dc.GradientFillLinear(r, bottom_color, top_color, wxNORTH); + + r.y += r.height; + r.y--; + + // -- draw bottom fill for glossy look + top_color = m_baseColour; + bottom_color = m_baseColour; + dc.GradientFillLinear(r, top_color, bottom_color, wxSOUTH); + } + + // draw tab outline + dc.SetPen(m_borderPen); + dc.SetBrush(*wxTRANSPARENT_BRUSH); + dc.DrawPolygon(WXSIZEOF(border_points), border_points); + + // there are two horizontal grey lines at the bottom of the tab control, + // this gets rid of the top one of those lines in the tab control + if (page.active) + { + if (m_flags &wxAUI_NB_BOTTOM) + dc.SetPen(wxPen(m_baseColour.ChangeLightness(170))); + // TODO: else if (m_flags &wxAUI_NB_LEFT) {} + // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} + else //for wxAUI_NB_TOP + dc.SetPen(m_baseColourPen); + dc.DrawLine(border_points[0].x+1, + border_points[0].y, + border_points[5].x, + border_points[5].y); + } + + + int text_offset = tab_x + 8; + int close_button_width = 0; + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + { + close_button_width = m_activeCloseBmp.GetWidth(); + } + + int bitmap_offset = 0; + if (page.bitmap.IsOk()) + { + bitmap_offset = tab_x + 8; + + // draw bitmap + dc.DrawBitmap(page.bitmap, + bitmap_offset, + drawn_tab_yoff + (drawn_tab_height/2) - (page.bitmap.GetHeight()/2), + true); + + text_offset = bitmap_offset + page.bitmap.GetWidth(); + text_offset += 3; // bitmap padding + + } + else + { + text_offset = tab_x + 8; + } + + + wxString draw_text = wxAuiChopText(dc, + caption, + tab_width - (text_offset-tab_x) - close_button_width); + + // draw tab text + dc.DrawText(draw_text, + text_offset, + drawn_tab_yoff + (drawn_tab_height)/2 - (texty/2) - 1); + + // draw focus rectangle + if (page.active && (wnd->FindFocus() == wnd)) + { + wxRect focusRectText(text_offset, (drawn_tab_yoff + (drawn_tab_height)/2 - (texty/2) - 1), + selected_textx, selected_texty); + + wxRect focusRect; + wxRect focusRectBitmap; + + if (page.bitmap.IsOk()) + focusRectBitmap = wxRect(bitmap_offset, drawn_tab_yoff + (drawn_tab_height/2) - (page.bitmap.GetHeight()/2), + page.bitmap.GetWidth(), page.bitmap.GetHeight()); + + if (page.bitmap.IsOk() && draw_text.IsEmpty()) + focusRect = focusRectBitmap; + else if (!page.bitmap.IsOk() && !draw_text.IsEmpty()) + focusRect = focusRectText; + else if (page.bitmap.IsOk() && !draw_text.IsEmpty()) + focusRect = focusRectText.Union(focusRectBitmap); + + focusRect.Inflate(2, 2); + + wxRendererNative::Get().DrawFocusRect(wnd, dc, focusRect, 0); + } + + // draw close button if necessary + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + { + wxBitmap bmp = m_disabledCloseBmp; + + if (close_button_state == wxAUI_BUTTON_STATE_HOVER || + close_button_state == wxAUI_BUTTON_STATE_PRESSED) + { + bmp = m_activeCloseBmp; + } + + int offsetY = tab_y-1; + if (m_flags & wxAUI_NB_BOTTOM) + offsetY = 1; + + wxRect rect(tab_x + tab_width - close_button_width - 1, + offsetY + (tab_height/2) - (bmp.GetHeight()/2), + close_button_width, + tab_height); + + IndentPressedBitmap(&rect, close_button_state); + dc.DrawBitmap(bmp, rect.x, rect.y, true); + + *out_button_rect = rect; + } + + *out_tab_rect = wxRect(tab_x, tab_y, tab_width, tab_height); + + dc.DestroyClippingRegion(); +} + +int wxAuiGenericTabArt::GetIndentSize() +{ + return 5; +} + +int wxAuiGenericTabArt::GetBorderWidth(wxWindow* wnd) +{ + wxAuiManager* mgr = wxAuiManager::GetManager(wnd); + if (mgr) + { + wxAuiDockArt* art = mgr->GetArtProvider(); + if (art) + return art->GetMetric(wxAUI_DOCKART_PANE_BORDER_SIZE); + } + return 1; +} + +int wxAuiGenericTabArt::GetAdditionalBorderSpace(wxWindow* WXUNUSED(wnd)) +{ + return 0; +} + +wxSize wxAuiGenericTabArt::GetTabSize(wxDC& dc, + wxWindow* WXUNUSED(wnd), + const wxString& caption, + const wxBitmap& bitmap, + bool WXUNUSED(active), + int close_button_state, + int* x_extent) +{ + wxCoord measured_textx, measured_texty, tmp; + + dc.SetFont(m_measuringFont); + dc.GetTextExtent(caption, &measured_textx, &measured_texty); + + dc.GetTextExtent(wxT("ABCDEFXj"), &tmp, &measured_texty); + + // add padding around the text + wxCoord tab_width = measured_textx; + wxCoord tab_height = measured_texty; + + // if the close button is showing, add space for it + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + tab_width += m_activeCloseBmp.GetWidth() + 3; + + // if there's a bitmap, add space for it + if (bitmap.IsOk()) + { + tab_width += bitmap.GetWidth(); + tab_width += 3; // right side bitmap padding + tab_height = wxMax(tab_height, bitmap.GetHeight()); + } + + // add padding + tab_width += 16; + tab_height += 10; + + if (m_flags & wxAUI_NB_TAB_FIXED_WIDTH) + { + tab_width = m_fixedTabWidth; + } + + *x_extent = tab_width; + + return wxSize(tab_width, tab_height); +} + + +void wxAuiGenericTabArt::DrawButton(wxDC& dc, + wxWindow* WXUNUSED(wnd), + const wxRect& in_rect, + int bitmap_id, + int button_state, + int orientation, + wxRect* out_rect) +{ + wxBitmap bmp; + wxRect rect; + + switch (bitmap_id) + { + case wxAUI_BUTTON_CLOSE: + if (button_state & wxAUI_BUTTON_STATE_DISABLED) + bmp = m_disabledCloseBmp; + else + bmp = m_activeCloseBmp; + break; + case wxAUI_BUTTON_LEFT: + if (button_state & wxAUI_BUTTON_STATE_DISABLED) + bmp = m_disabledLeftBmp; + else + bmp = m_activeLeftBmp; + break; + case wxAUI_BUTTON_RIGHT: + if (button_state & wxAUI_BUTTON_STATE_DISABLED) + bmp = m_disabledRightBmp; + else + bmp = m_activeRightBmp; + break; + case wxAUI_BUTTON_WINDOWLIST: + if (button_state & wxAUI_BUTTON_STATE_DISABLED) + bmp = m_disabledWindowListBmp; + else + bmp = m_activeWindowListBmp; + break; + } + + + if (!bmp.IsOk()) + return; + + rect = in_rect; + + if (orientation == wxLEFT) + { + rect.SetX(in_rect.x); + rect.SetY(((in_rect.y + in_rect.height)/2) - (bmp.GetHeight()/2)); + rect.SetWidth(bmp.GetWidth()); + rect.SetHeight(bmp.GetHeight()); + } + else + { + rect = wxRect(in_rect.x + in_rect.width - bmp.GetWidth(), + ((in_rect.y + in_rect.height)/2) - (bmp.GetHeight()/2), + bmp.GetWidth(), bmp.GetHeight()); + } + + IndentPressedBitmap(&rect, button_state); + dc.DrawBitmap(bmp, rect.x, rect.y, true); + + *out_rect = rect; +} + +int wxAuiGenericTabArt::ShowDropDown(wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + int /*active_idx*/) +{ + wxMenu menuPopup; + + size_t i, count = pages.GetCount(); + for (i = 0; i < count; ++i) + { + const wxAuiNotebookPage& page = pages.Item(i); + wxString caption = page.caption; + + // if there is no caption, make it a space. This will prevent + // an assert in the menu code. + if (caption.IsEmpty()) + caption = wxT(" "); + + wxMenuItem* item = new wxMenuItem(NULL, 1000+i, caption); + if (page.bitmap.IsOk()) + item->SetBitmap(page.bitmap); + menuPopup.Append(item); + } + + // find out where to put the popup menu of window items + wxPoint pt = ::wxGetMousePosition(); + pt = wnd->ScreenToClient(pt); + + // find out the screen coordinate at the bottom of the tab ctrl + wxRect cli_rect = wnd->GetClientRect(); + pt.y = cli_rect.y + cli_rect.height; + + wxAuiCommandCapture* cc = new wxAuiCommandCapture; + wnd->PushEventHandler(cc); + wnd->PopupMenu(&menuPopup, pt); + int command = cc->GetCommandId(); + wnd->PopEventHandler(true); + + if (command >= 1000) + return command-1000; + + return -1; +} + +int wxAuiGenericTabArt::GetBestTabCtrlSize(wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + const wxSize& requiredBmp_size) +{ + wxClientDC dc(wnd); + dc.SetFont(m_measuringFont); + + // sometimes a standard bitmap size needs to be enforced, especially + // if some tabs have bitmaps and others don't. This is important because + // it prevents the tab control from resizing when tabs are added. + wxBitmap measureBmp; + if (requiredBmp_size.IsFullySpecified()) + { + measureBmp.Create(requiredBmp_size.x, + requiredBmp_size.y); + } + + + int max_y = 0; + size_t i, page_count = pages.GetCount(); + for (i = 0; i < page_count; ++i) + { + wxAuiNotebookPage& page = pages.Item(i); + + wxBitmap bmp; + if (measureBmp.IsOk()) + bmp = measureBmp; + else + bmp = page.bitmap; + + // we don't use the caption text because we don't + // want tab heights to be different in the case + // of a very short piece of text on one tab and a very + // tall piece of text on another tab + int x_ext = 0; + wxSize s = GetTabSize(dc, + wnd, + wxT("ABCDEFGHIj"), + bmp, + true, + wxAUI_BUTTON_STATE_HIDDEN, + &x_ext); + + max_y = wxMax(max_y, s.y); + } + + return max_y+2; +} + +void wxAuiGenericTabArt::SetNormalFont(const wxFont& font) +{ + m_normalFont = font; +} + +void wxAuiGenericTabArt::SetSelectedFont(const wxFont& font) +{ + m_selectedFont = font; +} + +void wxAuiGenericTabArt::SetMeasuringFont(const wxFont& font) +{ + m_measuringFont = font; +} + +void wxAuiGenericTabArt::SetColour(const wxColour& colour) +{ + m_baseColour = colour; + m_borderPen = wxPen(m_baseColour.ChangeLightness(75)); + m_baseColourPen = wxPen(m_baseColour); + m_baseColourBrush = wxBrush(m_baseColour); +} + +void wxAuiGenericTabArt::SetActiveColour(const wxColour& colour) +{ + m_activeColour = colour; +} + +// -- wxAuiSimpleTabArt class implementation -- + +wxAuiSimpleTabArt::wxAuiSimpleTabArt() +{ + m_normalFont = *wxNORMAL_FONT; + m_selectedFont = *wxNORMAL_FONT; + m_selectedFont.SetWeight(wxBOLD); + m_measuringFont = m_selectedFont; + + m_flags = 0; + m_fixedTabWidth = 100; + + wxColour baseColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE); + + wxColour backgroundColour = baseColour; + wxColour normaltabColour = baseColour; + wxColour selectedtabColour = *wxWHITE; + + m_bkBrush = wxBrush(backgroundColour); + m_normalBkBrush = wxBrush(normaltabColour); + m_normalBkPen = wxPen(normaltabColour); + m_selectedBkBrush = wxBrush(selectedtabColour); + m_selectedBkPen = wxPen(selectedtabColour); + + m_activeCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, *wxBLACK); + m_disabledCloseBmp = wxAuiBitmapFromBits(close_bits, 16, 16, wxColour(128,128,128)); + + m_activeLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, *wxBLACK); + m_disabledLeftBmp = wxAuiBitmapFromBits(left_bits, 16, 16, wxColour(128,128,128)); + + m_activeRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, *wxBLACK); + m_disabledRightBmp = wxAuiBitmapFromBits(right_bits, 16, 16, wxColour(128,128,128)); + + m_activeWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, *wxBLACK); + m_disabledWindowListBmp = wxAuiBitmapFromBits(list_bits, 16, 16, wxColour(128,128,128)); + +} + +wxAuiSimpleTabArt::~wxAuiSimpleTabArt() +{ +} + +wxAuiTabArt* wxAuiSimpleTabArt::Clone() +{ + return new wxAuiSimpleTabArt(*this); +} + +void wxAuiSimpleTabArt::SetFlags(unsigned int flags) +{ + m_flags = flags; +} + +void wxAuiSimpleTabArt::SetSizingInfo(const wxSize& tab_ctrl_size, + size_t tab_count) +{ + m_fixedTabWidth = 100; + + int tot_width = (int)tab_ctrl_size.x - GetIndentSize() - 4; + + if (m_flags & wxAUI_NB_CLOSE_BUTTON) + tot_width -= m_activeCloseBmp.GetWidth(); + if (m_flags & wxAUI_NB_WINDOWLIST_BUTTON) + tot_width -= m_activeWindowListBmp.GetWidth(); + + if (tab_count > 0) + { + m_fixedTabWidth = tot_width/(int)tab_count; + } + + + if (m_fixedTabWidth < 100) + m_fixedTabWidth = 100; + + if (m_fixedTabWidth > tot_width/2) + m_fixedTabWidth = tot_width/2; + + if (m_fixedTabWidth > 220) + m_fixedTabWidth = 220; +} + +void wxAuiSimpleTabArt::SetColour(const wxColour& colour) +{ + m_bkBrush = wxBrush(colour); + m_normalBkBrush = wxBrush(colour); + m_normalBkPen = wxPen(colour); +} + +void wxAuiSimpleTabArt::SetActiveColour(const wxColour& colour) +{ + m_selectedBkBrush = wxBrush(colour); + m_selectedBkPen = wxPen(colour); +} + +void wxAuiSimpleTabArt::DrawBorder(wxDC& dc, wxWindow* wnd, const wxRect& rect) +{ + int i, border_width = GetBorderWidth(wnd); + + wxRect theRect(rect); + for (i = 0; i < border_width; ++i) + { + dc.DrawRectangle(theRect.x, theRect.y, theRect.width, theRect.height); + theRect.Deflate(1); + } +} + +void wxAuiSimpleTabArt::DrawBackground(wxDC& dc, + wxWindow* WXUNUSED(wnd), + const wxRect& rect) +{ + // draw background + dc.SetBrush(m_bkBrush); + dc.SetPen(*wxTRANSPARENT_PEN); + dc.DrawRectangle(-1, -1, rect.GetWidth()+2, rect.GetHeight()+2); + + // draw base line + dc.SetPen(*wxGREY_PEN); + dc.DrawLine(0, rect.GetHeight()-1, rect.GetWidth(), rect.GetHeight()-1); +} + + +// DrawTab() draws an individual tab. +// +// dc - output dc +// in_rect - rectangle the tab should be confined to +// caption - tab's caption +// active - whether or not the tab is active +// out_rect - actual output rectangle +// x_extent - the advance x; where the next tab should start + +void wxAuiSimpleTabArt::DrawTab(wxDC& dc, + wxWindow* wnd, + const wxAuiNotebookPage& page, + const wxRect& in_rect, + int close_button_state, + wxRect* out_tab_rect, + wxRect* out_button_rect, + int* x_extent) +{ + wxCoord normal_textx, normal_texty; + wxCoord selected_textx, selected_texty; + wxCoord textx, texty; + + // if the caption is empty, measure some temporary text + wxString caption = page.caption; + if (caption.empty()) + caption = wxT("Xj"); + + dc.SetFont(m_selectedFont); + dc.GetTextExtent(caption, &selected_textx, &selected_texty); + + dc.SetFont(m_normalFont); + dc.GetTextExtent(caption, &normal_textx, &normal_texty); + + // figure out the size of the tab + wxSize tab_size = GetTabSize(dc, + wnd, + page.caption, + page.bitmap, + page.active, + close_button_state, + x_extent); + + wxCoord tab_height = tab_size.y; + wxCoord tab_width = tab_size.x; + wxCoord tab_x = in_rect.x; + wxCoord tab_y = in_rect.y + in_rect.height - tab_height; + + caption = page.caption; + + // select pen, brush and font for the tab to be drawn + + if (page.active) + { + dc.SetPen(m_selectedBkPen); + dc.SetBrush(m_selectedBkBrush); + dc.SetFont(m_selectedFont); + textx = selected_textx; + texty = selected_texty; + } + else + { + dc.SetPen(m_normalBkPen); + dc.SetBrush(m_normalBkBrush); + dc.SetFont(m_normalFont); + textx = normal_textx; + texty = normal_texty; + } + + + // -- draw line -- + + wxPoint points[7]; + points[0].x = tab_x; + points[0].y = tab_y + tab_height - 1; + points[1].x = tab_x + tab_height - 3; + points[1].y = tab_y + 2; + points[2].x = tab_x + tab_height + 3; + points[2].y = tab_y; + points[3].x = tab_x + tab_width - 2; + points[3].y = tab_y; + points[4].x = tab_x + tab_width; + points[4].y = tab_y + 2; + points[5].x = tab_x + tab_width; + points[5].y = tab_y + tab_height - 1; + points[6] = points[0]; + + dc.SetClippingRegion(in_rect); + + dc.DrawPolygon(WXSIZEOF(points) - 1, points); + + dc.SetPen(*wxGREY_PEN); + + //dc.DrawLines(active ? WXSIZEOF(points) - 1 : WXSIZEOF(points), points); + dc.DrawLines(WXSIZEOF(points), points); + + + int text_offset; + + int close_button_width = 0; + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + { + close_button_width = m_activeCloseBmp.GetWidth(); + text_offset = tab_x + (tab_height/2) + ((tab_width-close_button_width)/2) - (textx/2); + } + else + { + text_offset = tab_x + (tab_height/3) + (tab_width/2) - (textx/2); + } + + // set minimum text offset + if (text_offset < tab_x + tab_height) + text_offset = tab_x + tab_height; + + // chop text if necessary + wxString draw_text = wxAuiChopText(dc, + caption, + tab_width - (text_offset-tab_x) - close_button_width); + + // draw tab text + dc.DrawText(draw_text, + text_offset, + (tab_y + tab_height)/2 - (texty/2) + 1); + + + // draw focus rectangle + if (page.active && (wnd->FindFocus() == wnd)) + { + wxRect focusRect(text_offset, ((tab_y + tab_height)/2 - (texty/2) + 1), + selected_textx, selected_texty); + + focusRect.Inflate(2, 2); + + wxRendererNative::Get().DrawFocusRect(wnd, dc, focusRect, 0); + } + + // draw close button if necessary + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + { + wxBitmap bmp; + if (page.active) + bmp = m_activeCloseBmp; + else + bmp = m_disabledCloseBmp; + + wxRect rect(tab_x + tab_width - close_button_width - 1, + tab_y + (tab_height/2) - (bmp.GetHeight()/2) + 1, + close_button_width, + tab_height - 1); + DrawButtons(dc, rect, bmp, *wxWHITE, close_button_state); + + *out_button_rect = rect; + } + + + *out_tab_rect = wxRect(tab_x, tab_y, tab_width, tab_height); + + dc.DestroyClippingRegion(); +} + +int wxAuiSimpleTabArt::GetIndentSize() +{ + return 0; +} + +int wxAuiSimpleTabArt::GetBorderWidth(wxWindow* wnd) +{ + wxAuiManager* mgr = wxAuiManager::GetManager(wnd); + if (mgr) + { + wxAuiDockArt* art = mgr->GetArtProvider(); + if (art) + return art->GetMetric(wxAUI_DOCKART_PANE_BORDER_SIZE); + } + return 1; +} + +int wxAuiSimpleTabArt::GetAdditionalBorderSpace(wxWindow* WXUNUSED(wnd)) +{ + return 0; +} + +wxSize wxAuiSimpleTabArt::GetTabSize(wxDC& dc, + wxWindow* WXUNUSED(wnd), + const wxString& caption, + const wxBitmap& WXUNUSED(bitmap), + bool WXUNUSED(active), + int close_button_state, + int* x_extent) +{ + wxCoord measured_textx, measured_texty; + + dc.SetFont(m_measuringFont); + dc.GetTextExtent(caption, &measured_textx, &measured_texty); + + wxCoord tab_height = measured_texty + 4; + wxCoord tab_width = measured_textx + tab_height + 5; + + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + tab_width += m_activeCloseBmp.GetWidth(); + + if (m_flags & wxAUI_NB_TAB_FIXED_WIDTH) + { + tab_width = m_fixedTabWidth; + } + + *x_extent = tab_width - (tab_height/2) - 1; + + return wxSize(tab_width, tab_height); +} + + +void wxAuiSimpleTabArt::DrawButton(wxDC& dc, + wxWindow* WXUNUSED(wnd), + const wxRect& in_rect, + int bitmap_id, + int button_state, + int orientation, + wxRect* out_rect) +{ + wxBitmap bmp; + wxRect rect; + + switch (bitmap_id) + { + case wxAUI_BUTTON_CLOSE: + if (button_state & wxAUI_BUTTON_STATE_DISABLED) + bmp = m_disabledCloseBmp; + else + bmp = m_activeCloseBmp; + break; + case wxAUI_BUTTON_LEFT: + if (button_state & wxAUI_BUTTON_STATE_DISABLED) + bmp = m_disabledLeftBmp; + else + bmp = m_activeLeftBmp; + break; + case wxAUI_BUTTON_RIGHT: + if (button_state & wxAUI_BUTTON_STATE_DISABLED) + bmp = m_disabledRightBmp; + else + bmp = m_activeRightBmp; + break; + case wxAUI_BUTTON_WINDOWLIST: + if (button_state & wxAUI_BUTTON_STATE_DISABLED) + bmp = m_disabledWindowListBmp; + else + bmp = m_activeWindowListBmp; + break; + } + + if (!bmp.IsOk()) + return; + + rect = in_rect; + + if (orientation == wxLEFT) + { + rect.SetX(in_rect.x); + rect.SetY(((in_rect.y + in_rect.height)/2) - (bmp.GetHeight()/2)); + rect.SetWidth(bmp.GetWidth()); + rect.SetHeight(bmp.GetHeight()); + } + else + { + rect = wxRect(in_rect.x + in_rect.width - bmp.GetWidth(), + ((in_rect.y + in_rect.height)/2) - (bmp.GetHeight()/2), + bmp.GetWidth(), bmp.GetHeight()); + } + + + DrawButtons(dc, rect, bmp, *wxWHITE, button_state); + + *out_rect = rect; +} + +int wxAuiSimpleTabArt::ShowDropDown(wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + int active_idx) +{ + wxMenu menuPopup; + + size_t i, count = pages.GetCount(); + for (i = 0; i < count; ++i) + { + const wxAuiNotebookPage& page = pages.Item(i); + menuPopup.AppendCheckItem(1000+i, page.caption); + } + + if (active_idx != -1) + { + menuPopup.Check(1000+active_idx, true); + } + + // find out where to put the popup menu of window + // items. Subtract 100 for now to center the menu + // a bit, until a better mechanism can be implemented + wxPoint pt = ::wxGetMousePosition(); + pt = wnd->ScreenToClient(pt); + if (pt.x < 100) + pt.x = 0; + else + pt.x -= 100; + + // find out the screen coordinate at the bottom of the tab ctrl + wxRect cli_rect = wnd->GetClientRect(); + pt.y = cli_rect.y + cli_rect.height; + + wxAuiCommandCapture* cc = new wxAuiCommandCapture; + wnd->PushEventHandler(cc); + wnd->PopupMenu(&menuPopup, pt); + int command = cc->GetCommandId(); + wnd->PopEventHandler(true); + + if (command >= 1000) + return command-1000; + + return -1; +} + +int wxAuiSimpleTabArt::GetBestTabCtrlSize(wxWindow* wnd, + const wxAuiNotebookPageArray& WXUNUSED(pages), + const wxSize& WXUNUSED(requiredBmp_size)) +{ + wxClientDC dc(wnd); + dc.SetFont(m_measuringFont); + int x_ext = 0; + wxSize s = GetTabSize(dc, + wnd, + wxT("ABCDEFGHIj"), + wxNullBitmap, + true, + wxAUI_BUTTON_STATE_HIDDEN, + &x_ext); + return s.y+3; +} + +void wxAuiSimpleTabArt::SetNormalFont(const wxFont& font) +{ + m_normalFont = font; +} + +void wxAuiSimpleTabArt::SetSelectedFont(const wxFont& font) +{ + m_selectedFont = font; +} + +void wxAuiSimpleTabArt::SetMeasuringFont(const wxFont& font) +{ + m_measuringFont = font; +} + +#endif // wxUSE_AUI diff --git a/Externals/wxWidgets3/src/aui/tabartgtk.cpp b/Externals/wxWidgets3/src/aui/tabartgtk.cpp new file mode 100644 index 0000000000..1c86fbe9d0 --- /dev/null +++ b/Externals/wxWidgets3/src/aui/tabartgtk.cpp @@ -0,0 +1,512 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/aui/tabartgtk.cpp +// Purpose: implementation of the wxAuiGTKTabArt +// Author: Jens Lody and Teodor Petrov +// Modified by: +// Created: 2012-03-23 +// Copyright: (c) 2012 Jens Lody +// and Teodor Petrov +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_AUI + +#ifndef WX_PRECOMP + #include "wx/dc.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/image.h" +#endif + +#include "wx/gtk/dc.h" +#include "wx/gtk/private.h" + +#include + +#include "wx/aui/auibook.h" +#include "wx/aui/tabartgtk.h" +#include "wx/renderer.h" + +namespace +{ + +static int s_CloseIconSize = 16; // default size + +} + +wxAuiGtkTabArt::wxAuiGtkTabArt() + +{ +} + +wxAuiTabArt* wxAuiGtkTabArt::Clone() +{ + wxAuiGtkTabArt* clone = new wxAuiGtkTabArt(); + + clone->SetNormalFont(m_normalFont); + clone->SetSelectedFont(m_normalFont); + clone->SetMeasuringFont(m_normalFont); + + return clone; +} + +void wxAuiGtkTabArt::DrawBackground(wxDC& dc, wxWindow* WXUNUSED(wnd), const wxRect& rect) +{ + wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); + GdkWindow* window = impldc->GetGDKWindow(); + + gtk_style_apply_default_background(gtk_widget_get_style(wxGTKPrivate::GetNotebookWidget()), + window, + true, + GTK_STATE_NORMAL, + NULL, + rect.x, rect.y, rect.width, rect.height); +} + +void wxAuiGtkTabArt::DrawBorder(wxDC& WXUNUSED(dc), wxWindow* wnd, const wxRect& rect) +{ + int generic_border_width = wxAuiGenericTabArt::GetBorderWidth(wnd); + + if (!wnd) return; + if (!wnd->m_wxwindow) return; + if (!gtk_widget_is_drawable(wnd->m_wxwindow)) return; + + GtkStyle *style_notebook = gtk_widget_get_style(wxGTKPrivate::GetNotebookWidget()); + + gtk_paint_box(style_notebook, wnd->GTKGetDrawingWindow(), GTK_STATE_NORMAL, GTK_SHADOW_OUT, + NULL, wnd->m_wxwindow, + const_cast("notebook"), + rect.x + generic_border_width + 1, rect.y + generic_border_width + 1, + rect.width - (generic_border_width + 1), rect.height - (generic_border_width + 1)); +} + +void ButtonStateAndShadow(int button_state, GtkStateType &state, GtkShadowType &shadow) +{ + + if (button_state & wxAUI_BUTTON_STATE_DISABLED) + { + state = GTK_STATE_INSENSITIVE; + shadow = GTK_SHADOW_ETCHED_IN; + } + else if (button_state & wxAUI_BUTTON_STATE_HOVER) + { + state = GTK_STATE_PRELIGHT; + shadow = GTK_SHADOW_OUT; + } + else if (button_state & wxAUI_BUTTON_STATE_PRESSED) + { + state = GTK_STATE_ACTIVE; + shadow = GTK_SHADOW_IN; + } + else + { + state = GTK_STATE_NORMAL; + shadow = GTK_SHADOW_OUT; + } +} + +wxRect DrawCloseButton(wxDC& dc, + GtkWidget *widget, + int button_state, + wxRect const &in_rect, + int orientation, + GdkRectangle* clipRect) +{ + GtkStyle *style_button = gtk_widget_get_style(wxGTKPrivate::GetButtonWidget()); + int xthickness = style_button->xthickness; + int ythickness = style_button->ythickness; + + wxBitmap bmp(gtk_widget_render_icon(widget, GTK_STOCK_CLOSE, GTK_ICON_SIZE_SMALL_TOOLBAR, "tab")); + + if(bmp.GetWidth() != s_CloseIconSize || bmp.GetHeight() != s_CloseIconSize) + { + wxImage img = bmp.ConvertToImage(); + img.Rescale(s_CloseIconSize, s_CloseIconSize); + bmp = img; + } + + int button_size = s_CloseIconSize + 2 * xthickness; + + wxRect out_rect; + + if (orientation == wxLEFT) + out_rect.x = in_rect.x - ythickness; + else + out_rect.x = in_rect.x + in_rect.width - button_size - ythickness; + + out_rect.y = in_rect.y + (in_rect.height - button_size) / 2; + out_rect.width = button_size; + out_rect.height = button_size; + + wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); + GdkWindow* window = impldc->GetGDKWindow(); + + if (button_state == wxAUI_BUTTON_STATE_HOVER) + { + gtk_paint_box(style_button, window, + GTK_STATE_PRELIGHT, GTK_SHADOW_OUT, clipRect, widget, "button", + out_rect.x, out_rect.y, out_rect.width, out_rect.height); + } + else if (button_state == wxAUI_BUTTON_STATE_PRESSED) + { + gtk_paint_box(style_button, window, + GTK_STATE_ACTIVE, GTK_SHADOW_IN, clipRect, widget, "button", + out_rect.x, out_rect.y, out_rect.width, out_rect.height); + } + + + dc.DrawBitmap(bmp, out_rect.x + xthickness, out_rect.y + ythickness, true); + + return out_rect; +} + +void wxAuiGtkTabArt::DrawTab(wxDC& dc, wxWindow* wnd, const wxAuiNotebookPage& page, + const wxRect& in_rect, int close_button_state, wxRect* out_tab_rect, + wxRect* out_button_rect, int* x_extent) +{ + GtkWidget *widget = wnd->GetHandle(); + GtkStyle *style_notebook = gtk_widget_get_style(wxGTKPrivate::GetNotebookWidget()); + + wxRect const &window_rect = wnd->GetRect(); + + int focus_width = 0; + + gtk_widget_style_get(wxGTKPrivate::GetNotebookWidget(), + "focus-line-width", &focus_width, + NULL); + + int tab_pos; + if (m_flags &wxAUI_NB_BOTTOM) + tab_pos = wxAUI_NB_BOTTOM; + else //if (m_flags & wxAUI_NB_TOP) {} + tab_pos = wxAUI_NB_TOP; + + // TODO: else if (m_flags &wxAUI_NB_LEFT) {} + // TODO: else if (m_flags &wxAUI_NB_RIGHT) {} + + // figure out the size of the tab + wxSize tab_size = GetTabSize(dc, wnd, page.caption, page.bitmap, + page.active, close_button_state, x_extent); + + wxRect tab_rect = in_rect; + tab_rect.width = tab_size.x; + tab_rect.height = tab_size.y; + tab_rect.y += 2 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder; + + if (page.active) + tab_rect.height += 2 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder; + + int gap_rect_height = 10 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder; + int gap_rect_x = 1, gap_start = 0, gap_width = 0; + int gap_rect_y = tab_rect.y - gap_rect_height; + int gap_rect_width = window_rect.width; + + switch (tab_pos) + { + case wxAUI_NB_TOP: + tab_rect.y -= 2 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder; + if (!page.active) + tab_rect.y += 2 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder; + gap_rect_y = tab_rect.y + tab_rect.height - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder / 2; + // fall through + case wxAUI_NB_BOTTOM: + gap_start = tab_rect.x - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder / 2; + gap_width = tab_rect.width; + break; + // TODO: case wxAUI_NB_LEFT: break; + // TODO: case wxAUI_NB_RIGHT: break; + } + tab_rect.y += GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder / 2; + gap_rect_y += GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder / 2; + + int padding = focus_width + GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder; + + int clip_width = tab_rect.width; + if (tab_rect.x + tab_rect.width > in_rect.x + in_rect.width) + clip_width = (in_rect.x + in_rect.width) - tab_rect.x; + + dc.SetClippingRegion(tab_rect.x, tab_rect.y - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder, clip_width, tab_rect.height + GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder); + + GdkRectangle area; + area.x = tab_rect.x - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder; + area.y = tab_rect.y - 2 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder; + area.width = clip_width + GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder; + area.height = tab_rect.height + 2 * GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder; + + wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); + GdkWindow* window = impldc->GetGDKWindow(); + + // Before drawing the active tab itself, draw a box without border, because some themes + // have transparent gaps and a line would be visible at the bottom of the tab + if (page.active) + gtk_paint_box(style_notebook, window, GTK_STATE_NORMAL, GTK_SHADOW_NONE, + NULL, widget, + const_cast("notebook"), + gap_rect_x, gap_rect_y, + gap_rect_width, gap_rect_height); + + if (tab_pos == wxAUI_NB_BOTTOM) + { + if (page.active) + { + gtk_paint_box_gap(style_notebook, window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, + NULL, widget, + const_cast("notebook"), + gap_rect_x, gap_rect_y, + gap_rect_width, gap_rect_height, + GTK_POS_BOTTOM, gap_start , gap_width); + } + gtk_paint_extension(style_notebook, window, + page.active ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE, GTK_SHADOW_OUT, + &area, widget, + const_cast("tab"), + tab_rect.x, tab_rect.y, + tab_rect.width, tab_rect.height, + GTK_POS_TOP); + } + else + { + if (page.active) + { + gtk_paint_box_gap(style_notebook, window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, + NULL, widget, + const_cast("notebook"), + gap_rect_x, gap_rect_y, + gap_rect_width, gap_rect_height, + GTK_POS_TOP, gap_start , gap_width); + } + gtk_paint_extension(style_notebook, window, + page.active ? GTK_STATE_NORMAL : GTK_STATE_ACTIVE, GTK_SHADOW_OUT, + &area, widget, + const_cast("tab"), + tab_rect.x, tab_rect.y, + tab_rect.width, tab_rect.height, + GTK_POS_BOTTOM); + } + + // After drawing the inactive tab itself, draw a box with the same dimensions as the gap-box, + // otherwise we don't get a gap-box, if the active tab is invisible + if (!page.active) + gtk_paint_box(style_notebook, window, GTK_STATE_NORMAL, GTK_SHADOW_OUT, + NULL, widget, + const_cast("notebook"), + gap_rect_x, gap_rect_y, + gap_rect_width, gap_rect_height); + + wxCoord textX = tab_rect.x + padding + style_notebook->xthickness; + + int bitmap_offset = 0; + if (page.bitmap.IsOk()) + { + bitmap_offset = textX; + + // draw bitmap + int bitmapY = tab_rect.y +(tab_rect.height - page.bitmap.GetHeight()) / 2; + if(!page.active) + { + if (tab_pos == wxAUI_NB_TOP) + bitmapY += style_notebook->ythickness / 2; + else + bitmapY -= style_notebook->ythickness / 2; + } + dc.DrawBitmap(page.bitmap, + bitmap_offset, + bitmapY, + true); + + textX += page.bitmap.GetWidth() + padding; + } + + wxCoord textW, textH, textY; + + dc.SetFont(m_normalFont); + dc.GetTextExtent(page.caption, &textW, &textH); + textY = tab_rect.y + (tab_rect.height - textH) / 2; + if(!page.active) + { + if (tab_pos == wxAUI_NB_TOP) + textY += style_notebook->ythickness / 2; + else + textY -= style_notebook->ythickness / 2; + } + + // draw tab text + GdkColor text_colour = page.active ? style_notebook->fg[GTK_STATE_NORMAL] : style_notebook->fg[GTK_STATE_ACTIVE]; + dc.SetTextForeground(wxColor(text_colour)); + GdkRectangle focus_area; + + int padding_focus = padding - focus_width; + focus_area.x = tab_rect.x + padding_focus; + focus_area.y = textY - focus_width; + focus_area.width = tab_rect.width - 2 * padding_focus; + focus_area.height = textH + 2 * focus_width; + + if(page.active && (wnd->FindFocus() == wnd) && focus_area.x <= (area.x + area.width)) + { + // clipping seems not to work here, so we we have to recalc the focus-area manually + if((focus_area.x + focus_area.width) > (area.x + area.width)) + focus_area.width = area.x + area.width - focus_area.x + focus_width - GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder; + gtk_paint_focus (style_notebook, window, + GTK_STATE_ACTIVE, NULL, widget, "tab", + focus_area.x, focus_area.y, focus_area.width, focus_area.height); + } + + dc.DrawText(page.caption, textX, textY); + + // draw close-button on tab (if enabled) + if (close_button_state != wxAUI_BUTTON_STATE_HIDDEN) + { + wxRect rect(tab_rect.x, tab_rect.y, tab_rect.width - style_notebook->xthickness, tab_rect.height); + if(!page.active) + { + if (tab_pos == wxAUI_NB_TOP) + rect.y += style_notebook->ythickness / 2; + else + rect.y -= style_notebook->ythickness / 2; + } + *out_button_rect = DrawCloseButton(dc, widget, close_button_state, rect, wxRIGHT, &area); + } + + if ( clip_width < tab_rect.width ) + tab_rect.width = clip_width; + *out_tab_rect = tab_rect; + + dc.DestroyClippingRegion(); +} + +wxRect DrawSimpleArrow(wxDC& dc, + GtkWidget *widget, + int button_state, + wxRect const &in_rect, + int orientation, + GtkArrowType arrow_type) +{ + int scroll_arrow_hlength, scroll_arrow_vlength; + gtk_widget_style_get(widget, + "scroll-arrow-hlength", &scroll_arrow_hlength, + "scroll-arrow-vlength", &scroll_arrow_vlength, + NULL); + + GtkStateType state; + GtkShadowType shadow; + ButtonStateAndShadow(button_state, state, shadow); + + wxRect out_rect; + + if (orientation == wxLEFT) + out_rect.x = in_rect.x; + else + out_rect.x = in_rect.x + in_rect.width - scroll_arrow_hlength; + out_rect.y = (in_rect.y + in_rect.height - 3 * gtk_widget_get_style(wxGTKPrivate::GetNotebookWidget())->ythickness - scroll_arrow_vlength) / 2; + out_rect.width = scroll_arrow_hlength; + out_rect.height = scroll_arrow_vlength; + + wxGTKDCImpl *impldc = (wxGTKDCImpl*) dc.GetImpl(); + GdkWindow* window = impldc->GetGDKWindow(); + gtk_paint_arrow (gtk_widget_get_style(wxGTKPrivate::GetButtonWidget()), window, state, shadow, NULL, widget, "notebook", + arrow_type, TRUE, out_rect.x, out_rect.y, out_rect.width, out_rect.height); + + return out_rect; +} + +void wxAuiGtkTabArt::DrawButton(wxDC& dc, wxWindow* wnd, + const wxRect& in_rect, + int bitmap_id, + int button_state, + int orientation, + wxRect* out_rect) +{ + GtkWidget *widget = wnd->GetHandle(); + wxRect rect = in_rect; + if (m_flags &wxAUI_NB_BOTTOM) + rect.y += 2 * gtk_widget_get_style(wxGTKPrivate::GetButtonWidget())->ythickness; + + switch (bitmap_id) + { + case wxAUI_BUTTON_CLOSE: + rect.y -= 2 * gtk_widget_get_style(wxGTKPrivate::GetButtonWidget())->ythickness; + rect = DrawCloseButton(dc, widget, button_state, rect, orientation, NULL); + break; + + case wxAUI_BUTTON_LEFT: + rect = DrawSimpleArrow(dc, widget, button_state, rect, orientation, GTK_ARROW_LEFT); + break; + + case wxAUI_BUTTON_RIGHT: + rect = DrawSimpleArrow(dc, widget, button_state, rect, orientation, GTK_ARROW_RIGHT); + break; + + case wxAUI_BUTTON_WINDOWLIST: + { + rect.height -= 4 * gtk_widget_get_style(wxGTKPrivate::GetButtonWidget())->ythickness; + rect.width = rect.height; + rect.x = in_rect.x + in_rect.width - rect.width; + + if (button_state == wxAUI_BUTTON_STATE_HOVER) + wxRendererNative::Get().DrawComboBoxDropButton(wnd, dc, rect, wxCONTROL_CURRENT); + else if (button_state == wxAUI_BUTTON_STATE_PRESSED) + wxRendererNative::Get().DrawComboBoxDropButton(wnd, dc, rect, wxCONTROL_PRESSED); + else + wxRendererNative::Get().DrawDropArrow(wnd, dc, rect); + } + break; + } + + *out_rect = rect; +} + + +int wxAuiGtkTabArt::GetBestTabCtrlSize(wxWindow* wnd, + const wxAuiNotebookPageArray& pages, + const wxSize& required_bmp_size) +{ + SetMeasuringFont(m_normalFont); + SetSelectedFont(m_normalFont); + int tab_height = 3 * gtk_widget_get_style(wxGTKPrivate::GetNotebookWidget())->ythickness + wxAuiGenericTabArt::GetBestTabCtrlSize(wnd, pages, required_bmp_size); + return tab_height; +} + +int wxAuiGtkTabArt::GetBorderWidth(wxWindow* wnd) +{ + return wxAuiGenericTabArt::GetBorderWidth(wnd) + wxMax(GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_hborder, + GTK_NOTEBOOK (wxGTKPrivate::GetNotebookWidget())->tab_vborder); +} + +int wxAuiGtkTabArt::GetAdditionalBorderSpace(wxWindow* wnd) +{ + return 2 * GetBorderWidth(wnd); +} + +wxSize wxAuiGtkTabArt::GetTabSize(wxDC& dc, + wxWindow* wnd, + const wxString& caption, + const wxBitmap& bitmap, + bool active, + int close_button_state, + int* x_extent) +{ + wxSize s = wxAuiGenericTabArt::GetTabSize(dc, wnd, caption, bitmap, active, close_button_state, x_extent); + + int overlap = 0; + gtk_widget_style_get (wnd->GetHandle(), + "focus-line-width", &overlap, + NULL); + *x_extent -= overlap; + return s; +} +#endif // wxUSE_AUI diff --git a/Externals/wxWidgets3/src/aui/tabmdi.cpp b/Externals/wxWidgets3/src/aui/tabmdi.cpp index 413bfaf780..70c1a734e8 100644 --- a/Externals/wxWidgets3/src/aui/tabmdi.cpp +++ b/Externals/wxWidgets3/src/aui/tabmdi.cpp @@ -4,7 +4,6 @@ // Author: Hans Van Leemputten // Modified by: Benjamin I. Williams / Kirix Corporation // Created: 29/07/2002 -// RCS-ID: $Id: tabmdi.cpp 70909 2012-03-15 13:49:54Z VZ $ // Copyright: (c) Hans Van Leemputten // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -38,6 +37,7 @@ #endif //WX_PRECOMP #include "wx/stockitem.h" +#include "wx/aui/dockart.h" enum MDI_MENU_ID { @@ -79,6 +79,8 @@ wxAuiMDIParentFrame::wxAuiMDIParentFrame(wxWindow *parent, wxAuiMDIParentFrame::~wxAuiMDIParentFrame() { + // Avoid having GetActiveChild() called after m_pClientWindow is destroyed + SendDestroyEvent(); // Make sure the client window is destructed before the menu bars are! wxDELETE(m_pClientWindow); @@ -211,7 +213,8 @@ bool wxAuiMDIParentFrame::ProcessEvent(wxEvent& event) // let the active child (if any) process the event first. bool res = false; - if (m_pActiveChild && + wxAuiMDIChildFrame* pActiveChild = GetActiveChild(); + if (pActiveChild && event.IsCommandEvent() && event.GetEventObject() != m_pClientWindow && !(event.GetEventType() == wxEVT_ACTIVATE || @@ -222,7 +225,7 @@ bool wxAuiMDIParentFrame::ProcessEvent(wxEvent& event) event.GetEventType() == wxEVT_COMMAND_KILL_FOCUS ) ) { - res = m_pActiveChild->GetEventHandler()->ProcessEvent(event); + res = pActiveChild->GetEventHandler()->ProcessEvent(event); } if (!res) @@ -240,12 +243,19 @@ bool wxAuiMDIParentFrame::ProcessEvent(wxEvent& event) wxAuiMDIChildFrame *wxAuiMDIParentFrame::GetActiveChild() const { - return m_pActiveChild; + // We can be called before the client window is created, so check for its + // existence. + wxAuiMDIClientWindow* const client = GetClientWindow(); + return client ? client->GetActiveChild() : NULL; } void wxAuiMDIParentFrame::SetActiveChild(wxAuiMDIChildFrame* pChildFrame) { - m_pActiveChild = pChildFrame; + wxAuiMDIClientWindow* const client = GetClientWindow(); + if (client && client->GetActiveChild() != pChildFrame) + { + client->SetActiveChild(pChildFrame); + } } wxAuiMDIClientWindow *wxAuiMDIParentFrame::GetClientWindow() const @@ -286,7 +296,6 @@ void wxAuiMDIParentFrame::Init() { m_pLastEvt = NULL; m_pClientWindow = NULL; - m_pActiveChild = NULL; #if wxUSE_MENUS m_pWindowMenu = NULL; m_pMyMenuBar = NULL; @@ -326,18 +335,24 @@ void wxAuiMDIParentFrame::DoHandleMenu(wxCommandEvent& event) switch (event.GetId()) { case wxWINDOWCLOSE: - if (m_pActiveChild) - m_pActiveChild->Close(); + { + wxAuiMDIChildFrame* pActiveChild = GetActiveChild(); + if (pActiveChild) + pActiveChild->Close(); break; + } case wxWINDOWCLOSEALL: - while (m_pActiveChild) + { + wxAuiMDIChildFrame* pActiveChild; + while ((pActiveChild = GetActiveChild()) != NULL) { - if (!m_pActiveChild->Close()) + if (!pActiveChild->Close()) { return; // failure } } break; + } case wxWINDOWNEXT: ActivateNext(); break; @@ -496,12 +511,21 @@ bool wxAuiMDIChildFrame::Create(wxAuiMDIParentFrame* parent, SetMDIParentFrame(parent); - // this is the currently active child - parent->SetActiveChild(this); - m_title = title; pClientWindow->AddPage(this, title, m_activateOnCreate); + + // Check that the parent notion of the active child coincides with our one. + // This is less obvious that it seems because we must honour + // m_activateOnCreate flag but only if it's not the first child because + // this one becomes active unconditionally. + wxASSERT_MSG + ( + (m_activateOnCreate || pClientWindow->GetPageCount() == 1) + == (parent->GetActiveChild() == this), + wxS("Logic error: child [not] activated when it should [not] have been.") + ); + pClientWindow->Refresh(); return true; @@ -522,7 +546,6 @@ bool wxAuiMDIChildFrame::Destroy() event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); - pParentFrame->SetActiveChild(NULL); pParentFrame->SetChildMenuBar(NULL); } @@ -697,6 +720,14 @@ void wxAuiMDIChildFrame::Init() bool wxAuiMDIChildFrame::Show(bool show) { + // wxAuiMDIChildFrame uses m_activateOnCreate only to decide whether to + // activate the frame when it is created. After Create() is called, + // m_activateOnCreate will never be read again. Therefore, calling this + // function after Create() is pointless and you probably want to call + // Activate() instead. + wxCHECK_MSG( !GetHandle(), false, + wxS("Show() has no effect after Create(). Do you mean Activate()?") ); + m_activateOnCreate = show; // do nothing @@ -786,6 +817,15 @@ int wxAuiMDIClientWindow::SetSelection(size_t nPage) return wxAuiNotebook::SetSelection(nPage); } +wxAuiMDIChildFrame* wxAuiMDIClientWindow::GetActiveChild() +{ + const int sel = GetSelection(); + if ( sel == wxNOT_FOUND ) + return NULL; + + return wxStaticCast(GetPage(sel), wxAuiMDIChildFrame); +} + void wxAuiMDIClientWindow::PageChanged(int old_selection, int new_selection) { // don't do anything if the page doesn't actually change diff --git a/Externals/wxWidgets3/src/common/accelcmn.cpp b/Externals/wxWidgets3/src/common/accelcmn.cpp index 960c6ac7c3..003ecbc514 100644 --- a/Externals/wxWidgets3/src/common/accelcmn.cpp +++ b/Externals/wxWidgets3/src/common/accelcmn.cpp @@ -3,7 +3,6 @@ // Purpose: implementation of platform-independent wxAcceleratorEntry parts // Author: Vadim Zeitlin // Created: 2007-05-05 -// RCS-ID: $Id: accelcmn.cpp 69853 2011-11-28 10:24:13Z SC $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -302,30 +301,43 @@ bool wxAcceleratorEntry::FromString(const wxString& str) return ParseAccel(str, &m_flags, &m_keyCode); } -wxString wxAcceleratorEntry::ToString() const +namespace +{ + +wxString PossiblyLocalize(const wxString& str, bool localize) +{ + return localize ? wxGetTranslation(str) : str; +} + +} + +wxString wxAcceleratorEntry::AsPossiblyLocalizedString(bool localized) const { wxString text; int flags = GetFlags(); if ( flags & wxACCEL_ALT ) - text += _("Alt+"); + text += PossiblyLocalize(wxTRANSLATE("Alt+"), localized); if ( flags & wxACCEL_CTRL ) - text += _("Ctrl+"); + text += PossiblyLocalize(wxTRANSLATE("Ctrl+"), localized); if ( flags & wxACCEL_SHIFT ) - text += _("Shift+"); + text += PossiblyLocalize(wxTRANSLATE("Shift+"), localized); #if defined(__WXMAC__) || defined(__WXCOCOA__) if ( flags & wxACCEL_RAW_CTRL ) - text += _("RawCtrl+"); + text += PossiblyLocalize(wxTRANSLATE("RawCtrl+"), localized); #endif const int code = GetKeyCode(); if ( code >= WXK_F1 && code <= WXK_F12 ) - text << _("F") << code - WXK_F1 + 1; + text << PossiblyLocalize(wxTRANSLATE("F"), localized) + << code - WXK_F1 + 1; else if ( code >= WXK_NUMPAD0 && code <= WXK_NUMPAD9 ) - text << _("KP_") << code - WXK_NUMPAD0; + text << PossiblyLocalize(wxTRANSLATE("KP_"), localized) + << code - WXK_NUMPAD0; else if ( code >= WXK_SPECIAL1 && code <= WXK_SPECIAL20 ) - text << _("SPECIAL") << code - WXK_SPECIAL1 + 1; + text << PossiblyLocalize(wxTRANSLATE("SPECIAL"), localized) + << code - WXK_SPECIAL1 + 1; else // check the named keys { size_t n; @@ -334,7 +346,7 @@ wxString wxAcceleratorEntry::ToString() const const wxKeyName& kn = wxKeyNames[n]; if ( code == kn.code ) { - text << wxGetTranslation(kn.name); + text << PossiblyLocalize(kn.name, localized); break; } } diff --git a/Externals/wxWidgets3/src/common/accesscmn.cpp b/Externals/wxWidgets3/src/common/accesscmn.cpp index 385a33936a..660f1090df 100644 --- a/Externals/wxWidgets3/src/common/accesscmn.cpp +++ b/Externals/wxWidgets3/src/common/accesscmn.cpp @@ -3,7 +3,6 @@ // Author: Julian Smart // Modified by: // Created: 2003-02-12 -// RCS-ID: $Id: accesscmn.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/affinematrix2d.cpp b/Externals/wxWidgets3/src/common/affinematrix2d.cpp index 0b1b9207dc..5013b31f15 100644 --- a/Externals/wxWidgets3/src/common/affinematrix2d.cpp +++ b/Externals/wxWidgets3/src/common/affinematrix2d.cpp @@ -127,19 +127,19 @@ void wxAffineMatrix2D::Scale(wxDouble xScale, wxDouble yScale) m_22 *= yScale; } -// add the rotation to this matrix (counter clockwise, radians) -// | cos -sin 0 | | m_11 m_12 0 | -// | sin cos 0 | x | m_21 m_22 0 | +// add the rotation to this matrix (clockwise, radians) +// | cos sin 0 | | m_11 m_12 0 | +// | -sin cos 0 | x | m_21 m_22 0 | // | 0 0 1 | | m_tx m_ty 1 | -void wxAffineMatrix2D::Rotate(wxDouble ccRadians) +void wxAffineMatrix2D::Rotate(wxDouble cRadians) { - wxDouble c = cos(ccRadians); - wxDouble s = sin(ccRadians); + wxDouble c = cos(cRadians); + wxDouble s = sin(cRadians); - wxDouble e11 = c*m_11 - s*m_21; - wxDouble e12 = c*m_12 - s*m_22; - m_21 = s*m_11 + c*m_21; - m_22 = s*m_12 + c*m_22; + wxDouble e11 = c*m_11 + s*m_21; + wxDouble e12 = c*m_12 + s*m_22; + m_21 = c*m_21 - s*m_11; + m_22 = c*m_22 - s*m_12; m_11 = e11; m_12 = e12; } @@ -159,7 +159,7 @@ wxAffineMatrix2D::DoTransformPoint(const wxPoint2DDouble& src) const return src; return wxPoint2DDouble(src.m_x * m_11 + src.m_y * m_21 + m_tx, - src.m_y * m_12 + src.m_y * m_22 + m_ty); + src.m_x * m_12 + src.m_y * m_22 + m_ty); } // applies the matrix except for translations @@ -173,7 +173,7 @@ wxAffineMatrix2D::DoTransformDistance(const wxPoint2DDouble& src) const return src; return wxPoint2DDouble(src.m_x * m_11 + src.m_y * m_21, - src.m_y * m_12 + src.m_y * m_22); + src.m_x * m_12 + src.m_y * m_22); } bool wxAffineMatrix2D::IsIdentity() const diff --git a/Externals/wxWidgets3/src/common/anidecod.cpp b/Externals/wxWidgets3/src/common/anidecod.cpp index 841d4d7483..d62c00b455 100644 --- a/Externals/wxWidgets3/src/common/anidecod.cpp +++ b/Externals/wxWidgets3/src/common/anidecod.cpp @@ -2,7 +2,6 @@ // Name: src/common/anidecod.cpp // Purpose: wxANIDecoder, ANI reader for wxImage and wxAnimation // Author: Francesco Montorsi -// RCS-ID: $Id: anidecod.cpp 67708 2011-05-05 23:52:07Z DS $ // Copyright: (c) Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/animatecmn.cpp b/Externals/wxWidgets3/src/common/animatecmn.cpp index 29e9915de3..c8fb083300 100644 --- a/Externals/wxWidgets3/src/common/animatecmn.cpp +++ b/Externals/wxWidgets3/src/common/animatecmn.cpp @@ -4,7 +4,6 @@ // Author: Francesco Montorsi // Modified By: // Created: 24/09/2006 -// Id: $Id: animatecmn.cpp 60864 2009-06-01 20:54:03Z VZ $ // Copyright: (c) Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/any.cpp b/Externals/wxWidgets3/src/common/any.cpp index f391a5f98a..f866c59448 100644 --- a/Externals/wxWidgets3/src/common/any.cpp +++ b/Externals/wxWidgets3/src/common/any.cpp @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: 07/05/2009 -// RCS-ID: $Id: any.cpp 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -374,7 +373,7 @@ bool wxAnyConvertString(const wxString& value, else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, double) ) { double value2; - if ( !value.ToDouble(&value2) ) + if ( !value.ToCDouble(&value2) ) return false; wxAnyValueTypeImplDouble::SetValue(value2, dst); } @@ -453,7 +452,7 @@ bool wxAnyValueTypeImplDouble::ConvertValue(const wxAnyValueBuffer& src, } else if ( wxANY_VALUE_TYPE_CHECK_TYPE(dstType, wxString) ) { - wxString s = wxString::Format(wxS("%.14g"), value); + wxString s = wxString::FromCDouble(value, 14); wxAnyValueTypeImpl::SetValue(s, dst); } else @@ -484,7 +483,9 @@ WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) class wxAnyNullValue { -private: +protected: + // this field is unused, but can't be private to avoid Clang's + // "Private field 'm_dummy' is not used" warning void* m_dummy; }; diff --git a/Externals/wxWidgets3/src/common/appbase.cpp b/Externals/wxWidgets3/src/common/appbase.cpp index 8cdf4e26fe..da6f2948ef 100644 --- a/Externals/wxWidgets3/src/common/appbase.cpp +++ b/Externals/wxWidgets3/src/common/appbase.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.06.2003 (extracted from common/appcmn.cpp) -// RCS-ID: $Id: appbase.cpp 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -47,10 +46,15 @@ #include "wx/tokenzr.h" #include "wx/thread.h" -#if wxUSE_EXCEPTIONS && wxUSE_STL - #include - #include -#endif +#if wxUSE_STL + #if wxUSE_EXCEPTIONS + #include + #include + #endif + #if wxUSE_INTL + #include + #endif +#endif // wxUSE_STL #if !defined(__WINDOWS__) || defined(__WXMICROWIN__) #include // for SIGTRAP used by wxTrap() @@ -169,10 +173,6 @@ wxAppConsoleBase::~wxAppConsoleBase() bool wxAppConsoleBase::Initialize(int& WXUNUSED(argc), wxChar **WXUNUSED(argv)) { -#if wxUSE_INTL - GetTraits()->SetLocale(); -#endif // wxUSE_INTL - return true; } @@ -255,6 +255,10 @@ int wxAppConsoleBase::OnRun() return MainLoop(); } +void wxAppConsoleBase::OnLaunched() +{ +} + int wxAppConsoleBase::OnExit() { #if wxUSE_CONFIG @@ -303,6 +307,15 @@ wxAppTraits *wxAppConsoleBase::GetTraitsIfExists() return app ? app->GetTraits() : NULL; } +/* static */ +wxAppTraits& wxAppConsoleBase::GetValidTraits() +{ + static wxConsoleAppTraits s_traitsConsole; + wxAppTraits* const traits = wxTheApp ? wxTheApp->GetTraits() : NULL; + + return traits ? *traits : s_traitsConsole; +} + // ---------------------------------------------------------------------------- // wxEventLoop redirection // ---------------------------------------------------------------------------- @@ -311,6 +324,9 @@ int wxAppConsoleBase::MainLoop() { wxEventLoopBaseTiedPtr mainLoop(&m_mainLoop, CreateMainLoop()); + if (wxTheApp) + wxTheApp->OnLaunched(); + return m_mainLoop ? m_mainLoop->Run() : -1; } @@ -779,6 +795,18 @@ void wxAppConsoleBase::OnAssert(const wxChar *file, OnAssertFailure(file, line, NULL, cond, msg); } +// ---------------------------------------------------------------------------- +// Miscellaneous other methods +// ---------------------------------------------------------------------------- + +void wxAppConsoleBase::SetCLocale() +{ + // We want to use the user locale by default in GUI applications in order + // to show the numbers, dates &c in the familiar format -- and also accept + // this format on input (especially important for decimal comma/dot). + wxSetlocale(LC_ALL, ""); +} + // ============================================================================ // other classes implementations // ============================================================================ @@ -831,14 +859,6 @@ bool wxConsoleAppTraitsBase::HasStderr() // wxAppTraits // ---------------------------------------------------------------------------- -#if wxUSE_INTL -void wxAppTraitsBase::SetLocale() -{ - wxSetlocale(LC_ALL, ""); - wxUpdateLocaleIsUtf8(); -} -#endif - #if wxUSE_THREADS void wxMutexGuiEnterImpl(); void wxMutexGuiLeaveImpl(); @@ -953,7 +973,7 @@ wxString wxAppTraitsBase::GetAssertStackTrace() static const int maxLines = 20; StackDump dump; - dump.Walk(2, maxLines); // don't show OnAssert() call itself + dump.Walk(8, maxLines); // 8 is chosen to hide all OnAssert() calls stackTrace = dump.GetStackTrace(); const int count = stackTrace.Freq(wxT('\n')); @@ -1014,6 +1034,8 @@ void wxAbort() #if wxDEBUG_LEVEL // break into the debugger +#ifndef wxTrap + void wxTrap() { #if defined(__WINDOWS__) && !defined(__WXMICROWIN__) @@ -1027,6 +1049,8 @@ void wxTrap() #endif // Win/Unix } +#endif // wxTrap already defined as a macro + // default assert handler static void wxDefaultAssertHandler(const wxString& file, @@ -1176,6 +1200,8 @@ static void LINKAGEMODE SetTraceMasks() #if wxDEBUG_LEVEL +bool wxTrapInAssert = false; + static bool DoShowAssertDialog(const wxString& msg) { @@ -1190,11 +1216,18 @@ bool DoShowAssertDialog(const wxString& msg) wxT("You can also choose [Cancel] to suppress ") wxT("further warnings."); - switch ( ::MessageBox(NULL, msgDlg.wx_str(), wxT("wxWidgets Debug Alert"), + switch ( ::MessageBox(NULL, msgDlg.t_str(), wxT("wxWidgets Debug Alert"), MB_YESNOCANCEL | MB_ICONSTOP ) ) { case IDYES: - wxTrap(); + // If we called wxTrap() directly from here, the programmer would + // see this function and a few more calls between his own code and + // it in the stack trace which would be perfectly useless and often + // confusing. So instead just set the flag here and let the macros + // defined in wx/debug.h call wxTrap() themselves, this ensures + // that the debugger will show the line in the user code containing + // the failing assert. + wxTrapInAssert = true; break; case IDCANCEL: diff --git a/Externals/wxWidgets3/src/common/appcmn.cpp b/Externals/wxWidgets3/src/common/appcmn.cpp index 6c7129139a..821f695bac 100644 --- a/Externals/wxWidgets3/src/common/appcmn.cpp +++ b/Externals/wxWidgets3/src/common/appcmn.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 18.10.99 -// RCS-ID: $Id: appcmn.cpp 70353 2012-01-15 14:46:41Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -84,6 +83,27 @@ wxAppBase::wxAppBase() bool wxAppBase::Initialize(int& argcOrig, wxChar **argvOrig) { +#ifdef __WXOSX__ + // Mac OS X passes a process serial number command line argument when + // the application is launched from the Finder. This argument must be + // removed from the command line arguments before being handled by the + // application (otherwise applications would need to handle it) + // + // Notice that this has to be done for all ports that can be used under OS + // X (e.g. wxGTK) and not just wxOSX itself, hence this code is here and + // not in a port-specific file. + if ( argcOrig > 1 ) + { + static const wxChar *ARG_PSN = wxT("-psn_"); + if ( wxStrncmp(argvOrig[1], ARG_PSN, wxStrlen(ARG_PSN)) == 0 ) + { + // remove this argument + --argcOrig; + memmove(argvOrig + 1, argvOrig + 2, argcOrig * sizeof(wxChar*)); + } + } +#endif // __WXOSX__ + if ( !wxAppConsole::Initialize(argcOrig, argvOrig) ) return false; diff --git a/Externals/wxWidgets3/src/common/arcall.cpp b/Externals/wxWidgets3/src/common/arcall.cpp index bedf19becd..49776dcce5 100644 --- a/Externals/wxWidgets3/src/common/arcall.cpp +++ b/Externals/wxWidgets3/src/common/arcall.cpp @@ -2,7 +2,6 @@ // Name: src/common/arcall.cpp // Purpose: wxArchive link all archive streams // Author: Mike Wetherell -// RCS-ID: $Id: arcall.cpp 42508 2006-10-27 09:53:38Z MW $ // Copyright: (c) 2006 Mike Wetherell // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/arcfind.cpp b/Externals/wxWidgets3/src/common/arcfind.cpp index dc9a0d179a..6f90d5cc50 100644 --- a/Externals/wxWidgets3/src/common/arcfind.cpp +++ b/Externals/wxWidgets3/src/common/arcfind.cpp @@ -2,7 +2,6 @@ // Name: src/common/arcfind.cpp // Purpose: Streams for archive formats // Author: Mike Wetherell -// RCS-ID: $Id: arcfind.cpp 46391 2007-06-10 17:42:41Z VS $ // Copyright: (c) Mike Wetherell // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/archive.cpp b/Externals/wxWidgets3/src/common/archive.cpp index 1c2dfdb44c..360f22936c 100644 --- a/Externals/wxWidgets3/src/common/archive.cpp +++ b/Externals/wxWidgets3/src/common/archive.cpp @@ -2,7 +2,6 @@ // Name: src/common/archive.cpp // Purpose: Streams for archive formats // Author: Mike Wetherell -// RCS-ID: $Id: archive.cpp 42508 2006-10-27 09:53:38Z MW $ // Copyright: (c) Mike Wetherell // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/arrstr.cpp b/Externals/wxWidgets3/src/common/arrstr.cpp index c186bb0da2..f66fcdd4ee 100644 --- a/Externals/wxWidgets3/src/common/arrstr.cpp +++ b/Externals/wxWidgets3/src/common/arrstr.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 29/01/98 -// RCS-ID: $Id: arrstr.cpp 67343 2011-03-30 14:16:04Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/artprov.cpp b/Externals/wxWidgets3/src/common/artprov.cpp index 5377d3e560..f2551614d4 100644 --- a/Externals/wxWidgets3/src/common/artprov.cpp +++ b/Externals/wxWidgets3/src/common/artprov.cpp @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 18/03/2002 -// RCS-ID: $Id: artprov.cpp 70154 2011-12-28 13:51:29Z VZ $ // Copyright: (c) Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/artstd.cpp b/Externals/wxWidgets3/src/common/artstd.cpp index fe65503986..471146647b 100644 --- a/Externals/wxWidgets3/src/common/artstd.cpp +++ b/Externals/wxWidgets3/src/common/artstd.cpp @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 18/03/2002 -// RCS-ID: $Id: artstd.cpp 70893 2012-03-13 17:23:58Z JS $ // Copyright: (c) Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/arttango.cpp b/Externals/wxWidgets3/src/common/arttango.cpp index ae01e9e85a..156ae8fc06 100644 --- a/Externals/wxWidgets3/src/common/arttango.cpp +++ b/Externals/wxWidgets3/src/common/arttango.cpp @@ -3,7 +3,6 @@ // Purpose: art provider using embedded PNG versions of Tango icons // Author: Vadim Zeitlin // Created: 2010-12-27 -// RCS-ID: $Id: arttango.cpp 70154 2011-12-28 13:51:29Z VZ $ // Copyright: (c) 2010 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/base64.cpp b/Externals/wxWidgets3/src/common/base64.cpp index fc0cb57755..5ee3a7a3c7 100644 --- a/Externals/wxWidgets3/src/common/base64.cpp +++ b/Externals/wxWidgets3/src/common/base64.cpp @@ -3,7 +3,6 @@ // Purpose: implementation of BASE64 encoding/decoding functions // Author: Charles Reimers, Vadim Zeitlin // Created: 2007-06-18 -// RCS-ID: $Id: base64.cpp 61753 2009-08-23 22:25:12Z VZ $ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/bmpbase.cpp b/Externals/wxWidgets3/src/common/bmpbase.cpp index 403470fe29..763b9597f9 100644 --- a/Externals/wxWidgets3/src/common/bmpbase.cpp +++ b/Externals/wxWidgets3/src/common/bmpbase.cpp @@ -3,7 +3,6 @@ // Purpose: wxBitmapBase // Author: VaclavSlavik // Created: 2001/04/11 -// RCS-ID: $Id: bmpbase.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) 2001, Vaclav Slavik // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -23,6 +22,12 @@ #include "wx/image.h" #endif // WX_PRECOMP +#if wxUSE_IMAGE && wxUSE_LIBPNG && wxUSE_STREAMS + #define wxHAS_PNG_LOAD + + #include "wx/mstream.h" +#endif + // ---------------------------------------------------------------------------- // wxVariant support // ---------------------------------------------------------------------------- @@ -37,6 +42,31 @@ IMPLEMENT_VARIANT_OBJECT_EXPORTED_SHALLOWCMP(wxIcon,WXDLLEXPORT) //WX_IMPLEMENT_ANY_VALUE_TYPE(wxAnyValueTypeImpl) #endif +// ---------------------------------------------------------------------------- +// wxBitmapHelpers +// ---------------------------------------------------------------------------- + +// wxOSX has a native version and doesn't use this one. + +#ifndef __WXOSX__ + +/* static */ +wxBitmap wxBitmapHelpers::NewFromPNGData(const void* data, size_t size) +{ + wxBitmap bitmap; + +#ifdef wxHAS_PNG_LOAD + wxMemoryInputStream is(data, size); + wxImage image(is, wxBITMAP_TYPE_PNG); + if ( image.IsOk() ) + bitmap = wxBitmap(image); +#endif // wxHAS_PNG_LOAD + + return bitmap; +} + +#endif // !__WXOSX__ + // ---------------------------------------------------------------------------- // wxBitmapBase // ---------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/src/common/bmpbtncmn.cpp b/Externals/wxWidgets3/src/common/bmpbtncmn.cpp index 8c2e3e0d1b..8760c70c09 100644 --- a/Externals/wxWidgets3/src/common/bmpbtncmn.cpp +++ b/Externals/wxWidgets3/src/common/bmpbtncmn.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: bmpbtncmn.cpp 66584 2011-01-05 06:56:36Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -26,6 +25,9 @@ #include "wx/image.h" #endif +#include "wx/artprov.h" +#include "wx/renderer.h" + // ---------------------------------------------------------------------------- // XTI // ---------------------------------------------------------------------------- @@ -90,4 +92,67 @@ bitmap "focus" , bitmap "disabled" , */ +namespace +{ + +#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP + +wxBitmap +GetCloseButtonBitmap(wxWindow *win, + const wxSize& size, + const wxColour& colBg, + int flags = 0) +{ + wxBitmap bmp(size); + wxMemoryDC dc(bmp); + dc.SetBackground(colBg); + dc.Clear(); + wxRendererNative::Get(). + DrawTitleBarBitmap(win, dc, size, wxTITLEBAR_BUTTON_CLOSE, flags); + return bmp; +} + +#endif // wxHAS_DRAW_TITLE_BAR_BITMAP + +} // anonymous namespace + +/* static */ +wxBitmapButton* +wxBitmapButtonBase::NewCloseButton(wxWindow* parent, wxWindowID winid) +{ + wxCHECK_MSG( parent, NULL, wxS("Must have a valid parent") ); + + const wxColour colBg = parent->GetBackgroundColour(); + +#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP + const wxSize sizeBmp = wxArtProvider::GetSizeHint(wxART_BUTTON); + wxBitmap bmp = GetCloseButtonBitmap(parent, sizeBmp, colBg); +#else // !wxHAS_DRAW_TITLE_BAR_BITMAP + wxBitmap bmp = wxArtProvider::GetBitmap(wxART_CLOSE, wxART_BUTTON); +#endif // wxHAS_DRAW_TITLE_BAR_BITMAP + + wxBitmapButton* const button = new wxBitmapButton + ( + parent, + winid, + bmp, + wxDefaultPosition, + wxDefaultSize, + wxBORDER_NONE + ); + +#ifdef wxHAS_DRAW_TITLE_BAR_BITMAP + button->SetBitmapPressed( + GetCloseButtonBitmap(parent, sizeBmp, colBg, wxCONTROL_PRESSED)); + + button->SetBitmapCurrent( + GetCloseButtonBitmap(parent, sizeBmp, colBg, wxCONTROL_CURRENT)); +#endif // wxHAS_DRAW_TITLE_BAR_BITMAP + + // The button should blend with its parent background. + button->SetBackgroundColour(colBg); + + return button; +} + #endif // wxUSE_BMPBUTTON diff --git a/Externals/wxWidgets3/src/common/bmpcboxcmn.cpp b/Externals/wxWidgets3/src/common/bmpcboxcmn.cpp index 2606b8c57d..1fa3c83ffa 100644 --- a/Externals/wxWidgets3/src/common/bmpcboxcmn.cpp +++ b/Externals/wxWidgets3/src/common/bmpcboxcmn.cpp @@ -3,7 +3,6 @@ // Purpose: wxBitmapComboBox // Author: Jaakko Salli // Created: 2008-04-09 -// RCS-ID: $Id: bmpcboxcmn.cpp 66728 2011-01-22 14:38:36Z DS $ // Copyright: (c) 2008 Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/bookctrl.cpp b/Externals/wxWidgets3/src/common/bookctrl.cpp index c722822df5..4b321322b4 100644 --- a/Externals/wxWidgets3/src/common/bookctrl.cpp +++ b/Externals/wxWidgets3/src/common/bookctrl.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.08.03 -// RCS-ID: $Id: bookctrl.cpp 70153 2011-12-28 13:51:25Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -105,27 +104,21 @@ void wxBookCtrlBase::DoInvalidateBestSize() wxSize wxBookCtrlBase::CalcSizeFromPage(const wxSize& sizePage) const { - // We need to add the size of the controller and the border between if it's - // shown. Notice that we don't use GetControllerSize() here as it returns - // the actual size while we want the best size here. + // Add the size of the controller and the border between if it's shown. if ( !m_bookctrl || !m_bookctrl->IsShown() ) return sizePage; - const wxSize sizeController = m_bookctrl->GetBestSize(); + // Notice that the controller size is its current size while we really want + // to have its best size. So we only take into account its size in the + // direction in which we should add it but not in the other one, where the + // controller size is determined by the size of wxBookCtrl itself. + const wxSize sizeController = GetControllerSize(); wxSize size = sizePage; if ( IsVertical() ) - { - if ( sizeController.x > sizePage.x ) - size.x = sizeController.x; size.y += sizeController.y + GetInternalBorder(); - } else // left/right aligned - { size.x += sizeController.x + GetInternalBorder(); - if ( sizeController.y > sizePage.y ) - size.y = sizeController.y; - } return size; } @@ -139,26 +132,22 @@ wxSize wxBookCtrlBase::DoGetBestSize() const { wxSize bestSize; - // iterate over all pages, get the largest width and height - const size_t nCount = m_pages.size(); - for ( size_t nPage = 0; nPage < nCount; nPage++ ) + if (m_fitToCurrentPage && GetCurrentPage()) { - const wxWindow * const pPage = m_pages[nPage]; - if( pPage ) + bestSize = GetCurrentPage()->GetBestSize(); + } + else + { + // iterate over all pages, get the largest width and height + const size_t nCount = m_pages.size(); + for ( size_t nPage = 0; nPage < nCount; nPage++ ) { - wxSize childBestSize(pPage->GetBestSize()); - - if ( childBestSize.x > bestSize.x ) - bestSize.x = childBestSize.x; - - if ( childBestSize.y > bestSize.y ) - bestSize.y = childBestSize.y; + const wxWindow * const pPage = m_pages[nPage]; + if ( pPage ) + bestSize.IncTo(pPage->GetBestSize()); } } - if (m_fitToCurrentPage && GetCurrentPage()) - bestSize = GetCurrentPage()->GetBestSize(); - // convert display area to window area, adding the size necessary for the // tabs wxSize best = CalcSizeFromPage(bestSize); @@ -288,19 +277,19 @@ wxSize wxBookCtrlBase::GetControllerSize() const if ( !m_bookctrl || !m_bookctrl->IsShown() ) return wxSize(0, 0); - const wxSize sizeClient = GetClientSize(), - sizeCtrl = m_bookctrl->GetBestSize(); + const wxSize sizeClient = GetClientSize(); wxSize size; + // Ask for the best width/height considering the other direction. if ( IsVertical() ) { size.x = sizeClient.x; - size.y = sizeCtrl.y; + size.y = m_bookctrl->GetBestHeight(sizeClient.x); } else // left/right aligned { - size.x = sizeCtrl.x; + size.x = m_bookctrl->GetBestWidth(sizeClient.y); size.y = sizeClient.y; } @@ -441,6 +430,18 @@ int wxBookCtrlBase::GetNextPage(bool forward) const return nPage; } +int wxBookCtrlBase::FindPage(const wxWindow* page) const +{ + const size_t nCount = m_pages.size(); + for ( size_t nPage = 0; nPage < nCount; nPage++ ) + { + if ( m_pages[nPage] == page ) + return (int)nPage; + } + + return wxNOT_FOUND; +} + bool wxBookCtrlBase::DoSetSelectionAfterInsertion(size_t n, bool bSelect) { if ( bSelect ) @@ -454,6 +455,26 @@ bool wxBookCtrlBase::DoSetSelectionAfterInsertion(size_t n, bool bSelect) return true; } +void wxBookCtrlBase::DoSetSelectionAfterRemoval(size_t n) +{ + if ( m_selection >= (int)n ) + { + // ensure that the selection is valid + int sel; + if ( GetPageCount() == 0 ) + sel = wxNOT_FOUND; + else + sel = m_selection ? m_selection - 1 : 0; + + // if deleting current page we shouldn't try to hide it + m_selection = m_selection == (int)n ? wxNOT_FOUND + : m_selection - 1; + + if ( sel != wxNOT_FOUND && sel != m_selection ) + SetSelection(sel); + } +} + int wxBookCtrlBase::DoSetSelection(size_t n, int flags) { wxCHECK_MSG( n < GetPageCount(), wxNOT_FOUND, @@ -478,11 +499,11 @@ int wxBookCtrlBase::DoSetSelection(size_t n, int flags) if ( !(flags & SetSelection_SendEvent) || allowed) { if ( oldSel != wxNOT_FOUND ) - m_pages[oldSel]->Hide(); + DoShowPage(m_pages[oldSel], false); wxWindow *page = m_pages[n]; page->SetSize(GetPageRect()); - page->Show(); + DoShowPage(page, true); // change selection now to ignore the selection change event UpdateSelectedPage(n); diff --git a/Externals/wxWidgets3/src/common/btncmn.cpp b/Externals/wxWidgets3/src/common/btncmn.cpp index e59d7118ac..cbbfd0f14e 100644 --- a/Externals/wxWidgets3/src/common/btncmn.cpp +++ b/Externals/wxWidgets3/src/common/btncmn.cpp @@ -3,7 +3,6 @@ // Purpose: implementation of wxButtonBase // Author: Vadim Zeitlin // Created: 2007-04-08 -// RCS-ID: $Id: btncmn.cpp 67931 2011-06-14 13:00:42Z VZ $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -75,7 +74,7 @@ wxEND_FLAGS( wxButtonStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl, "wx/button.h") wxBEGIN_PROPERTIES_TABLE(wxButton) -wxEVENT_PROPERTY( Click, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEvent ) +wxEVENT_PROPERTY( Click, wxEVT_BUTTON, wxCommandEvent ) wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \ 0 /*flags*/, wxT("The font associated with the button label"), wxT("group")) diff --git a/Externals/wxWidgets3/src/common/cairo.cpp b/Externals/wxWidgets3/src/common/cairo.cpp index 7425bf2afa..a10ca6499f 100644 --- a/Externals/wxWidgets3/src/common/cairo.cpp +++ b/Externals/wxWidgets3/src/common/cairo.cpp @@ -3,7 +3,6 @@ // Purpose: Cairo library // Author: Anthony Betaudeau // Created: 2007-08-25 -// RCS-ID: $Id: cairo.cpp 69486 2011-10-20 04:58:00Z RD $ // Copyright: (c) Anthony Bretaudeau // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -16,14 +15,18 @@ #pragma hdrstop #endif +#if wxUSE_CAIRO + // keep cairo.h from defining dllimport as we're defining the symbols inside // the wx dll in order to load them dynamically. #define cairo_public -#include "wx/cairo.h" +#include #include "wx/dynlib.h" -#if wxUSE_CAIRO +#ifdef __WXMSW__ +#include "wx/msw/wrapwin.h" +#endif #ifdef __WXMAC__ #include "wx/osx/private.h" @@ -375,18 +378,13 @@ bool wxCairo::IsOk() // implementation of the functions themselves // ============================================================================ -extern "C" -{ - bool wxCairoInit() { return wxCairo::Initialize(); } -void wxCairoCleanUp() +extern "C" { - wxCairo::CleanUp(); -} #define wxIMPL_CAIRO_FUNC(rettype, name, params, args, defret) \ rettype name params \ diff --git a/Externals/wxWidgets3/src/common/calctrlcmn.cpp b/Externals/wxWidgets3/src/common/calctrlcmn.cpp index 93ac0dbc9f..2b869127b2 100644 --- a/Externals/wxWidgets3/src/common/calctrlcmn.cpp +++ b/Externals/wxWidgets3/src/common/calctrlcmn.cpp @@ -2,7 +2,6 @@ // Name: src/common/calctrlcmn.cpp // Author: Marcin Wojdyr // Created: 2008-03-26 -// RCS-ID: $Id: calctrlcmn.cpp 69224 2011-09-29 13:43:15Z VZ $ // Copyright: (C) Marcin Wojdyr // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/checkboxcmn.cpp b/Externals/wxWidgets3/src/common/checkboxcmn.cpp index f3f245cf96..b31d85338d 100644 --- a/Externals/wxWidgets3/src/common/checkboxcmn.cpp +++ b/Externals/wxWidgets3/src/common/checkboxcmn.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: checkboxcmn.cpp 66592 2011-01-05 18:27:58Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -68,7 +67,7 @@ wxEND_FLAGS( wxCheckBoxStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckBox, wxControl, "wx/checkbox.h") wxBEGIN_PROPERTIES_TABLE(wxCheckBox) - wxEVENT_PROPERTY( Click, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEvent ) + wxEVENT_PROPERTY( Click, wxEVT_CHECKBOX, wxCommandEvent ) wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \ 0 /*flags*/, wxT("Helpstring"), wxT("group")) diff --git a/Externals/wxWidgets3/src/common/checklstcmn.cpp b/Externals/wxWidgets3/src/common/checklstcmn.cpp index 6f9ace5d60..be56ca3e17 100644 --- a/Externals/wxWidgets3/src/common/checklstcmn.cpp +++ b/Externals/wxWidgets3/src/common/checklstcmn.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 16.11.97 -// RCS-ID: $Id: checklstcmn.cpp 66584 2011-01-05 06:56:36Z PC $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -87,7 +86,7 @@ wxEND_FLAGS( wxCheckListBoxStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckListBox, wxListBox, "wx/checklst.h") wxBEGIN_PROPERTIES_TABLE(wxCheckListBox) - wxEVENT_PROPERTY( Toggle, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEvent ) + wxEVENT_PROPERTY( Toggle, wxEVT_CHECKLISTBOX, wxCommandEvent ) wxPROPERTY_FLAGS( WindowStyle, wxCheckListBoxStyle, long, SetWindowStyleFlag, \ GetWindowStyleFlag, wxEMPTY_PARAMETER_VALUE, wxLB_OWNERDRAW /*flags*/, \ wxT("Helpstring"), wxT("group")) // style @@ -99,4 +98,22 @@ wxCONSTRUCTOR_4( wxCheckListBox, wxWindow*, Parent, wxWindowID, Id, \ wxPoint, Position, wxSize, Size ) +// ============================================================================ +// implementation +// ============================================================================ + +unsigned int wxCheckListBoxBase::GetCheckedItems(wxArrayInt& checkedItems) const +{ + unsigned int const numberOfItems = GetCount(); + + checkedItems.clear(); + for ( unsigned int i = 0; i < numberOfItems; ++i ) + { + if ( IsChecked(i) ) + checkedItems.push_back(i); + } + + return checkedItems.size(); +} + #endif diff --git a/Externals/wxWidgets3/src/common/choiccmn.cpp b/Externals/wxWidgets3/src/common/choiccmn.cpp index 075823d0ea..6ac940b424 100644 --- a/Externals/wxWidgets3/src/common/choiccmn.cpp +++ b/Externals/wxWidgets3/src/common/choiccmn.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 26.07.99 -// RCS-ID: $Id: choiccmn.cpp 66574 2011-01-04 14:13:29Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -28,6 +27,8 @@ #include "wx/choice.h" +#include "wx/private/textmeasure.h" + #ifndef WX_PRECOMP #endif @@ -68,7 +69,7 @@ wxEND_FLAGS( wxChoiceStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControl, "wx/choice.h") wxBEGIN_PROPERTIES_TABLE(wxChoice) -wxEVENT_PROPERTY( Select, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEvent ) +wxEVENT_PROPERTY( Select, wxEVT_CHOICE, wxCommandEvent ) wxPROPERTY( Font, wxFont, SetFont, GetFont , wxEMPTY_PARAMETER_VALUE, \ 0 /*flags*/, wxT("Helpstring"), wxT("group")) @@ -103,6 +104,21 @@ wxChoiceBase::~wxChoiceBase() // this destructor is required for Darwin } +wxSize wxChoiceBase::DoGetBestSize() const +{ + // a reasonable width for an empty choice list + wxSize best(80, -1); + + const unsigned int nItems = GetCount(); + if ( nItems > 0 ) + { + wxTextMeasure txm(this); + best.x = txm.GetLargestStringExtent(GetStrings()).x; + } + + return best; +} + // ---------------------------------------------------------------------------- // misc // ---------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/src/common/clipcmn.cpp b/Externals/wxWidgets3/src/common/clipcmn.cpp index 4ee1d89a8c..b108944252 100644 --- a/Externals/wxWidgets3/src/common/clipcmn.cpp +++ b/Externals/wxWidgets3/src/common/clipcmn.cpp @@ -4,7 +4,6 @@ // Author: Robert Roebling // Modified by: // Created: 28.06.99 -// RCS-ID: $Id: clipcmn.cpp 61485 2009-07-20 23:54:08Z VZ $ // Copyright: (c) Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/clntdata.cpp b/Externals/wxWidgets3/src/common/clntdata.cpp index b702cff3b8..1cb5595785 100644 --- a/Externals/wxWidgets3/src/common/clntdata.cpp +++ b/Externals/wxWidgets3/src/common/clntdata.cpp @@ -4,7 +4,6 @@ // Author: Robin Dunn // Modified by: // Created: 9-Oct-2001 -// RCS-ID: $Id: clntdata.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/clrpickercmn.cpp b/Externals/wxWidgets3/src/common/clrpickercmn.cpp index 1dc183a0af..8320178596 100644 --- a/Externals/wxWidgets3/src/common/clrpickercmn.cpp +++ b/Externals/wxWidgets3/src/common/clrpickercmn.cpp @@ -4,7 +4,6 @@ // Author: Francesco Montorsi (readapted code written by Vadim Zeitlin) // Modified by: // Created: 15/04/2006 -// RCS-ID: $Id: clrpickercmn.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Vadim Zeitlin, Francesco Montorsi // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -39,7 +38,7 @@ const char wxColourPickerWidgetNameStr[] = "colourpickerwidget"; // implementation // ============================================================================ -wxDEFINE_EVENT(wxEVT_COMMAND_COLOURPICKER_CHANGED, wxColourPickerEvent); +wxDEFINE_EVENT(wxEVT_COLOURPICKER_CHANGED, wxColourPickerEvent); IMPLEMENT_DYNAMIC_CLASS(wxColourPickerCtrl, wxPickerBase) IMPLEMENT_DYNAMIC_CLASS(wxColourPickerEvent, wxEvent) @@ -68,7 +67,7 @@ bool wxColourPickerCtrl::Create( wxWindow *parent, wxWindowID id, // complete sizer creation wxPickerBase::PostCreation(); - m_picker->Connect(wxEVT_COMMAND_COLOURPICKER_CHANGED, + m_picker->Connect(wxEVT_COLOURPICKER_CHANGED, wxColourPickerEventHandler(wxColourPickerCtrl::OnColourChange), NULL, this); @@ -96,13 +95,6 @@ void wxColourPickerCtrl::UpdatePickerFromTextCtrl() { wxASSERT(m_text); - if (m_bIgnoreNextTextCtrlUpdate) - { - // ignore this update - m_bIgnoreNextTextCtrlUpdate = false; - return; - } - // wxString -> wxColour conversion wxColour col(m_text->GetValue()); if ( !col.IsOk() ) @@ -123,11 +115,9 @@ void wxColourPickerCtrl::UpdateTextCtrlFromPicker() if (!m_text) return; // no textctrl to update - // NOTE: this SetValue() will generate an unwanted wxEVT_COMMAND_TEXT_UPDATED - // which will trigger a unneeded UpdateFromTextCtrl(); thus before using - // SetValue() we set the m_bIgnoreNextTextCtrlUpdate flag... - m_bIgnoreNextTextCtrlUpdate = true; - m_text->SetValue(M_PICKER->GetColour().GetAsString()); + // Take care to use ChangeValue() here and not SetValue() to avoid + // infinite recursion. + m_text->ChangeValue(M_PICKER->GetColour().GetAsString()); } diff --git a/Externals/wxWidgets3/src/common/cmdline.cpp b/Externals/wxWidgets3/src/common/cmdline.cpp index e270ade86f..e8892831ac 100644 --- a/Externals/wxWidgets3/src/common/cmdline.cpp +++ b/Externals/wxWidgets3/src/common/cmdline.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 05.01.00 -// RCS-ID: $Id: cmdline.cpp 68316 2011-07-21 13:49:55Z VZ $ // Copyright: (c) 2000 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -682,7 +681,15 @@ int wxCmdLineParser::Parse(bool showUsage) continue; } - +#ifdef __WXOSX__ + if ( arg == wxT("-ApplePersistenceIgnoreState") ) + { + maybeOption = false; + + continue; + } +#endif + // empty argument or just '-' is not an option but a parameter if ( maybeOption && arg.length() > 1 && // FIXME-UTF8: use wc_str() after removing ANSI build @@ -969,8 +976,8 @@ int wxCmdLineParser::Parse(bool showUsage) case wxCMD_LINE_VAL_DATE: { wxDateTime dt; - wxString::const_iterator end; - if ( !dt.ParseDate(value, &end) || end != value.end() ) + wxString::const_iterator endDate; + if ( !dt.ParseDate(value, &endDate) || endDate != value.end() ) { errorMsg << wxString::Format(_("Option '%s': '%s' cannot be converted to a date."), name.c_str(), value.c_str()) @@ -1377,6 +1384,23 @@ static wxString GetLongOptionName(wxString::const_iterator p, Windows conventions for the command line handling, not Unix ones. For instance, backslash is not special except when it precedes double quote when it does quote it. + + TODO: Rewrite this to follow the even more complicated rule used by Windows + CommandLineToArgv(): + + * A string of backslashes not followed by a quotation mark has no special + meaning. + * An even number of backslashes followed by a quotation mark is treated as + pairs of protected backslashes, followed by a word terminator. + * An odd number of backslashes followed by a quotation mark is treated as + pairs of protected backslashes, followed by a protected quotation mark. + + See http://blogs.msdn.com/b/oldnewthing/archive/2010/09/17/10063629.aspx + + It could also be useful to provide a converse function which is also + non-trivial, see + + http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx */ /* static */ diff --git a/Externals/wxWidgets3/src/common/cmdproc.cpp b/Externals/wxWidgets3/src/common/cmdproc.cpp index 75ef4d3166..54f14ea028 100644 --- a/Externals/wxWidgets3/src/common/cmdproc.cpp +++ b/Externals/wxWidgets3/src/common/cmdproc.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart (extracted from docview.h by VZ) // Modified by: // Created: 05.11.00 -// RCS-ID: $Id: cmdproc.cpp 70460 2012-01-25 00:05:12Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/cmndata.cpp b/Externals/wxWidgets3/src/common/cmndata.cpp index 95de654375..18b2ef927f 100644 --- a/Externals/wxWidgets3/src/common/cmndata.cpp +++ b/Externals/wxWidgets3/src/common/cmndata.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: cmndata.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/colourcmn.cpp b/Externals/wxWidgets3/src/common/colourcmn.cpp index d596deec62..12b5f2007c 100644 --- a/Externals/wxWidgets3/src/common/colourcmn.cpp +++ b/Externals/wxWidgets3/src/common/colourcmn.cpp @@ -4,7 +4,6 @@ // Author: Francesco Montorsi // Modified by: // Created: 20/4/2006 -// RCS-ID: $Id: colourcmn.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Francesco Montorsi // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -273,6 +272,16 @@ void wxColourBase::MakeDisabled(unsigned char* r, unsigned char* g, unsigned cha *b = AlphaBlend(*b, brightness, 0.4); } +wxColour& wxColourBase::MakeDisabled(unsigned char brightness) +{ + unsigned char r = Red(), + g = Green(), + b = Blue(); + MakeDisabled(&r, &g, &b, brightness); + Set(r, g, b, Alpha()); + return static_cast(*this); +} + // AlphaBlend is used by ChangeLightness and MakeDisabled // static diff --git a/Externals/wxWidgets3/src/common/colourdata.cpp b/Externals/wxWidgets3/src/common/colourdata.cpp index 49996df461..3569c50514 100644 --- a/Externals/wxWidgets3/src/common/colourdata.cpp +++ b/Externals/wxWidgets3/src/common/colourdata.cpp @@ -1,7 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/common/colourdata.cpp // Author: Julian Smart -// RCS-ID: $Id: colourdata.cpp 66615 2011-01-07 05:26:57Z PC $ // Copyright: (c) Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -105,4 +104,64 @@ bool wxColourData::FromString(const wxString& str) } return success; } + +#if wxUSE_COLOURDLG + +#include "wx/colordlg.h" + +wxColour wxGetColourFromUser(wxWindow *parent, + const wxColour& colInit, + const wxString& caption, + wxColourData *ptrData) +{ + // contains serialized representation of wxColourData used the last time + // the dialog was shown: we want to reuse it the next time in order to show + // the same custom colours to the user (and we can't just have static + // wxColourData itself because it's a GUI object and so should be destroyed + // before GUI shutdown and doing it during static cleanup is too late) + static wxString s_strColourData; + + wxColourData data; + if ( !ptrData ) + { + ptrData = &data; + if ( !s_strColourData.empty() ) + { + if ( !data.FromString(s_strColourData) ) + { + wxFAIL_MSG( "bug in wxColourData::FromString()?" ); + } + +#ifdef __WXMSW__ + // we don't get back the "choose full" flag value from the native + // dialog and so we can't preserve it between runs, so we decide to + // always use it as it seems better than not using it (user can + // just ignore the extra controls in the dialog but having to click + // a button each time to show them would be very annoying + data.SetChooseFull(true); +#endif // __WXMSW__ + } + } + + if ( colInit.IsOk() ) + { + ptrData->SetColour(colInit); + } + + wxColour colRet; + wxColourDialog dialog(parent, ptrData); + if (!caption.empty()) + dialog.SetTitle(caption); + if ( dialog.ShowModal() == wxID_OK ) + { + *ptrData = dialog.GetColourData(); + colRet = ptrData->GetColour(); + s_strColourData = ptrData->ToString(); + } + //else: leave colRet invalid + + return colRet; +} + +#endif // wxUSE_COLOURDLG #endif // wxUSE_COLOURDLG || wxUSE_COLOURPICKERCTRL diff --git a/Externals/wxWidgets3/src/common/combocmn.cpp b/Externals/wxWidgets3/src/common/combocmn.cpp index de33d29646..82d1657960 100644 --- a/Externals/wxWidgets3/src/common/combocmn.cpp +++ b/Externals/wxWidgets3/src/common/combocmn.cpp @@ -4,7 +4,6 @@ // Author: Jaakko Salli // Modified by: // Created: Apr-30-2006 -// RCS-ID: $Id: combocmn.cpp 69005 2011-09-05 20:08:04Z RD $ // Copyright: (c) 2005 Jaakko Salli // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -23,26 +22,15 @@ #pragma hdrstop #endif +#include "wx/combo.h" + +#ifdef __WXMSW__ +#include "wx/msw/private.h" +#endif + #if wxUSE_COMBOBOX #include "wx/combobox.h" extern WXDLLEXPORT_DATA(const char) wxComboBoxNameStr[] = "comboBox"; -#endif - -#if wxUSE_COMBOCTRL - -#ifndef WX_PRECOMP - #include "wx/app.h" - #include "wx/log.h" - #include "wx/dcclient.h" - #include "wx/settings.h" - #include "wx/timer.h" - #include "wx/textctrl.h" -#endif - -#include "wx/tooltip.h" - -#include "wx/combo.h" - // ---------------------------------------------------------------------------- // XTI @@ -87,8 +75,8 @@ wxEND_FLAGS( wxComboBoxStyle ) wxIMPLEMENT_DYNAMIC_CLASS_XTI(wxComboBox, wxControl, "wx/combobox.h") wxBEGIN_PROPERTIES_TABLE(wxComboBox) -wxEVENT_PROPERTY( Select, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEvent ) -wxEVENT_PROPERTY( TextEnter, wxEVT_COMMAND_TEXT_ENTER, wxCommandEvent ) +wxEVENT_PROPERTY( Select, wxEVT_COMBOBOX, wxCommandEvent ) +wxEVENT_PROPERTY( TextEnter, wxEVT_TEXT_ENTER, wxCommandEvent ) // TODO DELEGATES wxPROPERTY( Font, wxFont, SetFont, GetFont, wxEMPTY_PARAMETER_VALUE, \ @@ -110,6 +98,21 @@ wxEMPTY_HANDLERS_TABLE(wxComboBox) wxCONSTRUCTOR_5( wxComboBox, wxWindow*, Parent, wxWindowID, Id, \ wxString, Value, wxPoint, Position, wxSize, Size ) +#endif // wxUSE_COMBOBOX + +#if wxUSE_COMBOCTRL + +#ifndef WX_PRECOMP + #include "wx/app.h" + #include "wx/log.h" + #include "wx/dcclient.h" + #include "wx/settings.h" + #include "wx/timer.h" + #include "wx/textctrl.h" +#endif + +#include "wx/tooltip.h" + // constants // ---------------------------------------------------------------------------- @@ -389,7 +392,7 @@ void wxComboFrameEventHandler::OnIdle( wxIdleEvent& event ) wxWindow* popup = m_combo->GetPopupControl()->GetControl(); wxWindow* winpopup = m_combo->GetPopupWindow(); - if ( + if ( !winFocused || ( winFocused != m_focusStart && winFocused != popup && winFocused->GetParent() != popup && @@ -398,6 +401,7 @@ void wxComboFrameEventHandler::OnIdle( wxIdleEvent& event ) winFocused != m_combo && winFocused != m_combo->GetButton() // GTK (atleast) requires this ) + ) { m_combo->HidePopup(true); } @@ -489,9 +493,8 @@ bool wxComboPopupWindow::Show( bool show ) m_inShow++; - wxASSERT( IsKindOf(CLASSINFO(wxPopupTransientWindow)) ); - - wxPopupTransientWindow* ptw = (wxPopupTransientWindow*) this; + wxPopupTransientWindow* const + ptw = static_cast(this); if ( show != ptw->IsShown() ) { @@ -518,7 +521,7 @@ bool wxComboPopupWindow::ProcessLeftDown(wxMouseEvent& event) void wxComboPopupWindow::OnDismiss() { wxComboCtrlBase* combo = (wxComboCtrlBase*) GetParent(); - wxASSERT_MSG( combo->IsKindOf(CLASSINFO(wxComboCtrlBase)), + wxASSERT_MSG( wxDynamicCast(combo, wxComboCtrlBase), wxT("parent might not be wxComboCtrl, but check IMPLEMENT_DYNAMIC_CLASS(2) macro for correctness") ); combo->OnPopupDismiss(true); @@ -766,7 +769,7 @@ void wxComboBoxExtraInputHandler::OnFocus(wxFocusEvent& event) if ( m_combo->GetTextCtrl() ) m_combo->GetTextCtrl()->SelectAll(); else - m_combo->SetSelection(-1,-1); + m_combo->SelectAll(); } // Send focus indication to parent. @@ -1096,10 +1099,10 @@ wxComboCtrlBase::CreateTextCtrl(int style) // Connecting the events is currently the most reliable way wxWindowID id = m_text->GetId(); - m_text->Connect(id, wxEVT_COMMAND_TEXT_UPDATED, + m_text->Connect(id, wxEVT_TEXT, wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent), NULL, this); - m_text->Connect(id, wxEVT_COMMAND_TEXT_ENTER, + m_text->Connect(id, wxEVT_TEXT_ENTER, wxCommandEventHandler(wxComboCtrlBase::OnTextCtrlEvent), NULL, this); @@ -1360,22 +1363,52 @@ void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust wxSize wxComboCtrlBase::DoGetBestSize() const { - wxSize sizeText(150,0); + int width = m_text ? m_text->GetBestSize().x : 80; - if ( m_text ) - sizeText = m_text->GetBestSize(); + return GetSizeFromTextSize(width); +} - // TODO: Better method to calculate close-to-native control height. +wxSize wxComboCtrlBase::DoGetSizeFromTextSize(int xlen, int ylen) const +{ + // Calculate close-to-native control height int fhei; + +#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__) + fhei = EDIT_HEIGHT_FROM_CHAR_HEIGHT(GetCharHeight()); +#elif defined(__WXGTK__) && !defined(__WXUNIVERSAL__) + // Control creation is not entirely cheap, so cache the heights to + // avoid repeatedly creating dummy controls: + static wxString s_last_font; + static int s_last_fhei = -1; + wxString fontdesc; + if ( m_font.IsOk() ) + fontdesc = m_font.GetNativeFontInfoDesc(); + if ( s_last_fhei != -1 && fontdesc == s_last_font ) + { + fhei = s_last_fhei; + } + else + { + wxComboBox* cb = new wxComboBox; + cb->Hide(); + cb->Create(const_cast(this), wxID_ANY); + if ( m_font.IsOk() ) + cb->SetFont(m_font); + s_last_font = fontdesc; + s_last_fhei = fhei = cb->GetBestSize().y; + cb->Destroy(); + } +#else if ( m_font.IsOk() ) fhei = (m_font.GetPointSize()*2) + 5; else if ( wxNORMAL_FONT->IsOk() ) fhei = (wxNORMAL_FONT->GetPointSize()*2) + 5; else - fhei = sizeText.y + 4; + fhei = 22; +#endif // only for wxComboBox on MSW or GTK - // Need to force height to accomodate bitmap? + // Need to force height to accommodate bitmap? int btnSizeY = m_btnSize.y; if ( m_bmpNormal.IsOk() && fhei < btnSizeY ) fhei = btnSizeY; @@ -1393,11 +1426,6 @@ wxSize wxComboCtrlBase::DoGetBestSize() const fhei += 4; */ - // Final adjustments -#ifdef __WXGTK__ - fhei += 1; -#endif - #ifdef __WXMAC__ // these are the numbers from the HIG: switch ( m_windowVariant ) @@ -1416,11 +1444,19 @@ wxSize wxComboCtrlBase::DoGetBestSize() const #endif fhei += 2 * FOCUS_RING; - int width = sizeText.x + FOCUS_RING + COMBO_MARGIN + DEFAULT_DROPBUTTON_WIDTH; - wxSize ret(width, fhei); - CacheBestSize(ret); - return ret; + // Calculate width + int fwid = xlen + FOCUS_RING + COMBO_MARGIN + DEFAULT_DROPBUTTON_WIDTH; + + // Add the margins we have previously set + wxPoint marg( GetMargins() ); + fwid += wxMax(0, marg.x); + fhei += wxMax(0, marg.y); + + if ( ylen > 0 ) + fhei += ylen - GetCharHeight(); + + return wxSize(fwid, fhei); } void wxComboCtrlBase::OnSizeEvent( wxSizeEvent& event ) @@ -1771,7 +1807,7 @@ void wxComboCtrlBase::OnTextCtrlEvent(wxCommandEvent& event) return; } - if ( event.GetEventType() == wxEVT_COMMAND_TEXT_UPDATED ) + if ( event.GetEventType() == wxEVT_TEXT ) { if ( m_ignoreEvtText > 0 ) { @@ -2034,19 +2070,23 @@ void wxComboCtrlBase::OnCharEvent(wxKeyEvent& event) void wxComboCtrlBase::OnFocusEvent( wxFocusEvent& event ) { -// On Mac, this leads to infinite recursion and eventually a crash -#ifndef __WXMAC__ + // On Mac, setting focus here leads to infinite recursion and eventually + // a crash due to the SetFocus call producing another event. + // Handle Mac in OnIdleEvent using m_resetFocus. + if ( event.GetEventType() == wxEVT_SET_FOCUS ) { - wxWindow* tc = GetTextCtrl(); - if ( tc && tc != DoFindFocus() ) + if ( GetTextCtrl() && !GetTextCtrl()->HasFocus() ) { - tc->SetFocus(); +#ifdef __WXMAC__ + m_resetFocus = true; +#else + GetTextCtrl()->SetFocus(); +#endif } } - + Refresh(); -#endif } void wxComboCtrlBase::OnIdleEvent( wxIdleEvent& WXUNUSED(event) ) @@ -2054,9 +2094,8 @@ void wxComboCtrlBase::OnIdleEvent( wxIdleEvent& WXUNUSED(event) ) if ( m_resetFocus ) { m_resetFocus = false; - wxWindow* tc = GetTextCtrl(); - if ( tc ) - tc->SetFocus(); + if ( GetTextCtrl() ) + GetTextCtrl()->SetFocus(); } } @@ -2214,7 +2253,7 @@ void wxComboCtrlBase::OnButtonClick() void wxComboCtrlBase::Popup() { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_DROPDOWN, GetId()); + wxCommandEvent event(wxEVT_COMBOBOX_DROPDOWN, GetId()); event.SetEventObject(this); HandleWindowEvent(event); @@ -2500,7 +2539,7 @@ void wxComboCtrlBase::OnPopupDismiss(bool generateEvent) if ( generateEvent ) { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_CLOSEUP, GetId()); + wxCommandEvent event(wxEVT_COMBOBOX_CLOSEUP, GetId()); event.SetEventObject(this); HandleWindowEvent(event); } diff --git a/Externals/wxWidgets3/src/common/config.cpp b/Externals/wxWidgets3/src/common/config.cpp index e6916ff8d9..852dd13f17 100644 --- a/Externals/wxWidgets3/src/common/config.cpp +++ b/Externals/wxWidgets3/src/common/config.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 07.04.98 -// RCS-ID: $Id: config.cpp 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1997 Karsten Ballueder Ballueder@usa.net // Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/src/common/containr.cpp b/Externals/wxWidgets3/src/common/containr.cpp index 2b3e7d414e..50bbd6aefa 100644 --- a/Externals/wxWidgets3/src/common/containr.cpp +++ b/Externals/wxWidgets3/src/common/containr.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 06.08.01 -// RCS-ID: $Id: containr.cpp 68502 2011-08-03 00:45:42Z VZ $ // Copyright: (c) 2001 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -47,14 +46,25 @@ // wxControlContainerBase // ---------------------------------------------------------------------------- -void wxControlContainerBase::SetCanFocus(bool acceptsFocus) +void wxControlContainerBase::UpdateParentCanFocus() { - if ( acceptsFocus == m_acceptsFocus ) - return; + // In the ports where it does something non trivial, the parent window + // should only be focusable if it doesn't have any focusable children + // (e.g. native focus handling in wxGTK totally breaks down otherwise). + m_winParent->SetCanFocus(m_acceptsFocusSelf && !m_acceptsFocusChildren); +} - m_acceptsFocus = acceptsFocus; +bool wxControlContainerBase::UpdateCanFocusChildren() +{ + const bool acceptsFocusChildren = HasAnyFocusableChildren(); + if ( acceptsFocusChildren != m_acceptsFocusChildren ) + { + m_acceptsFocusChildren = acceptsFocusChildren; - m_winParent->SetCanFocus(m_acceptsFocus); + UpdateParentCanFocus(); + } + + return m_acceptsFocusChildren; } bool wxControlContainerBase::HasAnyFocusableChildren() const @@ -70,6 +80,30 @@ bool wxControlContainerBase::HasAnyFocusableChildren() const if ( !m_winParent->IsClientAreaChild(child) ) continue; + // Here we check whether the child can accept the focus at all, as we + // want to try focusing it later even if it can't accept it right now. + if ( child->AcceptsFocusRecursively() ) + return true; + } + + return false; +} + +bool wxControlContainerBase::HasAnyChildrenAcceptingFocus() const +{ + const wxWindowList& children = m_winParent->GetChildren(); + for ( wxWindowList::const_iterator i = children.begin(), + end = children.end(); + i != end; + ++i ) + { + const wxWindow * const child = *i; + + if ( !m_winParent->IsClientAreaChild(child) ) + continue; + + // Here we check if the child accepts focus right now as we need to + // know if we can give the focus to it or not. if ( child->CanAcceptFocus() ) return true; } @@ -118,6 +152,11 @@ bool wxControlContainerBase::DoSetFocus() return ret; } +bool wxControlContainerBase::AcceptsFocus() const +{ + return m_acceptsFocusSelf && m_winParent->CanBeFocused(); +} + bool wxControlContainerBase::SetFocusToChild() { return wxSetFocusToChild(m_winParent, &m_winLastFocused); @@ -174,19 +213,6 @@ void wxControlContainer::SetLastFocus(wxWindow *win) wxLogTrace(TRACE_FOCUS, wxT("No more last focus")); } } - - // propagate the last focus upwards so that our parent can set focus back - // to us if it loses it now and regains later; do *not* do this if we are - // a toplevel window (e.g. wxDialog) that has another frame as its parent - if ( !m_winParent->IsTopLevel() ) - { - wxWindow *parent = m_winParent->GetParent(); - if ( parent ) - { - wxChildFocusEvent eventFocus(m_winParent); - parent->GetEventHandler()->ProcessEvent(eventFocus); - } - } } // -------------------------------------------------------------------- @@ -194,7 +220,7 @@ void wxControlContainer::SetLastFocus(wxWindow *win) // within the same group. Used by wxSetFocusToChild on wxMSW // -------------------------------------------------------------------- -#if defined(__WXMSW__) && wxUSE_RADIOBTN +#if wxUSE_RADIOBTN wxRadioButton* wxGetPreviousButtonInGroup(wxRadioButton *btn) { @@ -653,17 +679,27 @@ bool wxSetFocusToChild(wxWindow *win, wxWindow **childLastFocused) // It might happen that the window got reparented if ( (*childLastFocused)->GetParent() == win ) { - // And it also could have become hidden in the meanwhile, in this - // case focus its parent instead. - while ( !(*childLastFocused)->IsShown() ) + // And it also could have become hidden in the meanwhile + // We want to focus on the deepest widget visible + wxWindow *deepestVisibleWindow = NULL; + + while ( *childLastFocused ) { + if ( (*childLastFocused)->IsShown() ) + { + if ( !deepestVisibleWindow ) + deepestVisibleWindow = *childLastFocused; + } + else + deepestVisibleWindow = NULL; + *childLastFocused = (*childLastFocused)->GetParent(); - if ( !*childLastFocused ) - break; } - if ( *childLastFocused ) + if ( deepestVisibleWindow ) { + *childLastFocused = deepestVisibleWindow; + wxLogTrace(TRACE_FOCUS, wxT("SetFocusToChild() => last child (0x%p)."), (*childLastFocused)->GetHandle()); diff --git a/Externals/wxWidgets3/src/common/convauto.cpp b/Externals/wxWidgets3/src/common/convauto.cpp index 83c1ec3d0f..6a5fba4ecb 100644 --- a/Externals/wxWidgets3/src/common/convauto.cpp +++ b/Externals/wxWidgets3/src/common/convauto.cpp @@ -3,7 +3,6 @@ // Purpose: implementation of wxConvAuto // Author: Vadim Zeitlin // Created: 2006-04-04 -// RCS-ID: $Id: convauto.cpp 69675 2011-11-05 11:23:41Z VZ $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/cshelp.cpp b/Externals/wxWidgets3/src/common/cshelp.cpp index d05bb9265d..26484e26a2 100644 --- a/Externals/wxWidgets3/src/common/cshelp.cpp +++ b/Externals/wxWidgets3/src/common/cshelp.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart, Vadim Zeitlin // Modified by: // Created: 08/09/2000 -// RCS-ID: $Id: cshelp.cpp 68859 2011-08-23 04:55:46Z DS $ // Copyright: (c) 2000 Julian Smart, Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/ctrlcmn.cpp b/Externals/wxWidgets3/src/common/ctrlcmn.cpp index 3fc3cd64a3..32bce06c6f 100644 --- a/Externals/wxWidgets3/src/common/ctrlcmn.cpp +++ b/Externals/wxWidgets3/src/common/ctrlcmn.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 26.07.99 -// RCS-ID: $Id: ctrlcmn.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -149,6 +148,12 @@ void wxControlBase::DoUpdateWindowUI(wxUpdateUIEvent& event) #endif // wxUSE_RADIOBTN } +wxSize wxControlBase::DoGetSizeFromTextSize(int WXUNUSED(xlen), + int WXUNUSED(ylen)) const +{ + return wxSize(-1, -1); +} + /* static */ wxString wxControlBase::GetLabelText(const wxString& label) { @@ -534,15 +539,10 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc, // add this (ellipsized) row to the rest of the label ret << curLine; if ( pc == label.end() ) - { - // NOTE: this is the return which always exits the function - return ret; - } - else - { - ret << *pc; - curLine.clear(); - } + break; + + ret << *pc; + curLine.clear(); } // we need to remove mnemonics from the label for correct calculations else if ( *pc == wxS('&') && (flags & wxELLIPSIZE_FLAGS_PROCESS_MNEMONICS) ) @@ -565,14 +565,9 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc, } } - // this return would generate a - // warning C4702: unreachable code - // with MSVC since the function always exits from inside the loop - //return ret; + return ret; } - - // ---------------------------------------------------------------------------- // wxStaticBitmap // ---------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/src/common/ctrlsub.cpp b/Externals/wxWidgets3/src/common/ctrlsub.cpp index d1524dde1a..7bf15a9295 100644 --- a/Externals/wxWidgets3/src/common/ctrlsub.cpp +++ b/Externals/wxWidgets3/src/common/ctrlsub.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 22.10.99 -// RCS-ID: $Id: ctrlsub.cpp 66664 2011-01-10 12:00:54Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -292,4 +291,19 @@ wxControlWithItemsBase::InitCommandEventWithItems(wxCommandEvent& event, int n) } } +void wxControlWithItemsBase::SendSelectionChangedEvent(wxEventType eventType) +{ + const int n = GetSelection(); + if ( n == wxNOT_FOUND ) + return; + + wxCommandEvent event(eventType, m_windowId); + event.SetInt(n); + event.SetEventObject(this); + event.SetString(GetStringSelection()); + InitCommandEventWithItems(event, n); + + HandleWindowEvent(event); +} + #endif // wxUSE_CONTROLS diff --git a/Externals/wxWidgets3/src/common/datavcmn.cpp b/Externals/wxWidgets3/src/common/datavcmn.cpp index 2eb5731566..2cad362531 100644 --- a/Externals/wxWidgets3/src/common/datavcmn.cpp +++ b/Externals/wxWidgets3/src/common/datavcmn.cpp @@ -3,7 +3,6 @@ // Purpose: wxDataViewCtrl base classes and common parts // Author: Robert Roebling // Created: 2006/02/20 -// RCS-ID: $Id: datavcmn.cpp 70377 2012-01-17 14:05:17Z VS $ // Copyright: (c) 2006, Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -308,15 +307,6 @@ void wxDataViewModel::RemoveNotifier( wxDataViewModelNotifier *notifier ) int wxDataViewModel::Compare( const wxDataViewItem &item1, const wxDataViewItem &item2, unsigned int column, bool ascending ) const { - // sort branches before leaves - bool item1_is_container = IsContainer(item1); - bool item2_is_container = IsContainer(item2); - - if (item1_is_container && !item2_is_container) - return 1; - if (item2_is_container && !item1_is_container) - return -1; - wxVariant value1,value2; GetValue( value1, item1, column ); GetValue( value2, item2, column ); @@ -500,33 +490,6 @@ wxDataViewItem wxDataViewIndexListModel::GetItem( unsigned int row ) const return wxDataViewItem( m_hash[row] ); } -bool wxDataViewIndexListModel::HasDefaultCompare() const -{ - return !m_ordered; -} - -int wxDataViewIndexListModel::Compare(const wxDataViewItem& item1, - const wxDataViewItem& item2, - unsigned int WXUNUSED(column), - bool ascending) const -{ - if (m_ordered) - { - unsigned int pos1 = wxPtrToUInt(item1.GetID()); // -1 not needed here - unsigned int pos2 = wxPtrToUInt(item2.GetID()); // -1 not needed here - - if (ascending) - return pos1 - pos2; - else - return pos2 - pos1; - } - - if (ascending) - return GetRow(item1) - GetRow(item2); - - return GetRow(item2) - GetRow(item1); -} - unsigned int wxDataViewIndexListModel::GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const { if (item.IsOk()) @@ -686,7 +649,7 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la wxDataViewCtrl* dv_ctrl = GetOwner()->GetOwner(); // Before doing anything we send an event asking if editing of this item is really wanted. - wxDataViewEvent start_event( wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING, dv_ctrl->GetId() ); + wxDataViewEvent start_event( wxEVT_DATAVIEW_ITEM_START_EDITING, dv_ctrl->GetId() ); start_event.SetDataViewColumn( GetOwner() ); start_event.SetModel( dv_ctrl->GetModel() ); start_event.SetItem( item ); @@ -719,7 +682,7 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la #endif // Now we should send Editing Started event - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, dv_ctrl->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_EDITING_STARTED, dv_ctrl->GetId() ); event.SetDataViewColumn( GetOwner() ); event.SetModel( dv_ctrl->GetModel() ); event.SetItem( item ); @@ -742,6 +705,9 @@ void wxDataViewRendererBase::DestroyEditControl() wxPendingDelete.Append(handler); wxPendingDelete.Append(m_editorCtrl); + + // Ensure that DestroyEditControl() is not called again for this control. + m_editorCtrl.Release(); } void wxDataViewRendererBase::CancelEditing() @@ -770,7 +736,7 @@ bool wxDataViewRendererBase::FinishEditing() unsigned int col = GetOwner()->GetModelColumn(); // Now we should send Editing Done event - wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, dv_ctrl->GetId() ); + wxDataViewEvent event( wxEVT_DATAVIEW_ITEM_EDITING_DONE, dv_ctrl->GetId() ); event.SetDataViewColumn( GetOwner() ); event.SetModel( dv_ctrl->GetModel() ); event.SetItem( m_item ); @@ -805,6 +771,20 @@ void wxDataViewRendererBase::PrepareForItem(const wxDataViewModel *model, } +int wxDataViewRendererBase::GetEffectiveAlignment() const +{ + int alignment = GetAlignment(); + + if ( alignment == wxDVR_DEFAULT_ALIGNMENT ) + { + // if we don't have an explicit alignment ourselves, use that of the + // column in horizontal direction and default vertical alignment + alignment = GetOwner()->GetAlignment() | wxALIGN_CENTRE_VERTICAL; + } + + return alignment; +} + // ---------------------------------------------------------------------------- // wxDataViewCustomRendererBase // ---------------------------------------------------------------------------- @@ -841,40 +821,38 @@ wxDataViewCustomRendererBase::WXCallRender(wxRect rectCell, wxDC *dc, int state) // adjust the rectangle ourselves to account for the alignment wxRect rectItem = rectCell; - const int align = GetAlignment(); - if ( align != wxDVR_DEFAULT_ALIGNMENT ) + const int align = GetEffectiveAlignment(); + + const wxSize size = GetSize(); + + // take alignment into account only if there is enough space, otherwise + // show as much contents as possible + // + // notice that many existing renderers (e.g. wxDataViewSpinRenderer) + // return hard-coded size which can be more than they need and if we + // trusted their GetSize() we'd draw the text out of cell bounds + // entirely + + if ( size.x >= 0 && size.x < rectCell.width ) { - const wxSize size = GetSize(); + if ( align & wxALIGN_CENTER_HORIZONTAL ) + rectItem.x += (rectCell.width - size.x)/2; + else if ( align & wxALIGN_RIGHT ) + rectItem.x += rectCell.width - size.x; + // else: wxALIGN_LEFT is the default - // take alignment into account only if there is enough space, otherwise - // show as much contents as possible - // - // notice that many existing renderers (e.g. wxDataViewSpinRenderer) - // return hard-coded size which can be more than they need and if we - // trusted their GetSize() we'd draw the text out of cell bounds - // entirely + rectItem.width = size.x; + } - if ( size.x >= 0 && size.x < rectCell.width ) - { - if ( align & wxALIGN_CENTER_HORIZONTAL ) - rectItem.x += (rectCell.width - size.x)/2; - else if ( align & wxALIGN_RIGHT ) - rectItem.x += rectCell.width - size.x; - // else: wxALIGN_LEFT is the default + if ( size.y >= 0 && size.y < rectCell.height ) + { + if ( align & wxALIGN_CENTER_VERTICAL ) + rectItem.y += (rectCell.height - size.y)/2; + else if ( align & wxALIGN_BOTTOM ) + rectItem.y += rectCell.height - size.y; + // else: wxALIGN_TOP is the default - rectItem.width = size.x; - } - - if ( size.y >= 0 && size.y < rectCell.height ) - { - if ( align & wxALIGN_CENTER_VERTICAL ) - rectItem.y += (rectCell.height - size.y)/2; - else if ( align & wxALIGN_BOTTOM ) - rectItem.y += rectCell.height - size.y; - // else: wxALIGN_TOP is the default - - rectItem.height = size.y; - } + rectItem.height = size.y; } @@ -943,16 +921,8 @@ wxDataViewCustomRendererBase::RenderText(const wxString& text, } // get the alignment to use - int align = GetAlignment(); - if ( align == wxDVR_DEFAULT_ALIGNMENT ) - { - // if we don't have an explicit alignment ourselves, use that of the - // column in horizontal direction and default vertical alignment - align = GetOwner()->GetAlignment() | wxALIGN_CENTRE_VERTICAL; - } - dc->DrawLabel(ellipsizedText.empty() ? text : ellipsizedText, - rectText, align); + rectText, GetEffectiveAlignment()); } //----------------------------------------------------------------------------- @@ -1429,30 +1399,30 @@ void wxDataViewCtrlBase::StartEditor(const wxDataViewItem& item, unsigned int co IMPLEMENT_DYNAMIC_CLASS(wxDataViewEvent,wxNotifyEvent) -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_COLLAPSING, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_COLLAPSED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EXPANDING, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EXPANDED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EDITING_STARTED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_START_EDITING, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_SORTED, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_COLUMN_REORDERED, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_CACHE_HINT, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_CACHE_HINT, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent ); -wxDEFINE_EVENT( wxEVT_COMMAND_DATAVIEW_ITEM_DROP, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_BEGIN_DRAG, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE, wxDataViewEvent ); +wxDEFINE_EVENT( wxEVT_DATAVIEW_ITEM_DROP, wxDataViewEvent ); @@ -1738,12 +1708,17 @@ unsigned int wxDataViewListStore::GetColumnCount() const return m_cols.GetCount(); } +unsigned int wxDataViewListStore::GetItemCount() const +{ + return m_data.size(); +} + wxString wxDataViewListStore::GetColumnType( unsigned int pos ) const { return m_cols[pos]; } -void wxDataViewListStore::AppendItem( const wxVector &values, wxClientData *data ) +void wxDataViewListStore::AppendItem( const wxVector &values, wxUIntPtr data ) { wxDataViewListStoreLine *line = new wxDataViewListStoreLine( data ); line->m_values = values; @@ -1752,7 +1727,7 @@ void wxDataViewListStore::AppendItem( const wxVector &values, wxClien RowAppended(); } -void wxDataViewListStore::PrependItem( const wxVector &values, wxClientData *data ) +void wxDataViewListStore::PrependItem( const wxVector &values, wxUIntPtr data ) { wxDataViewListStoreLine *line = new wxDataViewListStoreLine( data ); line->m_values = values; @@ -1762,7 +1737,7 @@ void wxDataViewListStore::PrependItem( const wxVector &values, wxClie } void wxDataViewListStore::InsertItem( unsigned int row, const wxVector &values, - wxClientData *data ) + wxUIntPtr data ) { wxDataViewListStoreLine *line = new wxDataViewListStoreLine( data ); line->m_values = values; @@ -1794,6 +1769,22 @@ void wxDataViewListStore::DeleteAllItems() Reset( 0 ); } +void wxDataViewListStore::SetItemData( const wxDataViewItem& item, wxUIntPtr data ) +{ + wxDataViewListStoreLine* line = m_data[GetRow(item)]; + if (!line) return; + + line->SetData( data ); +} + +wxUIntPtr wxDataViewListStore::GetItemData( const wxDataViewItem& item ) const +{ + wxDataViewListStoreLine* line = m_data[GetRow(item)]; + if (!line) return static_cast(NULL); + + return line->GetData(); +} + void wxDataViewListStore::GetValueByRow( wxVariant &value, unsigned int row, unsigned int col ) const { wxDataViewListStoreLine *line = m_data[row]; @@ -2196,10 +2187,7 @@ void wxDataViewTreeStore::DeleteItem( const wxDataViewItem& item ) wxDataViewTreeStoreContainerNode *parent_node = FindContainerNode( parent_item ); if (!parent_node) return; - wxDataViewTreeStoreContainerNode *node = FindContainerNode( item ); - if (!node) return; - - parent_node->GetChildren().DeleteObject( node ); + parent_node->GetChildren().DeleteObject( FindNode(item) ); } void wxDataViewTreeStore::DeleteChildren( const wxDataViewItem& item ) diff --git a/Externals/wxWidgets3/src/common/datetime.cpp b/Externals/wxWidgets3/src/common/datetime.cpp index e131abdbc8..669d0a3269 100644 --- a/Externals/wxWidgets3/src/common/datetime.cpp +++ b/Externals/wxWidgets3/src/common/datetime.cpp @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 11.05.99 -// RCS-ID: $Id: datetime.cpp 70796 2012-03-04 00:29:31Z VZ $ // Copyright: (c) 1999 Vadim Zeitlin // parts of code taken from sndcal library by Scott E. Lee: // @@ -1130,10 +1129,37 @@ wxDateTime& wxDateTime::Set(const struct tm& tm) return *this; } - else + + // mktime() only adjusts tm_wday, tm_yday and tm_isdst fields normally, if + // it changed anything else, it must have performed the DST adjustment. But + // the trouble with this is that different implementations do it + // differently, e.g. GNU libc moves the time forward if the specified time + // is invalid in the local time zone, while MSVC CRT moves it backwards + // which is especially pernicious as it can change the date if the DST + // starts at midnight, as it does in some time zones (see #15419), and this + // is completely unexpected for the code working with dates only. + // + // So standardize on moving the time forwards to have consistent behaviour + // under all platforms and to avoid the problem above. + if ( tm2.tm_hour != tm.tm_hour ) { - return Set(timet); + tm2 = tm; + tm2.tm_hour++; + if ( tm2.tm_hour == 24 ) + { + // This shouldn't normally happen as the DST never starts at 23:00 + // but if it does, we have a problem as we need to adjust the day + // as well. However we stop here, i.e. we don't adjust the month + // (or the year) because mktime() is supposed to take care of this + // for us. + tm2.tm_hour = 0; + tm2.tm_mday++; + } + + timet = mktime(&tm2); } + + return Set(timet); } wxDateTime& wxDateTime::Set(wxDateTime_t hour, @@ -1602,6 +1628,56 @@ wxDateTime& wxDateTime::Add(const wxDateSpan& diff) return *this; } +wxDateSpan wxDateTime::DiffAsDateSpan(const wxDateTime& dt) const +{ + wxASSERT_MSG( IsValid() && dt.IsValid(), wxT("invalid wxDateTime")); + + // If dt is larger than this, calculations below needs to be inverted. + int inv = 1; + if ( dt > *this ) + inv = -1; + + int y = GetYear() - dt.GetYear(); + int m = GetMonth() - dt.GetMonth(); + int d = GetDay() - dt.GetDay(); + + // If month diff is negative, dt is the year before, so decrease year + // and set month diff to its inverse, e.g. January - December should be 1, + // not -11. + if ( m * inv < 0 || (m == 0 && d * inv < 0)) + { + m += inv * MONTHS_IN_YEAR; + y -= inv; + } + + // Same logic for days as for months above. + if ( d * inv < 0 ) + { + // Use number of days in month from the month which end date we're + // crossing. That is month before this for positive diff, and this + // month for negative diff. + // If we're on january and using previous month, we get december + // previous year, but don't care, december has same amount of days + // every year. + wxDateTime::Month monthfordays = GetMonth(); + if (inv > 0 && monthfordays == wxDateTime::Jan) + monthfordays = wxDateTime::Dec; + else if (inv > 0) + monthfordays = static_cast(monthfordays - 1); + + d += inv * wxDateTime::GetNumberOfDays(monthfordays, GetYear()); + m -= inv; + } + + int w = d / DAYS_PER_WEEK; + + // Remove weeks from d, since wxDateSpan only keep days as the ones + // not in complete weeks + d -= w * DAYS_PER_WEEK; + + return wxDateSpan(y, m, w, d); +} + // ---------------------------------------------------------------------------- // Weekday and monthday stuff // ---------------------------------------------------------------------------- @@ -1871,7 +1947,6 @@ wxDateTime::GetWeekOfYear(wxDateTime::WeekFlags flags, const TimeZone& tz) const { // adjust the weekdays to non-US style. wdYearStart = ConvertWeekDayToMondayBase(wdYearStart); - wdTarget = ConvertWeekDayToMondayBase(wdTarget); // quoting from http://www.cl.cam.ac.uk/~mgk25/iso-time.html: // @@ -1887,22 +1962,24 @@ wxDateTime::GetWeekOfYear(wxDateTime::WeekFlags flags, const TimeZone& tz) const // // if Jan 1 is Thursday or less, it is in the first week of this year - if ( wdYearStart < 4 ) - { - // count the number of entire weeks between Jan 1 and this date - week = (nDayInYear + wdYearStart + 6 - wdTarget)/7; + int dayCountFix = wdYearStart < 4 ? 6 : -1; - // be careful to check for overflow in the next year - if ( week == 53 && tm.mday - wdTarget > 28 ) - week = 1; - } - else // Jan 1 is in the last week of the previous year + // count the number of week + week = (nDayInYear + wdYearStart + dayCountFix) / DAYS_PER_WEEK; + + // check if we happen to be at the last week of previous year: + if ( week == 0 ) { - // check if we happen to be at the last week of previous year: - if ( tm.mon == Jan && tm.mday < 8 - wdYearStart ) - week = wxDateTime(31, Dec, GetYear()-1).GetWeekOfYear(); - else - week = (nDayInYear + wdYearStart - 1 - wdTarget)/7; + week = wxDateTime(31, Dec, GetYear() - 1).GetWeekOfYear(); + } + else if ( week == 53 ) + { + int wdYearEnd = (wdYearStart + 364 + IsLeapYear(GetYear())) + % DAYS_PER_WEEK; + + // Week 53 only if last day of year is Thursday or later. + if ( wdYearEnd < 3 ) + week = 1; } } diff --git a/Externals/wxWidgets3/src/common/datetimefmt.cpp b/Externals/wxWidgets3/src/common/datetimefmt.cpp index a96f09e2ce..4855025050 100644 --- a/Externals/wxWidgets3/src/common/datetimefmt.cpp +++ b/Externals/wxWidgets3/src/common/datetimefmt.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 11.05.99 -// RCS-ID: $Id: datetimefmt.cpp 70847 2012-03-09 01:09:25Z VZ $ // Copyright: (c) 1999 Vadim Zeitlin // parts of code taken from sndcal library by Scott E. Lee: // @@ -291,8 +290,14 @@ ParseFormatAt(wxString::const_iterator& p, const wxString str(p, end); wxString::const_iterator endParse; wxDateTime dt; - if ( dt.ParseFormat(str, fmt, &endParse) || - (!fmtAlt.empty() && dt.ParseFormat(str, fmtAlt, &endParse)) ) + + // Use a default date outside of the DST period to avoid problems with + // parsing the time differently depending on the today's date (which is used + // as the fall back date if none is explicitly specified). + static const wxDateTime dtDef(1, wxDateTime::Jan, 2012); + + if ( dt.ParseFormat(str, fmt, dtDef, &endParse) || + (!fmtAlt.empty() && dt.ParseFormat(str, fmtAlt, dtDef, &endParse)) ) { p += endParse - str.begin(); } @@ -508,7 +513,7 @@ wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const // (indirectly) set the year correctly while ( (nLostWeekDays % 7) != 0 ) { - nLostWeekDays += year++ % 4 ? 1 : 2; + nLostWeekDays += (year++ % 4) ? 1 : 2; } // finally move the year below 2000 so that the 2-digit @@ -649,6 +654,18 @@ wxString wxDateTime::Format(const wxString& formatp, const TimeZone& tz) const case wxT('z'): // time zone as [-+]HHMM { int ofs = tz.GetOffset(); + + // The time zone offset does not include the DST, but + // we do need to take it into account when showing the + // time in the local time zone to the user. + if ( ofs == -wxGetTimeZone() && IsDST() == 1 ) + { + // FIXME: As elsewhere in wxDateTime, we assume + // that the DST is always 1 hour, but this is not + // true in general. + ofs += 3600; + } + if ( ofs < 0 ) { res += '-'; @@ -929,6 +946,26 @@ wxDateTime::ParseRfc822Date(const wxString& date, wxString::const_iterator *end) return true; } +const char* wxDateTime::ParseRfc822Date(const char* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseRfc822Date(dateStr, &end) ) + return NULL; + + return date + dateStr.IterOffsetInMBStr(end); +} + +const wchar_t* wxDateTime::ParseRfc822Date(const wchar_t* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseRfc822Date(dateStr, &end) ) + return NULL; + + return date + (end - dateStr.begin()); +} + bool wxDateTime::ParseFormat(const wxString& date, const wxString& format, @@ -1563,6 +1600,32 @@ wxDateTime::ParseFormat(const wxString& date, return true; } +const char* +wxDateTime::ParseFormat(const char* date, + const wxString& format, + const wxDateTime& dateDef) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseFormat(dateStr, format, dateDef, &end) ) + return NULL; + + return date + dateStr.IterOffsetInMBStr(end); +} + +const wchar_t* +wxDateTime::ParseFormat(const wchar_t* date, + const wxString& format, + const wxDateTime& dateDef) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseFormat(dateStr, format, dateDef, &end) ) + return NULL; + + return date + (end - dateStr.begin()); +} + bool wxDateTime::ParseDateTime(const wxString& date, wxString::const_iterator *end) { @@ -1616,6 +1679,26 @@ wxDateTime::ParseDateTime(const wxString& date, wxString::const_iterator *end) return true; } +const char* wxDateTime::ParseDateTime(const char* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseDateTime(dateStr, &end) ) + return NULL; + + return date + dateStr.IterOffsetInMBStr(end); +} + +const wchar_t* wxDateTime::ParseDateTime(const wchar_t* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseDateTime(dateStr, &end) ) + return NULL; + + return date + (end - dateStr.begin()); +} + bool wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end) { @@ -1653,12 +1736,12 @@ wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end) if ( len > lenRest ) continue; - const wxString::const_iterator pEnd = p + len; - if ( wxString(p, pEnd).CmpNoCase(dateStr) == 0 ) + const wxString::const_iterator pEndStr = p + len; + if ( wxString(p, pEndStr).CmpNoCase(dateStr) == 0 ) { // nothing can follow this, so stop here - p = pEnd; + p = pEndStr; int dayDiffFromToday = literalDates[n].dayDiffFromToday; *this = Today(); @@ -1667,7 +1750,7 @@ wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end) *this += wxDateSpan::Days(dayDiffFromToday); } - *end = pEnd; + *end = pEndStr; return true; } @@ -1973,6 +2056,26 @@ wxDateTime::ParseDate(const wxString& date, wxString::const_iterator *end) return true; } +const char* wxDateTime::ParseDate(const char* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseDate(dateStr, &end) ) + return NULL; + + return date + dateStr.IterOffsetInMBStr(end); +} + +const wchar_t* wxDateTime::ParseDate(const wchar_t* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseDate(dateStr, &end) ) + return NULL; + + return date + (end - dateStr.begin()); +} + bool wxDateTime::ParseTime(const wxString& time, wxString::const_iterator *end) { @@ -2013,6 +2116,8 @@ wxDateTime::ParseTime(const wxString& time, wxString::const_iterator *end) "%H:%M:%S", // could be the same or 24 hour one so try it too "%I:%M %p", // 12hour with AM/PM but without seconds "%H:%M", // and a possibly 24 hour version without seconds + "%I %p", // just hour with AM/AM + "%H", // just hour in 24 hour version "%X", // possibly something from above or maybe something // completely different -- try it last @@ -2028,6 +2133,26 @@ wxDateTime::ParseTime(const wxString& time, wxString::const_iterator *end) return false; } +const char* wxDateTime::ParseTime(const char* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseTime(dateStr, &end) ) + return NULL; + + return date + dateStr.IterOffsetInMBStr(end); +} + +const wchar_t* wxDateTime::ParseTime(const wchar_t* date) +{ + wxString::const_iterator end; + wxString dateStr(date); + if ( !ParseTime(dateStr, &end) ) + return NULL; + + return date + (end - dateStr.begin()); +} + // ---------------------------------------------------------------------------- // Workdays and holidays support // ---------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/src/common/datstrm.cpp b/Externals/wxWidgets3/src/common/datstrm.cpp index 9b271ce7ee..904e692e51 100644 --- a/Externals/wxWidgets3/src/common/datstrm.cpp +++ b/Externals/wxWidgets3/src/common/datstrm.cpp @@ -4,7 +4,6 @@ // Author: Guilhem Lavaux // Modified by: Mickael Gilabert // Created: 28/06/98 -// RCS-ID: $Id: datstrm.cpp 61764 2009-08-26 20:44:01Z VZ $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -24,34 +23,69 @@ #include "wx/math.h" #endif //WX_PRECOMP -// --------------------------------------------------------------------------- -// wxDataInputStream -// --------------------------------------------------------------------------- - -#if wxUSE_UNICODE -wxDataInputStream::wxDataInputStream(wxInputStream& s, const wxMBConv& conv) - : m_input(&s), m_be_order(false), m_conv(conv.Clone()) -#else -wxDataInputStream::wxDataInputStream(wxInputStream& s) - : m_input(&s), m_be_order(false) -#endif +namespace { + +// helper unions used to swap bytes of floats and doubles +union Float32Data +{ + wxFloat32 f; + wxUint32 i; +}; + +union Float64Data +{ + wxFloat64 f; + wxUint32 i[2]; +}; + +} // anonymous namespace + +// ---------------------------------------------------------------------------- +// wxDataStreamBase +// ---------------------------------------------------------------------------- + +wxDataStreamBase::wxDataStreamBase(const wxMBConv& conv) +#if wxUSE_UNICODE + : m_conv(conv.Clone()) +#endif // wxUSE_UNICODE +{ + // It is unused in non-Unicode build, so suppress a warning there. + wxUnusedVar(conv); + + m_be_order = false; + + // For compatibility with the existing data files, we use extended + // precision if it is available, i.e. if wxUSE_APPLE_IEEE is on. +#if wxUSE_APPLE_IEEE + m_useExtendedPrecision = true; +#endif // wxUSE_APPLE_IEEE } -wxDataInputStream::~wxDataInputStream() +#if wxUSE_UNICODE +void wxDataStreamBase::SetConv( const wxMBConv &conv ) +{ + delete m_conv; + m_conv = conv.Clone(); +} +#endif + +wxDataStreamBase::~wxDataStreamBase() { #if wxUSE_UNICODE delete m_conv; #endif // wxUSE_UNICODE } -#if wxUSE_UNICODE -void wxDataInputStream::SetConv( const wxMBConv &conv ) +// --------------------------------------------------------------------------- +// wxDataInputStream +// --------------------------------------------------------------------------- + +wxDataInputStream::wxDataInputStream(wxInputStream& s, const wxMBConv& conv) + : wxDataStreamBase(conv), + m_input(&s) { - delete m_conv; - m_conv = conv.Clone(); } -#endif #if wxHAS_INT64 wxUint64 wxDataInputStream::Read64() @@ -97,13 +131,48 @@ wxUint8 wxDataInputStream::Read8() double wxDataInputStream::ReadDouble() { #if wxUSE_APPLE_IEEE - char buf[10]; + if ( m_useExtendedPrecision ) + { + char buf[10]; - m_input->Read(buf, 10); - return wxConvertFromIeeeExtended((const wxInt8 *)buf); -#else - return 0.0; -#endif + m_input->Read(buf, 10); + return wxConvertFromIeeeExtended((const wxInt8 *)buf); + } + else +#endif // wxUSE_APPLE_IEEE + { + Float64Data floatData; + + if ( m_be_order == (wxBYTE_ORDER == wxBIG_ENDIAN) ) + { + floatData.i[0] = Read32(); + floatData.i[1] = Read32(); + } + else + { + floatData.i[1] = Read32(); + floatData.i[0] = Read32(); + } + + return static_cast(floatData.f); + } +} + +float wxDataInputStream::ReadFloat() +{ +#if wxUSE_APPLE_IEEE + if ( m_useExtendedPrecision ) + { + return (float)ReadDouble(); + } + else +#endif // wxUSE_APPLE_IEEE + { + Float32Data floatData; + + floatData.i = Read32(); + return static_cast(floatData.f); + } } wxString wxDataInputStream::ReadString() @@ -114,11 +183,10 @@ wxString wxDataInputStream::ReadString() if ( len > 0 ) { #if wxUSE_UNICODE - wxCharBuffer tmp(len + 1); + wxCharBuffer tmp(len); if ( tmp ) { m_input->Read(tmp.data(), len); - tmp.data()[len] = '\0'; ret = m_conv->cMB2WX(tmp.data()); } #else @@ -378,6 +446,14 @@ void wxDataInputStream::ReadDouble(double *buffer, size_t size) } } +void wxDataInputStream::ReadFloat(float *buffer, size_t size) +{ + for (wxUint32 i=0; i>(wxString& s) { s = ReadString(); @@ -448,15 +524,15 @@ wxDataInputStream& wxDataInputStream::operator>>(wxLongLong& i) } #endif // wxLongLong_t -wxDataInputStream& wxDataInputStream::operator>>(double& i) +wxDataInputStream& wxDataInputStream::operator>>(double& d) { - i = ReadDouble(); + d = ReadDouble(); return *this; } wxDataInputStream& wxDataInputStream::operator>>(float& f) { - f = (float)ReadDouble(); + f = ReadFloat(); return *this; } @@ -464,31 +540,12 @@ wxDataInputStream& wxDataInputStream::operator>>(float& f) // wxDataOutputStream // --------------------------------------------------------------------------- -#if wxUSE_UNICODE wxDataOutputStream::wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv) - : m_output(&s), m_be_order(false), m_conv(conv.Clone()) -#else -wxDataOutputStream::wxDataOutputStream(wxOutputStream& s) - : m_output(&s), m_be_order(false) -#endif + : wxDataStreamBase(conv), + m_output(&s) { } -wxDataOutputStream::~wxDataOutputStream() -{ -#if wxUSE_UNICODE - delete m_conv; -#endif // wxUSE_UNICODE -} - -#if wxUSE_UNICODE -void wxDataOutputStream::SetConv( const wxMBConv &conv ) -{ - delete m_conv; - m_conv = conv.Clone(); -} -#endif - #if wxHAS_INT64 void wxDataOutputStream::Write64(wxUint64 i) { @@ -544,22 +601,49 @@ void wxDataOutputStream::WriteString(const wxString& string) void wxDataOutputStream::WriteDouble(double d) { - char buf[10]; - #if wxUSE_APPLE_IEEE - wxConvertToIeeeExtended(d, (wxInt8 *)buf); -#else - wxUnusedVar(d); -#if !defined(__VMS__) && !defined(__GNUG__) -#ifdef _MSC_VER -# pragma message("wxDataOutputStream::WriteDouble() not using IeeeExtended - will not work!") -#else -# pragma warning "wxDataOutputStream::WriteDouble() not using IeeeExtended - will not work!" -#endif -#endif - buf[0] = '\0'; -#endif - m_output->Write(buf, 10); + if ( m_useExtendedPrecision ) + { + char buf[10]; + + wxConvertToIeeeExtended(d, (wxInt8 *)buf); + m_output->Write(buf, 10); + } + else +#endif // wxUSE_APPLE_IEEE + { + Float64Data floatData; + + floatData.f = (wxFloat64)d; + + if ( m_be_order == (wxBYTE_ORDER == wxBIG_ENDIAN) ) + { + Write32(floatData.i[0]); + Write32(floatData.i[1]); + } + else + { + Write32(floatData.i[1]); + Write32(floatData.i[0]); + } + } +} + +void wxDataOutputStream::WriteFloat(float f) +{ +#if wxUSE_APPLE_IEEE + if ( m_useExtendedPrecision ) + { + WriteDouble((double)f); + } + else +#endif // wxUSE_APPLE_IEEE + { + Float32Data floatData; + + floatData.f = (wxFloat32)f; + Write32(floatData.i); + } } #if wxHAS_INT64 @@ -673,6 +757,14 @@ void wxDataOutputStream::WriteDouble(const double *buffer, size_t size) } } +void wxDataOutputStream::WriteFloat(const float *buffer, size_t size) +{ + for (wxUint32 i=0; i widthTextMax ) - widthTextMax = widthLine; - heightTextTotal += heightLine; - } - - if ( pc == text.end() ) - { - break; - } - else // '\n' - { - curLine.clear(); - } - } - else - { - curLine += *pc; - } - } - - if ( x ) - *x = widthTextMax; - if ( y ) - *y = heightTextTotal; - if ( h ) - *h = heightLine; + wxTextMeasure tm(GetOwner(), font && font->IsOk() ? font : &m_font); + tm.GetMultiLineTextExtent(text, x, y, h); } void wxDCImpl::DoDrawCheckMark(wxCoord x1, wxCoord y1, @@ -718,8 +622,8 @@ void wxDCImpl::DrawPolygon(const wxPointList *list, void wxDCImpl::DoDrawPolyPolygon(int n, - int count[], - wxPoint points[], + const int count[], + const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle) { @@ -769,11 +673,11 @@ void wxDCImpl::DrawSpline(wxCoord x1, wxCoord y1, DrawSpline(WXSIZEOF(points), points); } -void wxDCImpl::DrawSpline(int n, wxPoint points[]) +void wxDCImpl::DrawSpline(int n, const wxPoint points[]) { wxPointList list; for ( int i = 0; i < n; i++ ) - list.Append(&points[i]); + list.Append(const_cast(&points[i])); DrawSpline(&list); } @@ -895,7 +799,7 @@ void wxDCImpl::DoDrawSpline( const wxPointList *points ) { wxCHECK_RET( IsOk(), wxT("invalid window dc") ); - wxPoint *p; + const wxPoint *p; double cx1, cy1, cx2, cy2, cx3, cy3, cx4, cy4; double x1, y1, x2, y2; @@ -904,7 +808,7 @@ void wxDCImpl::DoDrawSpline( const wxPointList *points ) // empty list return; - p = (wxPoint *)node->GetData(); + p = node->GetData(); x1 = p->x; y1 = p->y; @@ -1292,7 +1196,7 @@ void wxDC::DrawLabel(const wxString& text, { if ( pc - text.begin() == indexAccel ) { - // remeber to draw underscore here + // remember to draw underscore here GetTextExtent(curLine, &startUnderscore, NULL); curLine += *pc; GetTextExtent(curLine, &endUnderscore, NULL); diff --git a/Externals/wxWidgets3/src/common/dcbufcmn.cpp b/Externals/wxWidgets3/src/common/dcbufcmn.cpp index 8b230ad299..ee50d2311a 100644 --- a/Externals/wxWidgets3/src/common/dcbufcmn.cpp +++ b/Externals/wxWidgets3/src/common/dcbufcmn.cpp @@ -4,7 +4,6 @@ // Author: Ron Lee, Jaakko Salli // Modified by: // Created: Sep-20-2006 -// RCS-ID: $Id: dcbufcmn.cpp 67659 2011-05-01 15:47:46Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -114,7 +113,10 @@ void wxBufferedDC::UseBuffer(wxCoord w, wxCoord h) m_buffer = wxSharedDCBufferManager::GetBuffer(w, h); m_style |= wxBUFFER_USES_SHARED_BUFFER; + m_area.Set(w,h); } + else + m_area = m_buffer->GetSize(); SelectObject(*m_buffer); @@ -138,21 +140,24 @@ void wxBufferedDC::UnMask() if ( m_style & wxBUFFER_CLIENT_AREA ) GetDeviceOrigin(&x, &y); - // avoid blitting too much: if we were created for a bigger bitmap (and - // reused for a smaller one later) we should only blit the real bitmap area - // and not the full allocated back buffer - int widthDC, - heightDC; + // It's possible that the buffer may be bigger than the area that needs to + // be drawn (the client size of the window is smaller than the bitmap, or + // a shared bitmap has been reused for a smaller area, etc.) so avoid + // blitting too much if possible, but only use the real DC size if the + // wxBUFFER_VIRTUAL_AREA style is not set. + int width = m_area.GetWidth(), + height = m_area.GetHeight(); - m_dc->GetSize(&widthDC, &heightDC); + if (! m_style & wxBUFFER_VIRTUAL_AREA) + { + int widthDC, + heightDC; + m_dc->GetSize(&widthDC, &heightDC); + width = wxMin(width, widthDC); + height = wxMin(height, heightDC); + } - int widthBuf = m_buffer->GetWidth(), - heightBuf = m_buffer->GetHeight(); - - m_dc->Blit(0, 0, - wxMin(widthDC, widthBuf), wxMin(heightDC, heightBuf), - this, - -x, -y); + m_dc->Blit(0, 0, width, height, this, -x, -y); m_dc = NULL; if ( m_style & wxBUFFER_USES_SHARED_BUFFER ) diff --git a/Externals/wxWidgets3/src/common/dcgraph.cpp b/Externals/wxWidgets3/src/common/dcgraph.cpp index 633c482240..a44ac2cb91 100644 --- a/Externals/wxWidgets3/src/common/dcgraph.cpp +++ b/Externals/wxWidgets3/src/common/dcgraph.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: -// RCS-ID: $Id: dcgraph.cpp 70844 2012-03-08 17:06:06Z PC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -18,24 +17,12 @@ #if wxUSE_GRAPHICS_CONTEXT -#include "wx/graphics.h" #include "wx/dcgraph.h" #ifndef WX_PRECOMP #include "wx/icon.h" - #include "wx/bitmap.h" + #include "wx/dcclient.h" #include "wx/dcmemory.h" - #include "wx/region.h" -#endif - -#include "wx/dcclient.h" - -#ifdef __WXOSX_OR_COCOA__ -#ifdef __WXOSX_IPHONE__ - #include -#else - #include -#endif #endif //----------------------------------------------------------------------------- @@ -155,7 +142,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxGCDCImpl, wxDCImpl) wxGCDCImpl::wxGCDCImpl( wxDC *owner ) : wxDCImpl( owner ) { - Init(); + Init(wxGraphicsContext::Create()); } void wxGCDCImpl::SetGraphicsContext( wxGraphicsContext* ctx ) @@ -177,26 +164,21 @@ void wxGCDCImpl::SetGraphicsContext( wxGraphicsContext* ctx ) wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxWindowDC& dc ) : wxDCImpl( owner ) { - Init(); - SetGraphicsContext( wxGraphicsContext::Create(dc) ); + Init(wxGraphicsContext::Create(dc)); m_window = dc.GetWindow(); } wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxMemoryDC& dc ) : wxDCImpl( owner ) { - Init(); - wxGraphicsContext* context; - context = wxGraphicsContext::Create(dc); - SetGraphicsContext( context ); + Init(wxGraphicsContext::Create(dc)); } #if wxUSE_PRINTING_ARCHITECTURE wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ) : wxDCImpl( owner ) { - Init(); - SetGraphicsContext( wxGraphicsContext::Create(dc) ); + Init(wxGraphicsContext::Create(dc)); } #endif @@ -204,12 +186,18 @@ wxGCDCImpl::wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ) : wxGCDCImpl::wxGCDCImpl(wxDC *owner, const wxEnhMetaFileDC& dc) : wxDCImpl(owner) { - Init(); - SetGraphicsContext(wxGraphicsContext::Create(dc)); + Init(wxGraphicsContext::Create(dc)); } #endif -void wxGCDCImpl::Init() +wxGCDCImpl::wxGCDCImpl(wxDC* owner, int) + : wxDCImpl(owner) +{ + // derived class will set a context + Init(NULL); +} + +void wxGCDCImpl::Init(wxGraphicsContext* ctx) { m_ok = false; m_colour = true; @@ -220,11 +208,13 @@ void wxGCDCImpl::Init() m_font = *wxNORMAL_FONT; m_brush = *wxWHITE_BRUSH; - m_graphicContext = wxGraphicsContext::Create(); + m_graphicContext = NULL; + if (ctx) + SetGraphicsContext(ctx); + m_logicalFunctionSupported = true; } - wxGCDCImpl::~wxGCDCImpl() { delete m_graphicContext; @@ -236,8 +226,8 @@ void wxGCDCImpl::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawBitmap - invalid DC") ); wxCHECK_RET( bmp.IsOk(), wxT("wxGCDC(cg)::DoDrawBitmap - invalid bitmap") ); - int w = bmp.GetWidth(); - int h = bmp.GetHeight(); + int w = bmp.GetScaledWidth(); + int h = bmp.GetScaledHeight(); if ( bmp.GetDepth() == 1 ) { m_graphicContext->SetPen(*wxTRANSPARENT_PEN); @@ -298,22 +288,8 @@ void wxGCDCImpl::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord w, wxCoord h wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoSetClippingRegion - invalid DC") ); m_graphicContext->Clip( x, y, w, h ); - if ( m_clipping ) - { - m_clipX1 = wxMax( m_clipX1, x ); - m_clipY1 = wxMax( m_clipY1, y ); - m_clipX2 = wxMin( m_clipX2, (x + w) ); - m_clipY2 = wxMin( m_clipY2, (y + h) ); - } - else - { - m_clipping = true; - m_clipX1 = x; - m_clipY1 = y; - m_clipX2 = x + w; - m_clipY2 = y + h; - } + wxDCImpl::DoSetClippingRegion(x, y, w, h); } void wxGCDCImpl::DoSetDeviceClippingRegion( const wxRegion ®ion ) @@ -385,7 +361,7 @@ void wxGCDCImpl::SetTextForeground( const wxColour &col ) // don't set m_textForegroundColour to an invalid colour as we'd crash // later then (we use m_textForegroundColour.GetColor() without checking // in a few places) - if ( col.IsOk() && col != m_textForegroundColour ) + if ( col.IsOk() ) { m_textForegroundColour = col; m_graphicContext->SetFont( m_font, m_textForegroundColour ); @@ -399,35 +375,6 @@ void wxGCDCImpl::SetTextBackground( const wxColour &col ) m_textBackgroundColour = col; } -void wxGCDCImpl::SetMapMode( wxMappingMode mode ) -{ - switch (mode) - { - case wxMM_TWIPS: - SetLogicalScale( twips2mm * m_mm_to_pix_x, twips2mm * m_mm_to_pix_y ); - break; - - case wxMM_POINTS: - SetLogicalScale( pt2mm * m_mm_to_pix_x, pt2mm * m_mm_to_pix_y ); - break; - - case wxMM_METRIC: - SetLogicalScale( m_mm_to_pix_x, m_mm_to_pix_y ); - break; - - case wxMM_LOMETRIC: - SetLogicalScale( m_mm_to_pix_x / 10.0, m_mm_to_pix_y / 10.0 ); - break; - - case wxMM_TEXT: - default: - SetLogicalScale( 1.0, 1.0 ); - break; - } - - ComputeScaleAndOrigin(); -} - wxSize wxGCDCImpl::GetPPI() const { return wxSize(72, 72); @@ -448,7 +395,7 @@ void wxGCDCImpl::ComputeScaleAndOrigin() // the logical origin sets the origin to have new coordinates m_matrixCurrent.Translate( m_deviceOriginX - m_logicalOriginX * m_signX * m_scaleX, - m_deviceOriginY-m_logicalOriginY * m_signY * m_scaleY); + m_deviceOriginY - m_logicalOriginY * m_signY * m_scaleY); m_matrixCurrent.Scale( m_scaleX * m_signX, m_scaleY * m_signY ); @@ -457,6 +404,16 @@ void wxGCDCImpl::ComputeScaleAndOrigin() } } +void* wxGCDCImpl::GetHandle() const +{ + void* cgctx = NULL; + wxGraphicsContext* gc = GetGraphicsContext(); + if (gc) { + cgctx = gc->GetNativeContext(); + } + return cgctx; +} + void wxGCDCImpl::SetPalette( const wxPalette& WXUNUSED(palette) ) { @@ -472,18 +429,12 @@ void wxGCDCImpl::SetFont( const wxFont &font ) m_font = font; if ( m_graphicContext ) { - wxFont f = font; - if ( f.IsOk() ) - f.SetPointSize( /*LogicalToDeviceYRel*/(font.GetPointSize())); - m_graphicContext->SetFont( f, m_textForegroundColour ); + m_graphicContext->SetFont(font, m_textForegroundColour); } } void wxGCDCImpl::SetPen( const wxPen &pen ) { - if ( m_pen == pen ) - return; - m_pen = pen; if ( m_graphicContext ) { @@ -493,9 +444,6 @@ void wxGCDCImpl::SetPen( const wxPen &pen ) void wxGCDCImpl::SetBrush( const wxBrush &brush ) { - if (m_brush == brush) - return; - m_brush = brush; if ( m_graphicContext ) { @@ -505,9 +453,6 @@ void wxGCDCImpl::SetBrush( const wxBrush &brush ) void wxGCDCImpl::SetBackground( const wxBrush &brush ) { - if (m_backgroundBrush == brush) - return; - m_backgroundBrush = brush; if (!m_backgroundBrush.IsOk()) return; @@ -515,9 +460,6 @@ void wxGCDCImpl::SetBackground( const wxBrush &brush ) void wxGCDCImpl::SetLogicalFunction( wxRasterOperationMode function ) { - if (m_logicalFunction == function) - return; - m_logicalFunction = function; wxCompositionMode mode = TranslateRasterOp( function ); @@ -665,7 +607,7 @@ void wxGCDCImpl::DoDrawPoint( wxCoord x, wxCoord y ) DoDrawLine( x , y , x + 1 , y + 1 ); } -void wxGCDCImpl::DoDrawLines(int n, wxPoint points[], +void wxGCDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset) { wxCHECK_RET( IsOk(), wxT("wxGCDC(cg)::DoDrawLines - invalid DC") ); @@ -699,7 +641,7 @@ void wxGCDCImpl::DoDrawSpline(const wxPointList *points) // empty list return; - wxPoint *p = node->GetData(); + const wxPoint *p = node->GetData(); wxCoord x1 = p->x; wxCoord y1 = p->y; @@ -743,7 +685,7 @@ void wxGCDCImpl::DoDrawSpline(const wxPointList *points) } #endif // wxUSE_SPLINES -void wxGCDCImpl::DoDrawPolygon( int n, wxPoint points[], +void wxGCDCImpl::DoDrawPolygon( int n, const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle ) { @@ -772,8 +714,8 @@ void wxGCDCImpl::DoDrawPolygon( int n, wxPoint points[], } void wxGCDCImpl::DoDrawPolyPolygon(int n, - int count[], - wxPoint points[], + const int count[], + const wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle) @@ -1089,7 +1031,10 @@ void wxGCDCImpl::Clear(void) m_graphicContext->SetPen( p ); wxCompositionMode formerMode = m_graphicContext->GetCompositionMode(); m_graphicContext->SetCompositionMode(wxCOMPOSITION_SOURCE); - DoDrawRectangle( 0, 0, 32000 , 32000 ); + // maximum positive coordinate Cairo can handle is 2^23 - 1 + DoDrawRectangle( + DeviceToLogicalX(0), DeviceToLogicalY(0), + DeviceToLogicalXRel(0x007fffff), DeviceToLogicalYRel(0x007fffff)); m_graphicContext->SetCompositionMode(formerMode); m_graphicContext->SetPen( m_pen ); m_graphicContext->SetBrush( m_brush ); @@ -1147,6 +1092,7 @@ void wxGCDCImpl::DoGradientFillLinear(const wxRect& rect, m_graphicContext->SetPen(*wxTRANSPARENT_PEN); m_graphicContext->DrawRectangle(rect.x,rect.y,rect.width,rect.height); m_graphicContext->SetPen(m_pen); + m_graphicContext->SetBrush(m_brush); } void wxGCDCImpl::DoGradientFillConcentric(const wxRect& rect, @@ -1175,6 +1121,7 @@ void wxGCDCImpl::DoGradientFillConcentric(const wxRect& rect, m_graphicContext->DrawRectangle(rect.x,rect.y,rect.width,rect.height); m_graphicContext->SetPen(m_pen); + m_graphicContext->SetBrush(m_brush); } void wxGCDCImpl::DoDrawCheckMark(wxCoord x, wxCoord y, diff --git a/Externals/wxWidgets3/src/common/dcsvg.cpp b/Externals/wxWidgets3/src/common/dcsvg.cpp index 5f4514e9bb..6fd0c2a46f 100644 --- a/Externals/wxWidgets3/src/common/dcsvg.cpp +++ b/Externals/wxWidgets3/src/common/dcsvg.cpp @@ -3,7 +3,6 @@ // Purpose: SVG sample // Author: Chris Elliott // Modified by: -// RCS-ID: $Id: dcsvg.cpp 67883 2011-06-07 22:27:35Z VZ $ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -130,6 +129,9 @@ void wxSVGFileDCImpl::Init (const wxString &filename, int Width, int Height, dou m_OK = true; + m_clipUniqueId = 0; + m_clipNestingLevel = 0; + m_mm_to_pix_x = dpi/25.4; m_mm_to_pix_y = dpi/25.4; @@ -153,21 +155,21 @@ void wxSVGFileDCImpl::Init (const wxString &filename, int Width, int Height, dou m_filename = filename; m_sub_images = 0; wxString s; - s = wxT("") + wxString(wxT("\n")); + s = wxT("\n"); write(s); - s = wxT(" ") + wxString(wxT("\n")); + s = wxT("\"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n"); write(s); - s = wxT(" \n"), NumStr(float(Width)/dpi*2.54), NumStr(float(Height)/dpi*2.54), Width, Height ); + s.Printf( wxT(" width=\"%scm\" height=\"%scm\" viewBox=\"0 0 %d %d \">\n"), NumStr(float(Width)/dpi*2.54), NumStr(float(Height)/dpi*2.54), Width, Height ); write(s); - s = wxT("SVG Picture created as ") + wxFileName(filename).GetFullName() + wxT(" ") + wxT("\n"); + s = wxT("SVG Picture created as ") + wxFileName(filename).GetFullName() + wxT(" \n"); write(s); - s = wxString (wxT("Picture generated by wxSVG ")) + wxSVGVersion + wxT(" ")+ wxT("\n"); + s = wxString (wxT("Picture generated by wxSVG ")) + wxSVGVersion + wxT(" \n"); write(s); - s = wxT("") + wxString(wxT("\n")); + s = wxT("\n"); write(s); } } @@ -195,7 +197,7 @@ wxSize wxSVGFileDCImpl::GetPPI() const void wxSVGFileDCImpl::DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) { - if (m_graphics_changed) NewGraphics(); + NewGraphicsIfNeeded(); wxString s; s.Printf ( wxT(" \n"), x1,y1,x2,y2 ); if (m_OK) @@ -206,7 +208,7 @@ void wxSVGFileDCImpl::DoDrawLine (wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 CalcBoundingBox(x2, y2); } -void wxSVGFileDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset , wxCoord yoffset ) +void wxSVGFileDCImpl::DoDrawLines(int n, const wxPoint points[], wxCoord xoffset , wxCoord yoffset ) { for ( int i = 1; i < n; i++ ) { @@ -218,8 +220,8 @@ void wxSVGFileDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset , wxC void wxSVGFileDCImpl::DoDrawPoint (wxCoord x1, wxCoord y1) { wxString s; - if (m_graphics_changed) NewGraphics(); - s = wxT(" ") + wxString(wxT("\n")); + NewGraphicsIfNeeded(); + s = wxT(" \n"); write(s); DoDrawLine ( x1,y1,x1,y1 ); s = wxT(""); @@ -239,7 +241,7 @@ void wxSVGFileDCImpl::DoDrawText(const wxString& text, wxCoord x1, wxCoord y1) void wxSVGFileDCImpl::DoDrawRotatedText(const wxString& sText, wxCoord x, wxCoord y, double angle) { //known bug; if the font is drawn in a scaled DC, it will not behave exactly as wxMSW - if (m_graphics_changed) NewGraphics(); + NewGraphicsIfNeeded(); wxString s, sTmp; // calculate bounding box @@ -253,23 +255,26 @@ void wxSVGFileDCImpl::DoDrawRotatedText(const wxString& sText, wxCoord x, wxCoor CalcBoundingBox((wxCoord)(x + w*cos(rad)), (wxCoord)(y - h*sin(rad))); // wxT("bottom left") and wxT("bottom right") - x += (wxCoord)(h*sin(rad)); - y += (wxCoord)(h*cos(rad)); - CalcBoundingBox(x, y); CalcBoundingBox((wxCoord)(x + h*sin(rad)), (wxCoord)(y + h*cos(rad))); + CalcBoundingBox((wxCoord)(x + h*sin(rad) + w*cos(rad)), (wxCoord)(y + h*cos(rad) - w*sin(rad))); if (m_backgroundMode == wxBRUSHSTYLE_SOLID) { // draw background first // just like DoDrawRectangle except we pass the text color to it and set the border to a 1 pixel wide text background - sTmp.Printf ( wxT(" "), NumStr(-angle), x,y ); s += sTmp + wxT("\n"); write(s); } + + // convert x,y to SVG text x,y (the coordinates of the text baseline) + x = (wxCoord)(x + (h-desc)*sin(rad)); + y = (wxCoord)(y + (h-desc)*cos(rad)); + //now do the text itself s.Printf (wxT(" \n" + "\n" + "\n" + "\n" + "\n" + "\n" + "\n"; + + write(svg); + + // Re-apply current graphics to ensure proper xml nesting + DoStartNewGraphics(); + + m_clipUniqueId++; + m_clipNestingLevel++; +} + +void wxSVGFileDCImpl::DestroyClippingRegion() +{ + wxString svg; + + // End current graphics element to ensure proper xml nesting (e.g. graphics + // might have been changed inside the clipping region) + svg << "\n"; + + // Close clipping group elements + for ( size_t i = 0; i < m_clipUniqueId; i++ ) + { + svg << ""; + } + svg << "\n"; + + write(svg); + + // Re-apply current graphics (e.g. brush may have been changed inside one + // of the clipped regions - that change will have been lost after xml + // elements for the clipped region have been closed). + DoStartNewGraphics(); + + m_clipUniqueId = 0; +} + void wxSVGFileDCImpl::DoGetTextExtent(const wxString& string, wxCoord *w, wxCoord *h, wxCoord *descent , wxCoord *externalLeading , const wxFont *font) const { @@ -512,7 +570,6 @@ void wxSVGFileDCImpl::SetBackgroundMode( int mode ) void wxSVGFileDCImpl::SetBrush(const wxBrush& brush) - { m_brush = brush; @@ -529,11 +586,23 @@ void wxSVGFileDCImpl::SetPen(const wxPen& pen) m_graphics_changed = true; } -void wxSVGFileDCImpl::NewGraphics() +void wxSVGFileDCImpl::NewGraphicsIfNeeded() { - wxString s, sBrush, sPenCap, sPenJoin, sPenStyle, sLast, sWarn; + if ( !m_graphics_changed ) + return; - sBrush = wxT("\n\n")); + + DoStartNewGraphics(); +} + +void wxSVGFileDCImpl::DoStartNewGraphics() +{ + wxString s, sBrush, sPenCap, sPenJoin, sPenStyle, sLast; + + sBrush = wxS(""), m_pen.GetWidth(), NumStr(m_logicalOriginX), NumStr(m_logicalOriginY), NumStr(m_scaleX), NumStr(m_scaleY) ); - s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + wxT("\n") + sWarn; + s = sBrush + sPenCap + sPenJoin + sPenStyle + sLast + wxT("\n"); write(s); - m_graphics_changed = false; } @@ -614,7 +682,7 @@ void wxSVGFileDCImpl::DoDrawIcon(const class wxIcon & myIcon, wxCoord x, wxCoord void wxSVGFileDCImpl::DoDrawBitmap(const class wxBitmap & bmp, wxCoord x, wxCoord y , bool WXUNUSED(bTransparent) /*=0*/ ) { - if (m_graphics_changed) NewGraphics(); + NewGraphicsIfNeeded(); wxString sTmp, s, sPNG; if ( wxImage::FindHandler(wxBITMAP_TYPE_PNG) == NULL ) diff --git a/Externals/wxWidgets3/src/common/debugrpt.cpp b/Externals/wxWidgets3/src/common/debugrpt.cpp index 230033a476..7f3c5fba07 100644 --- a/Externals/wxWidgets3/src/common/debugrpt.cpp +++ b/Externals/wxWidgets3/src/common/debugrpt.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-17 -// RCS-ID: $Id: debugrpt.cpp 65101 2010-07-25 11:26:04Z FM $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -33,8 +32,12 @@ #if wxUSE_DEBUGREPORT && wxUSE_XML #include "wx/debugrpt.h" +#if wxUSE_FFILE + #include "wx/ffile.h" +#elif wxUSE_FILE + #include "wx/file.h" +#endif -#include "wx/ffile.h" #include "wx/filename.h" #include "wx/dir.h" #include "wx/dynlib.h" @@ -188,16 +191,14 @@ wxDebugReport::wxDebugReport() // directory, so do our best to create a unique name ourselves // // of course, this doesn't protect us against malicious users... - wxFileName fn; - fn.AssignTempFileName(appname); #if wxUSE_DATETIME m_dir.Printf(wxT("%s%c%s_dbgrpt-%lu-%s"), - fn.GetPath().c_str(), wxFILE_SEP_PATH, appname.c_str(), + wxFileName::GetTempDir(), wxFILE_SEP_PATH, appname, wxGetProcessId(), - wxDateTime::Now().Format(wxT("%Y%m%dT%H%M%S")).c_str()); + wxDateTime::Now().Format(wxT("%Y%m%dT%H%M%S"))); #else m_dir.Printf(wxT("%s%c%s_dbgrpt-%lu"), - fn.GetPath().c_str(), wxFILE_SEP_PATH, appname.c_str(), + wxFileName::GetTempDir(), wxFILE_SEP_PATH, appname, wxGetProcessId()); #endif @@ -290,17 +291,25 @@ wxDebugReport::AddText(const wxString& filename, const wxString& text, const wxString& description) { +#if wxUSE_FFILE || wxUSE_FILE wxASSERT_MSG( !wxFileName(filename).IsAbsolute(), wxT("filename should be relative to debug report directory") ); - wxFileName fn(GetDirectory(), filename); - wxFFile file(fn.GetFullPath(), wxT("w")); - if ( !file.IsOpened() || !file.Write(text) ) + const wxString fullPath = wxFileName(GetDirectory(), filename).GetFullPath(); +#if wxUSE_FFILE + wxFFile file(fullPath, wxT("w")); +#elif wxUSE_FILE + wxFile file(fullPath, wxFile::write); +#endif + if ( !file.IsOpened() || !file.Write(text, wxConvAuto()) ) return false; AddFile(filename, description); return true; +#else // !wxUSE_FFILE && !wxUSE_FILE + return false; +#endif } void wxDebugReport::RemoveFile(const wxString& name) @@ -616,6 +625,8 @@ void wxDebugReportCompress::SetCompressedFileBaseName(const wxString& name) bool wxDebugReportCompress::DoProcess() { +#define HAS_FILE_STREAMS (wxUSE_STREAMS && (wxUSE_FILE || wxUSE_FFILE)) +#if HAS_FILE_STREAMS const size_t count = GetFilesCount(); if ( !count ) return false; @@ -632,7 +643,14 @@ bool wxDebugReportCompress::DoProcess() fn.SetExt("zip"); // create the streams - wxFFileOutputStream os(fn.GetFullPath(), wxT("wb")); + const wxString ofullPath = fn.GetFullPath(); +#if wxUSE_FFILE + wxFFileOutputStream os(ofullPath, wxT("wb")); +#elif wxUSE_FILE + wxFileOutputStream os(ofullPath); +#endif + if ( !os.IsOk() ) + return false; wxZipOutputStream zos(os, 9); // add all files to the ZIP one @@ -647,8 +665,12 @@ bool wxDebugReportCompress::DoProcess() if ( !zos.PutNextEntry(ze) ) return false; - const wxFileName filename(GetDirectory(), name); - wxFFileInputStream is(filename.GetFullPath()); + const wxString ifullPath = wxFileName(GetDirectory(), name).GetFullPath(); +#if wxUSE_FFILE + wxFFileInputStream is(ifullPath); +#elif wxUSE_FILE + wxFileInputStream is(ifullPath); +#endif if ( !is.IsOk() || !zos.Write(is).IsOk() ) return false; } @@ -656,9 +678,12 @@ bool wxDebugReportCompress::DoProcess() if ( !zos.Close() ) return false; - m_zipfile = fn.GetFullPath(); + m_zipfile = ofullPath; return true; +#else + return false; +#endif // HAS_FILE_STREAMS } // ---------------------------------------------------------------------------- @@ -687,7 +712,7 @@ bool wxDebugReportUpload::DoProcess() wxArrayString output, errors; int rc = wxExecute(wxString::Format ( - wxT("%s -F %s=@\"%s\" %s"), + wxT("%s -F \"%s=@%s\" %s"), m_curlCmd.c_str(), m_inputField.c_str(), GetCompressedFileName().c_str(), diff --git a/Externals/wxWidgets3/src/common/descrip.mms b/Externals/wxWidgets3/src/common/descrip.mms index 8273a164af..18ffe12cb3 100644 --- a/Externals/wxWidgets3/src/common/descrip.mms +++ b/Externals/wxWidgets3/src/common/descrip.mms @@ -2,7 +2,7 @@ # * # Make file for VMS * # Author : J.Jansen (joukj@hrem.nano.tudelft.nl) * -# Date : 6 December 2011 * +# Date : 19 September 2013 * # * #***************************************************************************** .first @@ -224,7 +224,8 @@ OBJECTS3=listctrlcmn.obj,socketiohandler.obj,fdiodispatcher.obj,\ statbmpcmn.obj,dirctrlcmn.obj,gridcmn.obj,odcombocmn.obj,\ spinbtncmn.obj,scrolbarcmn.obj,colourdata.obj,fontdata.obj,\ valnum.obj,numformatter.obj,markupparser.obj,\ - affinematrix2d.obj,richtooltipcmn.obj,persist.obj,time.obj + affinematrix2d.obj,richtooltipcmn.obj,persist.obj,time.obj,\ + textmeasurecmn.obj,modalhook.obj,threadinfo.obj OBJECTS_MOTIF=radiocmn.obj,combocmn.obj @@ -428,7 +429,8 @@ SOURCES = \ bmpbtncmn.cpp,checklstcmn.cpp,statbmpcmn.cpp,dirctrlcmn.cpp,\ gridcmn.cpp,odcombocmn.cpp,spinbtncmn.cpp,scrolbarcmn.cpp,\ colourdata.cpp,fontdata.cpp affinematrix2d.cpp\ - richtooltipcmn.cpp persist.cpp time.cpp + richtooltipcmn.cpp persist.cpp time.cpp textmeasurecmn.cpp \ + modalhook.cpp all : $(SOURCES) $(MMS)$(MMSQUALIFIERS) $(OBJECTS) @@ -588,6 +590,7 @@ platinfo.obj : platinfo.cpp popupcmn.obj : popupcmn.cpp prntbase.obj : prntbase.cpp process.obj : process.cpp + cxx $(CXXFLAGS)$(CXX_DEFINE)/warn=disable=(UNSCOMZER) process.cpp protocol.obj : protocol.cpp quantize.obj : quantize.cpp radiocmn.obj : radiocmn.cpp @@ -713,3 +716,6 @@ affinematrix2d.obj : affinematrix2d.cpp richtooltipcmn.obj : richtooltipcmn.cpp persist.obj : persist.cpp time.obj : time.cpp +textmeasurecmn.obj : textmeasurecmn.cpp +modalhook.obj : modalhook.cpp +threadinfo.obj : threadinfo.cpp diff --git a/Externals/wxWidgets3/src/common/dircmn.cpp b/Externals/wxWidgets3/src/common/dircmn.cpp index 96e44ab144..11856868f8 100644 --- a/Externals/wxWidgets3/src/common/dircmn.cpp +++ b/Externals/wxWidgets3/src/common/dircmn.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 19.05.01 -// RCS-ID: $Id: dircmn.cpp 66089 2010-11-10 13:52:10Z VZ $ // Copyright: (c) 2001 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -72,6 +71,28 @@ bool wxDir::HasSubDirs(const wxString& spec) const #endif // !Unix +// ---------------------------------------------------------------------------- +// wxDir::GetNameWithSep() +// ---------------------------------------------------------------------------- + +wxString wxDir::GetNameWithSep() const +{ + // Note that for historical reasons (i.e. because GetName() was there + // first) we implement this one in terms of GetName() even though it might + // actually make more sense to reverse this logic. + + wxString name = GetName(); + if ( !name.empty() ) + { + // Notice that even though GetName() isn't supposed to return the + // separator, it can still be present for the root directory name. + if ( name.Last() != wxFILE_SEP_PATH ) + name += wxFILE_SEP_PATH; + } + + return name; +} + // ---------------------------------------------------------------------------- // wxDir::Traverse() // ---------------------------------------------------------------------------- @@ -87,14 +108,15 @@ size_t wxDir::Traverse(wxDirTraverser& sink, size_t nFiles = 0; // the name of this dir with path delimiter at the end - wxString prefix = GetName(); - prefix += wxFILE_SEP_PATH; + const wxString prefix = GetNameWithSep(); // first, recurse into subdirs if ( flags & wxDIR_DIRS ) { wxString dirname; - for ( bool cont = GetFirst(&dirname, wxEmptyString, wxDIR_DIRS | (flags & wxDIR_HIDDEN) ); + for ( bool cont = GetFirst(&dirname, wxEmptyString, + (flags & ~(wxDIR_FILES | wxDIR_DOTDOT)) + | wxDIR_DIRS); cont; cont = cont && GetNext(&dirname) ) { diff --git a/Externals/wxWidgets3/src/common/dirctrlcmn.cpp b/Externals/wxWidgets3/src/common/dirctrlcmn.cpp index 87e627b025..617875f1f7 100644 --- a/Externals/wxWidgets3/src/common/dirctrlcmn.cpp +++ b/Externals/wxWidgets3/src/common/dirctrlcmn.cpp @@ -4,7 +4,6 @@ // Author: Harm van der Heijden, Robert Roebling, Julian Smart // Modified by: // Created: 12/12/98 -// RCS-ID: $Id: dirctrlcmn.cpp 66592 2011-01-05 18:27:58Z PC $ // Copyright: (c) Harm van der Heijden, Robert Roebling and Julian Smart // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/dlgcmn.cpp b/Externals/wxWidgets3/src/common/dlgcmn.cpp index 1fb9b03f7d..df7ecdff59 100644 --- a/Externals/wxWidgets3/src/common/dlgcmn.cpp +++ b/Externals/wxWidgets3/src/common/dlgcmn.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 28.06.99 -// RCS-ID: $Id: dlgcmn.cpp 69458 2011-10-18 21:56:36Z VZ $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -43,6 +42,7 @@ #include "wx/bookctrl.h" #include "wx/scrolwin.h" #include "wx/textwrapper.h" +#include "wx/modalhook.h" #if wxUSE_DISPLAY #include "wx/display.h" @@ -125,7 +125,7 @@ END_EVENT_TABLE() wxDialogLayoutAdapter* wxDialogBase::sm_layoutAdapter = NULL; bool wxDialogBase::sm_layoutAdaptation = false; -void wxDialogBase::Init() +wxDialogBase::wxDialogBase() { m_returnCode = 0; m_affirmativeId = wxID_OK; @@ -422,7 +422,7 @@ bool wxDialogBase::EmulateButtonClickIfPresent(int id) if ( !btn || !btn->IsEnabled() || !btn->IsShown() ) return false; - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, id); + wxCommandEvent event(wxEVT_BUTTON, id); event.SetEventObject(btn); btn->GetEventHandler()->ProcessEvent(event); @@ -461,14 +461,16 @@ bool wxDialogBase::SendCloseButtonClickEvent() bool wxDialogBase::IsEscapeKey(const wxKeyEvent& event) { - // for most platforms, Esc key is used to close the dialogs - return event.GetKeyCode() == WXK_ESCAPE && - event.GetModifiers() == wxMOD_NONE; + // For most platforms, Esc key is used to close the dialogs. + // + // Notice that we intentionally don't check for modifiers here, Shift-Esc, + // Alt-Esc and so on still close the dialog, typically. + return event.GetKeyCode() == WXK_ESCAPE; } void wxDialogBase::OnCharHook(wxKeyEvent& event) { - if ( event.GetKeyCode() == WXK_ESCAPE ) + if ( IsEscapeKey(event) ) { if ( SendCloseButtonClickEvent() ) { diff --git a/Externals/wxWidgets3/src/common/dndcmn.cpp b/Externals/wxWidgets3/src/common/dndcmn.cpp index 5b9cb42593..5bd9e13454 100644 --- a/Externals/wxWidgets3/src/common/dndcmn.cpp +++ b/Externals/wxWidgets3/src/common/dndcmn.cpp @@ -3,7 +3,6 @@ // Author: Robert Roebling // Modified by: // Created: 19.10.99 -// RCS-ID: $Id: dndcmn.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) wxWidgets Team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/common/dobjcmn.cpp b/Externals/wxWidgets3/src/common/dobjcmn.cpp index 14f40b8ff1..5e4d43dcc0 100644 --- a/Externals/wxWidgets3/src/common/dobjcmn.cpp +++ b/Externals/wxWidgets3/src/common/dobjcmn.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin, Robert Roebling // Modified by: // Created: 19.10.99 -// RCS-ID: $Id: dobjcmn.cpp 70908 2012-03-15 13:49:49Z VZ $ // Copyright: (c) wxWidgets Team // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -24,6 +23,8 @@ #include "wx/app.h" #endif +#include "wx/textbuf.h" + // ---------------------------------------------------------------------------- // lists // ---------------------------------------------------------------------------- @@ -299,13 +300,14 @@ bool wxTextDataObject::SetData(const wxDataFormat& format, size_t wxTextDataObject::GetDataSize(const wxDataFormat& format) const { + const wxString& text = GetText(); if ( format == wxDF_UNICODETEXT || wxLocaleIsUtf8 ) { - return m_text.utf8_length(); + return text.utf8_length(); } else // wxDF_TEXT { - const wxCharBuffer buf(wxConvLocal.cWC2MB(m_text.wc_str())); + const wxCharBuffer buf(wxConvLocal.cWC2MB(text.wc_str())); return buf ? strlen(buf) : 0; } } @@ -315,13 +317,14 @@ bool wxTextDataObject::GetDataHere(const wxDataFormat& format, void *buf) const if ( !buf ) return false; + const wxString& text = GetText(); if ( format == wxDF_UNICODETEXT || wxLocaleIsUtf8 ) { - memcpy(buf, m_text.utf8_str(), m_text.utf8_length()); + memcpy(buf, text.utf8_str(), text.utf8_length()); } else // wxDF_TEXT { - const wxCharBuffer bufLocal(wxConvLocal.cWC2MB(m_text.wc_str())); + const wxCharBuffer bufLocal(wxConvLocal.cWC2MB(text.wc_str())); if ( !bufLocal ) return false; @@ -346,11 +349,11 @@ bool wxTextDataObject::SetData(const wxDataFormat& format, // is not in UTF-8 so do an extra check for tranquility, it shouldn't // matter much if we lose a bit of performance when pasting from // clipboard - m_text = wxString::FromUTF8(buf, len); + SetText(wxString::FromUTF8(buf, len)); } else // wxDF_TEXT, convert from current (non-UTF8) locale { - m_text = wxConvLocal.cMB2WC(buf, len, NULL); + SetText(wxConvLocal.cMB2WC(buf, len, NULL)); } return true; @@ -404,29 +407,153 @@ bool wxTextDataObject::SetData(const wxDataFormat& format, #else // !wxNEEDS_UTF{8,16}_FOR_TEXT_DATAOBJ +// NB: This branch, using native wxChar for the clipboard, is only used under +// Windows currently. It's just a coincidence, but Windows is also the only +// platform where we need to convert the text to the native EOL format, so +// wxTextBuffer::Translate() is only used here and not in the code above. + size_t wxTextDataObject::GetDataSize() const { - return GetTextLength() * sizeof(wxChar); + return (wxTextBuffer::Translate(GetText()).length() + 1)*sizeof(wxChar); } bool wxTextDataObject::GetDataHere(void *buf) const { + const wxString textNative = wxTextBuffer::Translate(GetText()); + // NOTE: use wxTmemcpy() instead of wxStrncpy() to allow // retrieval of strings with embedded NULLs - wxTmemcpy( (wxChar*)buf, GetText().c_str(), GetTextLength() ); + wxTmemcpy(static_cast(buf), + textNative.t_str(), + textNative.length() + 1); return true; } bool wxTextDataObject::SetData(size_t len, const void *buf) { - SetText( wxString((const wxChar*)buf, len/sizeof(wxChar)) ); + const wxString + text = wxString(static_cast(buf), len/sizeof(wxChar)); + SetText(wxTextBuffer::Translate(text, wxTextFileType_Unix)); return true; } #endif // different wxTextDataObject implementations +// ---------------------------------------------------------------------------- +// wxHTMLDataObject +// ---------------------------------------------------------------------------- + +size_t wxHTMLDataObject::GetDataSize() const +{ + // Ensure that the temporary string returned by GetHTML() is kept alive for + // as long as we need it here. + const wxString& htmlStr = GetHTML(); + const wxScopedCharBuffer buffer(htmlStr.utf8_str()); + + size_t size = buffer.length(); + +#ifdef __WXMSW__ + // On Windows we need to add some stuff to the string to satisfy + // its clipboard format requirements. + size += 400; +#endif + + return size; +} + +bool wxHTMLDataObject::GetDataHere(void *buf) const +{ + if ( !buf ) + return false; + + // Windows and Mac always use UTF-8, and docs suggest GTK does as well. + const wxString& htmlStr = GetHTML(); + const wxScopedCharBuffer html(htmlStr.utf8_str()); + if ( !html ) + return false; + + char* const buffer = static_cast(buf); + +#ifdef __WXMSW__ + // add the extra info that the MSW clipboard format requires. + + // Create a template string for the HTML header... + strcpy(buffer, + "Version:0.9\r\n" + "StartHTML:00000000\r\n" + "EndHTML:00000000\r\n" + "StartFragment:00000000\r\n" + "EndFragment:00000000\r\n" + "\r\n" + "\r\n"); + + // Append the HTML... + strcat(buffer, html); + strcat(buffer, "\r\n"); + // Finish up the HTML format... + strcat(buffer, + "\r\n" + "\r\n" + ""); + + // Now go back, calculate all the lengths, and write out the + // necessary header information. Note, wsprintf() truncates the + // string when you overwrite it so you follow up with code to replace + // the 0 appended at the end with a '\r'... + char *ptr = strstr(buffer, "StartHTML"); + sprintf(ptr+10, "%08u", (unsigned)(strstr(buffer, "") - buffer)); + *(ptr+10+8) = '\r'; + + ptr = strstr(buffer, "EndHTML"); + sprintf(ptr+8, "%08u", (unsigned)strlen(buffer)); + *(ptr+8+8) = '\r'; + + ptr = strstr(buffer, "StartFragment"); + sprintf(ptr+14, "%08u", (unsigned)(strstr(buffer, "", fragmentStart) + 3; + int endCommentStart = html.rfind("------------>-------------->... + * -------- |scanline| |scanline| + * |edgelist| |edgelist| + * --------- --------- + * | | + * | | + * V V + * list of ETEs list of ETEs + * + * where ETE is an EdgeTableEntry data structure, + * and there is one ScanLineList per scanline at + * which an edge is initially entered. + * + */ + +static bool +miCreateETandAET(int count, const wxPoint * pts, EdgeTable *ET, EdgeTableEntry *AET, + EdgeTableEntry *pETEs, ScanLineListBlock *pSLLBlock) +{ + const wxPoint* top, *bottom; + const wxPoint* PrevPt, *CurrPt; + int iSLLBlock = 0; + + int dy; + + if (count < 2) return TRUE; + + /* + * initialize the Active Edge Table + */ + AET->next = (EdgeTableEntry *)NULL; + AET->back = (EdgeTableEntry *)NULL; + AET->nextWETE = (EdgeTableEntry *)NULL; + AET->bres.minor = INT_MIN; + + /* + * initialize the Edge Table. + */ + ET->scanlines.next = (ScanLineList *)NULL; + ET->ymax = INT_MIN; + ET->ymin = INT_MAX; + pSLLBlock->next = (ScanLineListBlock *)NULL; + + PrevPt = &pts[count-1]; + + /* + * for each vertex in the array of points. + * In this loop we are dealing with two vertices at + * a time -- these make up one edge of the polygon. + */ + while (count--) + { + CurrPt = pts++; + + /* + * find out which point is above and which is below. + */ + if (PrevPt->y > CurrPt->y) + { + bottom = PrevPt, top = CurrPt; + pETEs->ClockWise = 0; + } + else + { + bottom = CurrPt, top = PrevPt; + pETEs->ClockWise = 1; + } + + /* + * don't add horizontal edges to the Edge table. + */ + if (bottom->y != top->y) + { + pETEs->ymax = bottom->y-1; /* -1 so we don't get last scanline */ + + /* + * initialize integer edge algorithm + */ + dy = bottom->y - top->y; + BRESINITPGONSTRUCT(dy, top->x, bottom->x, pETEs->bres); + + if (!miInsertEdgeInET(ET, pETEs, top->y, &pSLLBlock, &iSLLBlock)) + { + miFreeStorage(pSLLBlock->next); + return FALSE; + } + + ET->ymax = wxMax(ET->ymax, PrevPt->y); + ET->ymin = wxMin(ET->ymin, PrevPt->y); + pETEs++; + } + + PrevPt = CurrPt; + } + return TRUE; +} + +/* + * loadAET + * + * This routine moves EdgeTableEntries from the + * EdgeTable into the Active Edge Table, + * leaving them sorted by smaller x coordinate. + * + */ + +static void +miloadAET(EdgeTableEntry *AET, EdgeTableEntry *ETEs) +{ + EdgeTableEntry *pPrevAET; + EdgeTableEntry *tmp; + + pPrevAET = AET; + AET = AET->next; + while (ETEs) + { + while (AET && (AET->bres.minor < ETEs->bres.minor)) + { + pPrevAET = AET; + AET = AET->next; + } + tmp = ETEs->next; + ETEs->next = AET; + if (AET) + AET->back = ETEs; + ETEs->back = pPrevAET; + pPrevAET->next = ETEs; + pPrevAET = ETEs; + + ETEs = tmp; + } +} + +/* + * computeWAET + * + * This routine links the AET by the + * nextWETE (winding EdgeTableEntry) link for + * use by the winding number rule. The final + * Active Edge Table (AET) might look something + * like: + * + * AET + * ---------- --------- --------- + * |ymax | |ymax | |ymax | + * | ... | |... | |... | + * |next |->|next |->|next |->... + * |nextWETE| |nextWETE| |nextWETE| + * --------- --------- ^-------- + * | | | + * V-------------------> V---> ... + * + */ +static void +micomputeWAET(EdgeTableEntry *AET) +{ + EdgeTableEntry *pWETE; + int inside = 1; + int isInside = 0; + + AET->nextWETE = (EdgeTableEntry *)NULL; + pWETE = AET; + AET = AET->next; + while (AET) + { + if (AET->ClockWise) + isInside++; + else + isInside--; + + if ((!inside && !isInside) || + ( inside && isInside)) + { + pWETE->nextWETE = AET; + pWETE = AET; + inside = !inside; + } + AET = AET->next; + } + pWETE->nextWETE = (EdgeTableEntry *)NULL; +} + +/* + * InsertionSort + * + * Just a simple insertion sort using + * pointers and back pointers to sort the Active + * Edge Table. + * + */ + +static int +miInsertionSort(EdgeTableEntry *AET) +{ + EdgeTableEntry *pETEchase; + EdgeTableEntry *pETEinsert; + EdgeTableEntry *pETEchaseBackTMP; + int changed = 0; + + AET = AET->next; + while (AET) + { + pETEinsert = AET; + pETEchase = AET; + while (pETEchase->back->bres.minor > AET->bres.minor) + pETEchase = pETEchase->back; + + AET = AET->next; + if (pETEchase != pETEinsert) + { + pETEchaseBackTMP = pETEchase->back; + pETEinsert->back->next = AET; + if (AET) + AET->back = pETEinsert->back; + pETEinsert->next = pETEchase; + pETEchase->back->next = pETEinsert; + pETEchase->back = pETEinsert; + pETEinsert->back = pETEchaseBackTMP; + changed = 1; + } + } + return(changed); +} + +/* + * Clean up our act. + */ +static void +miFreeStorage(ScanLineListBlock *pSLLBlock) +{ + ScanLineListBlock *tmpSLLBlock; + + while (pSLLBlock) + { + tmpSLLBlock = pSLLBlock->next; + free(pSLLBlock); + pSLLBlock = tmpSLLBlock; + } +} + +/* mipolygen.c */ + +static bool +scanFillGeneralPoly( wxRegion* rgn, + int count, /* number of points */ + const wxPoint *ptsIn, /* the points */ + wxPolygonFillMode fillStyle + ) +{ + EdgeTableEntry *pAET; /* the Active Edge Table */ + int y; /* the current scanline */ + int nPts = 0; /* number of pts in buffer */ + EdgeTableEntry *pWETE; /* Winding Edge Table */ + ScanLineList *pSLL; /* Current ScanLineList */ + wxPoint * ptsOut; /* ptr to output buffers */ + int *width; + wxPoint FirstPoint[NUMPTSTOBUFFER]; /* the output buffers */ + int FirstWidth[NUMPTSTOBUFFER]; + EdgeTableEntry *pPrevAET; /* previous AET entry */ + EdgeTable ET; /* Edge Table header node */ + EdgeTableEntry AET; /* Active ET header node */ + EdgeTableEntry *pETEs; /* Edge Table Entries buff */ + ScanLineListBlock SLLBlock; /* header for ScanLineList */ + int fixWAET = 0; + + if (count < 3) + return(TRUE); + + if(!(pETEs = (EdgeTableEntry *) + malloc(sizeof(EdgeTableEntry) * count))) + return(FALSE); + ptsOut = FirstPoint; + width = FirstWidth; + if (!miCreateETandAET(count, ptsIn, &ET, &AET, pETEs, &SLLBlock)) + { + free(pETEs); + return(FALSE); + } + pSLL = ET.scanlines.next; + + if (fillStyle == wxODDEVEN_RULE) + { + /* + * for each scanline + */ + for (y = ET.ymin; y < ET.ymax; y++) + { + /* + * Add a new edge to the active edge table when we + * get to the next edge. + */ + if (pSLL && y == pSLL->scanline) + { + miloadAET(&AET, pSLL->edgelist); + pSLL = pSLL->next; + } + pPrevAET = &AET; + pAET = AET.next; + + /* + * for each active edge + */ + while (pAET) + { + ptsOut->x = pAET->bres.minor; + ptsOut++->y = y; + *width++ = pAET->next->bres.minor - pAET->bres.minor; + nPts++; + + /* + * send out the buffer when its full + */ + if (nPts == NUMPTSTOBUFFER) + { + // (*pgc->ops->FillSpans)(dst, pgc, + // nPts, FirstPoint, FirstWidth,1); + + for ( int i = 0 ; i < nPts; ++i) + { + wxRect rect; + rect.y = FirstPoint[i].y; + rect.x = FirstPoint[i].x; + rect.height = 1; + rect.width = FirstWidth[i]; + rgn->Union(rect); + } + ptsOut = FirstPoint; + width = FirstWidth; + nPts = 0; + } + EVALUATEEDGEEVENODD(pAET, pPrevAET, y) + EVALUATEEDGEEVENODD(pAET, pPrevAET, y); + } + miInsertionSort(&AET); + } + } + else /* default to WindingNumber */ + { + /* + * for each scanline + */ + for (y = ET.ymin; y < ET.ymax; y++) + { + /* + * Add a new edge to the active edge table when we + * get to the next edge. + */ + if (pSLL && y == pSLL->scanline) + { + miloadAET(&AET, pSLL->edgelist); + micomputeWAET(&AET); + pSLL = pSLL->next; + } + pPrevAET = &AET; + pAET = AET.next; + pWETE = pAET; + + /* + * for each active edge + */ + while (pAET) + { + /* + * if the next edge in the active edge table is + * also the next edge in the winding active edge + * table. + */ + if (pWETE == pAET) + { + ptsOut->x = pAET->bres.minor; + ptsOut++->y = y; + *width++ = pAET->nextWETE->bres.minor - pAET->bres.minor; + nPts++; + + /* + * send out the buffer + */ + if (nPts == NUMPTSTOBUFFER) + { + // (*pgc->ops->FillSpans)(dst, pgc, + // nPts, FirstPoint, FirstWidth,1); + for ( int i = 0 ; i < nPts ; ++i) + { + wxRect rect; + rect.y = FirstPoint[i].y; + rect.x = FirstPoint[i].x; + rect.height = 1; + rect.width = FirstWidth[i]; + rgn->Union(rect); + } + ptsOut = FirstPoint; + width = FirstWidth; + nPts = 0; + } + + pWETE = pWETE->nextWETE; + while (pWETE != pAET) + EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET); + pWETE = pWETE->nextWETE; + } + EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET); + } + + /* + * reevaluate the Winding active edge table if we + * just had to resort it or if we just exited an edge. + */ + if (miInsertionSort(&AET) || fixWAET) + { + micomputeWAET(&AET); + fixWAET = 0; + } + } + } + + /* + * Get any spans that we missed by buffering + */ + // (*pgc->ops->FillSpans)(dst, pgc, + // nPts, FirstPoint, FirstWidth,1); + for ( int i = 0 ; i < nPts; ++i) + { + wxRect rect; + rect.y = FirstPoint[i].y; + rect.x = FirstPoint[i].x; + rect.height = 1; + rect.width = FirstWidth[i]; + rgn->Union(rect); + } + + free(pETEs); + miFreeStorage(SLLBlock.next); + return(TRUE); +} + +#endif + wxRegion::wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle) { // Set the region to a polygon shape generically using a bitmap with the // polygon drawn on it. m_refData = new wxRegionRefData(); - + +#if OSX_USE_SCANLINES + scanFillGeneralPoly(this,n,points,fillStyle); +#else wxCoord mx = 0; wxCoord my = 0; wxPoint p; @@ -125,7 +981,8 @@ wxRegion::wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode fillStyle) bmp.SetMask(new wxMask(bmp, *wxBLACK)); // Use it to set this region - Union(bmp); + Union(bmp); +#endif } wxRegion::~wxRegion() @@ -169,6 +1026,21 @@ bool wxRegion::DoOffset(wxCoord x, wxCoord y) return true ; } +bool wxRegion::DoUnionWithRect(const wxRect& rect) +{ + if ( !m_refData ) + { + m_refData = new wxRegionRefData(rect.x , rect.y , rect.width , rect.height); + return true; + } + + AllocExclusive(); + + CGRect r = CGRectMake(rect.x , rect.y , rect.width , rect.height); + HIShapeUnionWithRect(M_REGION , &r); + + return true; +} //! Union /e region with this. bool wxRegion::DoCombine(const wxRegion& region, wxRegionOp op) @@ -303,7 +1175,7 @@ wxRegionContain wxRegion::DoContainsPoint(wxCoord x, wxCoord y) const if (!m_refData) return wxOutRegion; - CGPoint p = { x, y } ; + CGPoint p = CGPointMake( x, y ) ; if (HIShapeContainsPoint( M_REGION , &p ) ) return wxInRegion; @@ -406,40 +1278,6 @@ public : long m_current ; }; -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - -OSStatus wxMacRegionToRectsCounterCallback( - UInt16 message, RgnHandle WXUNUSED(region), const Rect *WXUNUSED(rect), void *data ) -{ - long *m_numRects = (long*) data ; - if ( message == kQDRegionToRectsMsgInit ) - { - (*m_numRects) = 0 ; - } - else if (message == kQDRegionToRectsMsgParse) - { - (*m_numRects) += 1 ; - } - - return noErr; -} - -OSStatus wxMacRegionToRectsSetterCallback( - UInt16 message, RgnHandle WXUNUSED(region), const Rect *rect, void *data ) -{ - if (message == kQDRegionToRectsMsgParse) - { - RegionToRectsCallbackData *cb = (RegionToRectsCallbackData*) data ; - cb->m_rects[cb->m_current++] = wxRect( rect->left , rect->top , rect->right - rect->left , rect->bottom - rect->top ) ; - } - - return noErr; -} - -#endif - -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 - OSStatus wxOSXRegionToRectsCounterCallback( int message, HIShapeRef WXUNUSED(region), const CGRect *WXUNUSED(rect), void *data ) { @@ -468,8 +1306,6 @@ OSStatus wxOSXRegionToRectsSetterCallback( return noErr; } -#endif - void wxRegionIterator::Reset(const wxRegion& region) { m_current = 0; @@ -490,51 +1326,20 @@ void wxRegionIterator::Reset(const wxRegion& region) m_rects = new wxRect[m_numRects]; m_rects[0] = m_region.GetBox(); #endif - -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 - if ( HIShapeEnumerate != NULL ) + OSStatus err = HIShapeEnumerate (OTHER_M_REGION(region), kHIShapeParseFromTopLeft, wxOSXRegionToRectsCounterCallback, + (void*)&m_numRects); + if (err == noErr) { - OSStatus err = HIShapeEnumerate (OTHER_M_REGION(region), kHIShapeParseFromTopLeft, wxOSXRegionToRectsCounterCallback, - (void*)&m_numRects); - if (err == noErr) - { - m_rects = new wxRect[m_numRects]; - RegionToRectsCallbackData data ; - data.m_rects = m_rects ; - data.m_current = 0 ; - HIShapeEnumerate( OTHER_M_REGION(region), kHIShapeParseFromTopLeft, wxOSXRegionToRectsSetterCallback, - (void*)&data ); - } - else - { - m_numRects = 0; - } + m_rects = new wxRect[m_numRects]; + RegionToRectsCallbackData data ; + data.m_rects = m_rects ; + data.m_current = 0 ; + HIShapeEnumerate( OTHER_M_REGION(region), kHIShapeParseFromTopLeft, wxOSXRegionToRectsSetterCallback, + (void*)&data ); } else -#endif { -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 - OSStatus err = noErr; - RgnHandle rgn = NewRgn(); - HIShapeGetAsQDRgn(OTHER_M_REGION(region), rgn); - - err = QDRegionToRects (rgn, kQDParseRegionFromTopLeft, wxMacRegionToRectsCounterCallback - , (void*)&m_numRects); - if (err == noErr) - { - m_rects = new wxRect[m_numRects]; - RegionToRectsCallbackData data ; - data.m_rects = m_rects ; - data.m_current = 0 ; - QDRegionToRects( rgn , kQDParseRegionFromTopLeft, wxMacRegionToRectsSetterCallback, - (void*)&data ); - } - else - { - m_numRects = 0; - } - DisposeRgn( rgn ); -#endif + m_numRects = 0; } } } diff --git a/Externals/wxWidgets3/src/osx/carbon/renderer.cpp b/Externals/wxWidgets3/src/osx/carbon/renderer.cpp index 38d3dc298b..4669639e79 100644 --- a/Externals/wxWidgets3/src/osx/carbon/renderer.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/renderer.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 20.07.2003 -// RCS-ID: $Id: renderer.cpp 68148 2011-07-04 14:05:14Z VZ $ // Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -31,6 +30,7 @@ #include "wx/renderer.h" #include "wx/graphics.h" #include "wx/dcgraph.h" +#include "wx/splitter.h" #include "wx/osx/private.h" #ifdef wxHAS_DRAW_TITLE_BAR_BITMAP @@ -123,6 +123,8 @@ public: int flags = 0); #endif // wxHAS_DRAW_TITLE_BAR_BITMAP + virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win); + private: void DrawMacThemeButton(wxWindow *win, wxDC& dc, @@ -182,7 +184,7 @@ int wxRendererMac::DrawHeaderButton( wxWindow *win, drawInfo.version = 0; drawInfo.kind = kThemeListHeaderButton; drawInfo.state = (flags & wxCONTROL_DISABLED) ? kThemeStateInactive : kThemeStateActive; - drawInfo.value = (flags & wxCONTROL_SELECTED) ? kThemeButtonOn : kThemeButtonOff; + drawInfo.value = (flags & wxCONTROL_PRESSED) ? kThemeButtonOn : kThemeButtonOff; drawInfo.adornment = kThemeAdornmentNone; // The down arrow is drawn automatically, change it to an up arrow if needed. @@ -192,7 +194,7 @@ int wxRendererMac::DrawHeaderButton( wxWindow *win, HIThemeDrawButton( &headerRect, &drawInfo, cgContext, kHIThemeOrientationNormal, &labelRect ); // If we don't want any arrows we need to draw over the one already there - if ( (flags & wxCONTROL_SELECTED) && (sortArrow == wxHDR_SORT_ICON_NONE) ) + if ( (flags & wxCONTROL_PRESSED) && (sortArrow == wxHDR_SORT_ICON_NONE) ) { // clip to the header rectangle CGContextSaveGState( cgContext ); @@ -208,12 +210,12 @@ int wxRendererMac::DrawHeaderButton( wxWindow *win, // Reserve room for the arrows before writing the label, and turn off the // flags we've already handled wxRect newRect(rect); - if ( (flags & wxCONTROL_SELECTED) && (sortArrow != wxHDR_SORT_ICON_NONE) ) + if ( (flags & wxCONTROL_PRESSED) && (sortArrow != wxHDR_SORT_ICON_NONE) ) { newRect.width -= 12; sortArrow = wxHDR_SORT_ICON_NONE; } - flags &= ~wxCONTROL_SELECTED; + flags &= ~wxCONTROL_PRESSED; return DrawHeaderButtonContents(win, dc, newRect, flags, sortArrow, params); } @@ -279,6 +281,37 @@ void wxRendererMac::DrawTreeItemButton( wxWindow *win, } } +wxSplitterRenderParams +wxRendererMac::GetSplitterParams(const wxWindow *win) +{ + // see below + SInt32 sashWidth, + border; +#if wxOSX_USE_COCOA + if ( win->HasFlag(wxSP_3DSASH) ) + GetThemeMetric( kThemeMetricPaneSplitterHeight, &sashWidth ); // Cocoa == Carbon == 7 + else if ( win->HasFlag(wxSP_NOSASH) ) // actually Cocoa doesn't allow 0 + sashWidth = 0; + else // no 3D effect - Cocoa [NSSplitView dividerThickNess] for NSSplitViewDividerStyleThin + sashWidth = 1; +#else // Carbon + if ( win->HasFlag(wxSP_3DSASH) ) + GetThemeMetric( kThemeMetricPaneSplitterHeight, &sashWidth ); + else if ( win->HasFlag(wxSP_NOSASH) ) + sashWidth = 0; + else // no 3D effect + GetThemeMetric( kThemeMetricSmallPaneSplitterHeight, &sashWidth ); +#endif // Cocoa/Carbon + + if ( win->HasFlag(wxSP_3DBORDER) ) + border = 2; + else // no 3D effect + border = 0; + + return wxSplitterRenderParams(sashWidth, border, false); +} + + void wxRendererMac::DrawSplitterSash( wxWindow *win, wxDC& dc, const wxSize& size, @@ -288,7 +321,9 @@ void wxRendererMac::DrawSplitterSash( wxWindow *win, { bool hasMetal = win->MacGetTopLevelWindow()->GetExtraStyle() & wxFRAME_EX_METAL; SInt32 height; - GetThemeMetric( kThemeMetricSmallPaneSplitterHeight, &height ); + + height = wxRendererNative::Get().GetSplitterParams(win).widthSash; + HIRect splitterRect; if (orient == wxVERTICAL) splitterRect = CGRectMake( position, 0, height, size.y ); @@ -323,11 +358,14 @@ void wxRendererMac::DrawSplitterSash( wxWindow *win, CGContextFillRect(cgContext,splitterRect); } - HIThemeSplitterDrawInfo drawInfo; - drawInfo.version = 0; - drawInfo.state = kThemeStateActive; - drawInfo.adornment = hasMetal ? kHIThemeSplitterAdornmentMetal : kHIThemeSplitterAdornmentNone; - HIThemeDrawPaneSplitter( &splitterRect, &drawInfo, cgContext, kHIThemeOrientationNormal ); + if ( win->HasFlag(wxSP_3DSASH) ) + { + HIThemeSplitterDrawInfo drawInfo; + drawInfo.version = 0; + drawInfo.state = kThemeStateActive; + drawInfo.adornment = hasMetal ? kHIThemeSplitterAdornmentMetal : kHIThemeSplitterAdornmentNone; + HIThemeDrawPaneSplitter( &splitterRect, &drawInfo, cgContext, kHIThemeOrientationNormal ); + } } } @@ -385,7 +423,7 @@ wxRendererMac::DrawMacThemeButton(wxWindow *win, drawInfo.version = 0; drawInfo.kind = kind; drawInfo.state = (flags & wxCONTROL_DISABLED) ? kThemeStateInactive : kThemeStateActive; - drawInfo.value = (flags & wxCONTROL_SELECTED) ? kThemeButtonOn : kThemeButtonOff; + drawInfo.value = (flags & wxCONTROL_PRESSED) ? kThemeButtonOn : kThemeButtonOff; if (flags & wxCONTROL_UNDETERMINED) drawInfo.value = kThemeButtonMixed; drawInfo.adornment = adornment; @@ -403,7 +441,7 @@ wxRendererMac::DrawCheckBox(wxWindow *win, int flags) { if (flags & wxCONTROL_CHECKED) - flags |= wxCONTROL_SELECTED; + flags |= wxCONTROL_PRESSED; int kind; @@ -555,7 +593,7 @@ void wxRendererMac::DrawRadioBitmap(wxWindow* win, wxDC& dc, kind = kThemeRadioButton; if (flags & wxCONTROL_CHECKED) - flags |= wxCONTROL_SELECTED; + flags |= wxCONTROL_PRESSED; DrawMacThemeButton(win, dc, rect, flags, kind, kThemeAdornmentNone); diff --git a/Externals/wxWidgets3/src/osx/carbon/scrolbar.cpp b/Externals/wxWidgets3/src/osx/carbon/scrolbar.cpp index 7e784b4326..006e93a351 100644 --- a/Externals/wxWidgets3/src/osx/carbon/scrolbar.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/scrolbar.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: scrolbar.cpp 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/settings.cpp b/Externals/wxWidgets3/src/osx/carbon/settings.cpp index 38866268ed..193da854b3 100644 --- a/Externals/wxWidgets3/src/osx/carbon/settings.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/settings.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: settings.cpp 67018 2011-02-25 09:38:35Z JS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/slider.cpp b/Externals/wxWidgets3/src/osx/carbon/slider.cpp index 38f88781af..e5f6f3f4b5 100644 --- a/Externals/wxWidgets3/src/osx/carbon/slider.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/slider.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: slider.cpp 67416 2011-04-08 15:09:38Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -48,7 +47,7 @@ wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer, if ( style & wxSL_AUTOTICKS ) tickMarks = (maximum - minimum) + 1; // +1 for the 0 value - // keep the number of tickmarks from becoming unwieldly, therefore below it is ok to cast + // keep the number of tickmarks from becoming unwieldy, therefore below it is ok to cast // it to a UInt16 while (tickMarks > 20) tickMarks /= 5; diff --git a/Externals/wxWidgets3/src/osx/carbon/sound.cpp b/Externals/wxWidgets3/src/osx/carbon/sound.cpp index 63681725bd..7fadb12eaa 100644 --- a/Externals/wxWidgets3/src/osx/carbon/sound.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/sound.cpp @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: Stefan Csomor // Created: 1998-01-01 -// RCS-ID: $Id: sound.cpp 69178 2011-09-21 15:08:02Z VZ $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/spinbutt.cpp b/Externals/wxWidgets3/src/osx/carbon/spinbutt.cpp index abe9e81628..061956428e 100644 --- a/Externals/wxWidgets3/src/osx/carbon/spinbutt.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/spinbutt.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: spinbutt.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/srchctrl.cpp b/Externals/wxWidgets3/src/osx/carbon/srchctrl.cpp index 777628d0a5..56056d95a5 100644 --- a/Externals/wxWidgets3/src/osx/carbon/srchctrl.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/srchctrl.cpp @@ -3,7 +3,6 @@ // Purpose: implements mac carbon wxSearchCtrl // Author: Vince Harron // Created: 2006-02-19 -// RCS-ID: $Id: srchctrl.cpp 66826 2011-02-02 07:55:57Z SC $ // Copyright: Vince Harron // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/statbmp.cpp b/Externals/wxWidgets3/src/osx/carbon/statbmp.cpp index 2c4f291b48..7a4ed047a5 100644 --- a/Externals/wxWidgets3/src/osx/carbon/statbmp.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/statbmp.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: statbmp.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/statbox.cpp b/Externals/wxWidgets3/src/osx/carbon/statbox.cpp index f254906fb8..5e5d9027ac 100644 --- a/Externals/wxWidgets3/src/osx/carbon/statbox.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/statbox.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: statbox.cpp 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/statbrma.cpp b/Externals/wxWidgets3/src/osx/carbon/statbrma.cpp index 7985a3f977..cc7e463ba1 100644 --- a/Externals/wxWidgets3/src/osx/carbon/statbrma.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/statbrma.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: statbrma.cpp 61624 2009-08-06 00:01:43Z VZ $ // Copyright: (c) 1998 Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -114,7 +113,11 @@ void wxStatusBarMac::DoUpdateStatusText(int number) rect.height = h ; Refresh( true, &rect ); + // we should have to force the update here + // TODO Remove if no regressions occur +#if 0 Update(); +#endif } void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event)) diff --git a/Externals/wxWidgets3/src/osx/carbon/statline.cpp b/Externals/wxWidgets3/src/osx/carbon/statline.cpp index 2d75520df6..62a3db302c 100644 --- a/Externals/wxWidgets3/src/osx/carbon/statline.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/statline.cpp @@ -3,7 +3,6 @@ // Purpose: wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 -// Version: $Id: statline.cpp 66555 2011-01-04 08:31:53Z SC $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/statlmac.cpp b/Externals/wxWidgets3/src/osx/carbon/statlmac.cpp index 9380d6f9a8..415d236f5a 100644 --- a/Externals/wxWidgets3/src/osx/carbon/statlmac.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/statlmac.cpp @@ -3,7 +3,6 @@ // Purpose: a generic wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 -// Version: $Id: statlmac.cpp 61724 2009-08-21 10:41:26Z VZ $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/stattext.cpp b/Externals/wxWidgets3/src/osx/carbon/stattext.cpp index 5536aa1d36..8b0c9714c4 100644 --- a/Externals/wxWidgets3/src/osx/carbon/stattext.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/stattext.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: stattext.cpp 67243 2011-03-19 08:36:23Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/taskbar.cpp b/Externals/wxWidgets3/src/osx/carbon/taskbar.cpp index 9eb7e26191..f8a8c4821e 100644 --- a/Externals/wxWidgets3/src/osx/carbon/taskbar.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/taskbar.cpp @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 09/25/2004 -// RCS-ID: $Id: taskbar.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) 2004 Ryan Norton // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -60,7 +59,7 @@ public: : wxTopLevelWindow(NULL, wxID_ANY, wxEmptyString), m_impl(impl) { Connect( - -1, wxEVT_COMMAND_MENU_SELECTED, + -1, wxEVT_MENU, wxCommandEventHandler(wxTaskBarIconWindow::OnMenuEvent) ); } @@ -241,7 +240,7 @@ wxDockEventHandler(EventHandlerCallRef WXUNUSED(inHandlerCallRef), // Performs a top-to-bottom copy of the input menu and all of its // submenus. // -// This is mostly needed for 2.4 compatability. However wxPython and others +// This is mostly needed for 2.4 compatibility. However wxPython and others // still use this way of setting the taskbarmenu. //----------------------------------------------------------------------------- wxMenu * wxDeepCopyMenu( wxMenu *menu ) @@ -463,14 +462,14 @@ IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler) // // Note that we only support DOCK currently as others require cocoa and // also some require hacks and other such things. (MenuExtras are -// actually seperate programs that also require a special undocumented id +// actually separate programs that also require a special undocumented id // hack and other such fun stuff). //----------------------------------------------------------------------------- wxTaskBarIcon::wxTaskBarIcon(wxTaskBarIconType WXUNUSED_UNLESS_DEBUG(nType)) { wxASSERT_MSG( - nType == DOCK, - wxT("Only the DOCK implementation of wxTaskBarIcon on Mac-Carbon is currently supported!") ); + nType == wxTBI_DOCK, + wxT("Only the wxTBI_DOCK implementation of wxTaskBarIcon on Mac-Carbon is currently supported!") ); m_impl = new wxDockTaskBarIcon(this); } diff --git a/Externals/wxWidgets3/src/osx/carbon/textctrl.cpp b/Externals/wxWidgets3/src/osx/carbon/textctrl.cpp index c3f0ecf999..02ba93ad33 100644 --- a/Externals/wxWidgets3/src/osx/carbon/textctrl.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/textctrl.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Ryan Norton (MLTE GetLineLength and GetLineText) // Created: 1998-01-01 -// RCS-ID: $Id: textctrl.cpp 66028 2010-11-05 21:38:25Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -434,7 +433,7 @@ static pascal OSStatus wxMacUnicodeTextControlControlEventHandler( EventHandlerC ControlPartCode controlPart = cEvent.GetParameter(kEventParamControlPart , typeControlPartCode ); if ( controlPart == kControlFocusNoPart ) { - // about to loose focus -> store selection to field + // about to lose focus -> store selection to field focus->GetData( 0, kControlEditTextSelectionTag, &focus->m_selection ); } result = CallNextEventHandler(handler,event) ; diff --git a/Externals/wxWidgets3/src/osx/carbon/tglbtn.cpp b/Externals/wxWidgets3/src/osx/carbon/tglbtn.cpp index b7fc74bc2f..d4593c0a24 100644 --- a/Externals/wxWidgets3/src/osx/carbon/tglbtn.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/tglbtn.cpp @@ -5,7 +5,6 @@ // Author: Stefan Csomor // Modified by: // Created: 08.02.01 -// RCS-ID: $Id: tglbtn.cpp 64940 2010-07-13 13:29:13Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/thread.cpp b/Externals/wxWidgets3/src/osx/carbon/thread.cpp index 790f45cd3d..dcb7bd778a 100644 --- a/Externals/wxWidgets3/src/osx/carbon/thread.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/thread.cpp @@ -4,7 +4,6 @@ // Author: Original from Wolfram Gloger/Guilhem Lavaux/Vadim Zeitlin // Modified by: Aj Lavin, Stefan Csomor // Created: 04/22/98 -// RCS-ID: $Id: thread.cpp 69883 2011-12-01 14:22:15Z VZ $ // Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998), // Vadim Zeitlin (1999), Stefan Csomor (2000) // Licence: wxWindows licence @@ -475,7 +474,7 @@ public: { m_tid = kInvalidID; m_state = STATE_NEW; - m_prio = WXTHREAD_DEFAULT_PRIORITY; + m_prio = wxPRIORITY_DEFAULT; m_notifyQueueId = kInvalidID; m_exitcode = 0; m_cancelled = false ; @@ -624,7 +623,7 @@ OSStatus wxThreadInternal::MacThreadStart(void *parameter) if ( !dontRunAtAll ) { - pthread->m_exitcode = thread->Entry(); + pthread->m_exitcode = thread->CallEntry(); { wxCriticalSectionLocker lock(thread->m_critsect); @@ -656,6 +655,9 @@ bool wxThreadInternal::Create( wxThread *thread, unsigned int stackSize ) wxASSERT_MSG( m_state == STATE_NEW && !m_tid, wxT("Create()ing thread twice?") ); + if ( thread->IsDetached() ) + Detach(); + OSStatus err = noErr; m_thread = thread; @@ -664,7 +666,7 @@ bool wxThreadInternal::Create( wxThread *thread, unsigned int stackSize ) OSStatus err = MPCreateQueue( &m_notifyQueueId ); if (err != noErr) { - wxLogSysError( wxT("Cant create the thread event queue") ); + wxLogSysError( wxT("Can't create the thread event queue") ); return false; } @@ -683,7 +685,7 @@ bool wxThreadInternal::Create( wxThread *thread, unsigned int stackSize ) return false; } - if ( m_prio != WXTHREAD_DEFAULT_PRIORITY ) + if ( m_prio != wxPRIORITY_DEFAULT ) SetPriority( m_prio ); return true; @@ -868,13 +870,9 @@ wxThreadError wxThread::Create( unsigned int stackSize ) { wxCriticalSectionLocker lock(m_critsect); - if ( m_isDetached ) - m_internal->Detach() ; - if ( !m_internal->Create(this, stackSize) ) { m_internal->SetState( STATE_EXITED ); - return wxTHREAD_NO_RESOURCE; } @@ -885,6 +883,17 @@ wxThreadError wxThread::Run() { wxCriticalSectionLocker lock(m_critsect); + // Create the thread if it wasn't created yet with an explicit + // Create() call: + if ( m_internal->GetId() == kInvalidID ) + { + if ( !m_internal->Create(this, stackSize) ) + { + m_internal->SetState( STATE_EXITED ); + return wxTHREAD_NO_RESOURCE; + } + } + wxCHECK_MSG( m_internal->GetId(), wxTHREAD_MISC_ERROR, wxT("must call wxThread::Create() first") ); @@ -1110,8 +1119,7 @@ bool wxThread::TestDestroy() void wxThread::SetPriority(unsigned int prio) { - wxCHECK_RET( ((int)WXTHREAD_MIN_PRIORITY <= (int)prio) && - ((int)prio <= (int)WXTHREAD_MAX_PRIORITY), + wxCHECK_RET( wxPRIORITY_MIN <= prio && prio <= wxPRIORITY_MAX, wxT("invalid thread priority") ); wxCriticalSectionLocker lock(m_critsect); diff --git a/Externals/wxWidgets3/src/osx/carbon/timer.cpp b/Externals/wxWidgets3/src/osx/carbon/timer.cpp index 441a8ea8c7..be218af294 100644 --- a/Externals/wxWidgets3/src/osx/carbon/timer.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/timer.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: timer.cpp 64943 2010-07-13 13:29:58Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/toolbar.cpp b/Externals/wxWidgets3/src/osx/carbon/toolbar.cpp index 15eab65220..a44e23bbda 100644 --- a/Externals/wxWidgets3/src/osx/carbon/toolbar.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/toolbar.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: toolbar.cpp 67230 2011-03-18 14:20:12Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -932,6 +931,15 @@ wxToolBar::~wxToolBar() if ( !m_macToolbar ) return; + // it might already have been uninstalled due to a previous call to Destroy, but in case + // wasn't, do so now, otherwise redraw events may occur for deleted objects + bool ownToolbarInstalled = false; + MacTopLevelHasNativeToolbar( &ownToolbarInstalled ); + if (ownToolbarInstalled) + { + MacUninstallNativeToolbar(); + } + CFIndex count = CFGetRetainCount( m_macToolbar ) ; // Leopard seems to have one refcount more, so we cannot check reliably at the moment if ( UMAGetSystemVersion() < 0x1050 ) @@ -1111,7 +1119,7 @@ bool wxToolBar::MacInstallNativeToolbar(bool usesNative) // which we don't want in this case wxSize sz = GetParent()->GetSize(); ShowHideWindowToolbar( tlw, true, false ); - // Restore the orginal size + // Restore the original size GetParent()->SetSize( sz ); ChangeWindowAttributes( tlw, kWindowToolbarButtonAttribute, 0 ); diff --git a/Externals/wxWidgets3/src/osx/carbon/tooltip.cpp b/Externals/wxWidgets3/src/osx/carbon/tooltip.cpp index b86c426815..66f99826e0 100644 --- a/Externals/wxWidgets3/src/osx/carbon/tooltip.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/tooltip.cpp @@ -2,7 +2,6 @@ // Name: src/osx/carbon/tooltip.cpp // Purpose: wxToolTip implementation // Author: Stefan Csomor -// Id: $Id: tooltip.cpp 64656 2010-06-20 18:18:23Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/uma.cpp b/Externals/wxWidgets3/src/osx/carbon/uma.cpp index 1a51c2ecee..2773665f4a 100644 --- a/Externals/wxWidgets3/src/osx/carbon/uma.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/uma.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: uma.cpp 68721 2011-08-16 12:17:13Z SC $ // Copyright: (c) Stefan Csomor // Licence: The wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/carbon/utils.cpp b/Externals/wxWidgets3/src/osx/carbon/utils.cpp index c3d40685f4..8598ad1be8 100644 --- a/Externals/wxWidgets3/src/osx/carbon/utils.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/utils.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: utils.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -45,13 +44,7 @@ #include "wx/evtloop.h" -#if defined(__MWERKS__) && wxUSE_UNICODE -#if __MWERKS__ < 0x4100 - #include -#endif -#endif - -#if wxUSE_BASE +#if wxUSE_GUI // Emit a beeeeeep void wxBell() @@ -69,10 +62,6 @@ void wxBell() #endif } -#endif // wxUSE_BASE - -#if wxUSE_GUI - wxTimerImpl* wxGUIAppTraits::CreateTimerImpl(wxTimer *timer) { return new wxOSXTimerImpl(timer); diff --git a/Externals/wxWidgets3/src/osx/carbon/utilscocoa.mm b/Externals/wxWidgets3/src/osx/carbon/utilscocoa.mm index 752d9e78c5..000f6710a4 100644 --- a/Externals/wxWidgets3/src/osx/carbon/utilscocoa.mm +++ b/Externals/wxWidgets3/src/osx/carbon/utilscocoa.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: utilscocoa.mm 70399 2012-01-19 14:04:47Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -193,7 +192,7 @@ WX_NSFont wxFont::OSXCreateNSFont(wxOSXSystemFont font, wxNativeFontInfo* info) } static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } -static const NSAffineTransformStruct kSlantNSTransformStruct = { 1, 0, tan(DegToRad(11)), 1, 0, 0 }; +static const NSAffineTransformStruct kSlantNSTransformStruct = { 1, 0, static_cast(tan(DegToRad(11))), 1, 0, 0 }; WX_NSFont wxFont::OSXCreateNSFont(const wxNativeFontInfo* info) { @@ -343,6 +342,19 @@ WX_UIFont wxFont::OSXCreateUIFont(const wxNativeFontInfo* info) return uiFont; } +#endif + +// ---------------------------------------------------------------------------- +// NSWindow Utils +// ---------------------------------------------------------------------------- + +#if wxOSX_USE_COCOA + +WXWindow wxOSXGetMainWindow() +{ + return [NSApp mainWindow]; +} + #endif // ---------------------------------------------------------------------------- // NSImage Utils @@ -368,6 +380,33 @@ wxBitmap wxOSXCreateSystemBitmap(const wxString& name, const wxString &client, c #endif } +double wxOSXGetMainScreenContentScaleFactor() +{ + double scale; + +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 + if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) + { + scale=[[UIScreen mainScreen] scale]; + } + else +#endif + { + scale=1.0; + } + + return scale; +} + +#endif + +#if wxOSX_USE_CARBON + +double wxOSXGetMainScreenContentScaleFactor() +{ + return 1.0; +} + #endif #if wxOSX_USE_COCOA @@ -375,18 +414,17 @@ wxBitmap wxOSXCreateSystemBitmap(const wxString& name, const wxString &client, c wxBitmap wxOSXCreateSystemBitmap(const wxString& name, const wxString &WXUNUSED(client), const wxSize& WXUNUSED(size)) { wxCFStringRef cfname(name); - wxCFRef image( wxOSXCreateCGImageFromNSImage([NSImage imageNamed:cfname.AsNSString()]) ); - return wxBitmap( image ); + return wxBitmap( [NSImage imageNamed:cfname.AsNSString()] ); } // From "Cocoa Drawing Guide:Working with Images" -WX_NSImage wxOSXGetNSImageFromCGImage( CGImageRef image ) +WX_NSImage wxOSXGetNSImageFromCGImage( CGImageRef image, double scaleFactor ) { NSRect imageRect = NSMakeRect(0.0, 0.0, 0.0, 0.0); // Get the image dimensions. - imageRect.size.height = CGImageGetHeight(image); - imageRect.size.width = CGImageGetWidth(image); + imageRect.size.height = CGImageGetHeight(image)/scaleFactor; + imageRect.size.width = CGImageGetWidth(image)/scaleFactor; // Create a new image to receive the Quartz image data. NSImage *newImage = [[NSImage alloc] initWithSize:imageRect.size]; @@ -409,22 +447,57 @@ WX_NSImage wxOSXGetNSImageFromCGImage( CGImageRef image ) return( newImage ); } -CGImageRef wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage ) +CGContextRef WXDLLIMPEXP_CORE wxOSXCreateBitmapContextFromNSImage( WX_NSImage nsimage) { // based on http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg18065.html - - CGImageRef image = NULL; + + CGContextRef hbitmap = NULL; if (nsimage != nil) { + double scale = wxOSXGetMainScreenContentScaleFactor(); + NSSize imageSize = [nsimage size]; - CGContextRef context = CGBitmapContextCreate(NULL, imageSize.width, imageSize.height, 8, 0, wxMacGetGenericRGBColorSpace(), kCGImageAlphaPremultipliedFirst); - NSGraphicsContext *nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:context flipped:NO]; + + hbitmap = CGBitmapContextCreate(NULL, imageSize.width*scale, imageSize.height*scale, 8, 0, wxMacGetGenericRGBColorSpace(), kCGImageAlphaPremultipliedFirst); + CGContextScaleCTM( hbitmap, scale, scale ); + + NSGraphicsContext *nsGraphicsContext = [NSGraphicsContext graphicsContextWithGraphicsPort:hbitmap flipped:NO]; [NSGraphicsContext saveGraphicsState]; [NSGraphicsContext setCurrentContext:nsGraphicsContext]; [[NSColor whiteColor] setFill]; NSRectFill(NSMakeRect(0.0, 0.0, imageSize.width, imageSize.height)); [nsimage drawAtPoint:NSZeroPoint fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0]; [NSGraphicsContext setCurrentContext:nsGraphicsContext]; + } + return hbitmap; +} + +double wxOSXGetMainScreenContentScaleFactor() +{ +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7) + if ( [ [NSScreen mainScreen] respondsToSelector:@selector(backingScaleFactor)] ) + return [[NSScreen mainScreen] backingScaleFactor]; + else +#endif + return 1.0; +} + +CGImageRef wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage, double *scaleptr ) +{ + // based on http://www.mail-archive.com/cocoa-dev@lists.apple.com/msg18065.html + + CGImageRef image = NULL; + if (nsimage != nil) + { + CGContextRef context = wxOSXCreateBitmapContextFromNSImage(nsimage); + if ( scaleptr ) + { + // determine content scale + CGRect userrect = CGRectMake(0, 0, 10, 10); + CGRect devicerect; + devicerect = CGContextConvertRectToDeviceSpace(context, userrect); + *scaleptr = devicerect.size.height / userrect.size.height; + } image = CGBitmapContextCreateImage(context); CFRelease(context); } diff --git a/Externals/wxWidgets3/src/osx/carbon/window.cpp b/Externals/wxWidgets3/src/osx/carbon/window.cpp index 3b1e3f79a4..5a4a0bf791 100644 --- a/Externals/wxWidgets3/src/osx/carbon/window.cpp +++ b/Externals/wxWidgets3/src/osx/carbon/window.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: window.cpp 69440 2011-10-16 15:59:31Z SJL $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -87,6 +86,12 @@ WXWidget wxWidgetImpl::FindFocus() return control; } +// no compositing to take into account under carbon +wxWidgetImpl* wxWidgetImpl::FindBestFromWXWidget(WXWidget control) +{ + return FindFromWXWidget(control); +} + // --------------------------------------------------------------------------- // Carbon Events // --------------------------------------------------------------------------- @@ -653,8 +658,7 @@ WXDLLEXPORT pascal OSStatus wxMacUnicodeTextEventHandler( EventHandlerCallRef ha I don't have time to look into that right now. -- CL */ - if ( wxTheApp->MacSendCharEvent( - focus , message , 0 , when , 0 , 0 , uniChars[pos] ) ) + if ( wxTheApp->MacSendCharEvent( focus , message , 0 , when , uniChars[pos] ) ) { result = noErr ; } @@ -666,15 +670,13 @@ WXDLLEXPORT pascal OSStatus wxMacUnicodeTextEventHandler( EventHandlerCallRef ha case kEventTextInputUnicodeForKeyEvent : { UInt32 keyCode, modifiers ; - Point point ; EventRef rawEvent ; unsigned char charCode ; GetEventParameter( event, kEventParamTextInputSendKeyboardEvent, typeEventRef, NULL, sizeof(rawEvent), NULL, &rawEvent ) ; - GetEventParameter( rawEvent, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &charCode ); + GetEventParameter( rawEvent, kEventParamKeyMacCharCodes, typeChar, NULL, 1, NULL, &charCode ); GetEventParameter( rawEvent, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode ); GetEventParameter( rawEvent, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers ); - GetEventParameter( rawEvent, kEventParamMouseLocation, typeQDPoint, NULL, sizeof(Point), NULL, &point ); UInt32 message = (keyCode << 8) + charCode; @@ -686,8 +688,7 @@ WXDLLEXPORT pascal OSStatus wxMacUnicodeTextEventHandler( EventHandlerCallRef ha WXEVENTHANDLERCALLREF formerHandler = wxTheApp->MacGetCurrentEventHandlerCallRef() ; wxTheApp->MacSetCurrentEvent( event , handler ) ; - if ( wxTheApp->MacSendCharEvent( - focus , message , modifiers , when , point.h , point.v , uniChars[pos] ) ) + if ( wxTheApp->MacSendCharEvent( focus , message , modifiers , when , uniChars[pos] ) ) { result = noErr ; } @@ -1408,7 +1409,15 @@ void wxMacControl::Enable( bool enable ) void wxMacControl::SetDrawingEnabled( bool enable ) { - HIViewSetDrawingEnabled( m_controlRef , enable ); + if ( enable ) + { + HIViewSetDrawingEnabled( m_controlRef , true ); + HIViewSetNeedsDisplay( m_controlRef, true); + } + else + { + HIViewSetDrawingEnabled( m_controlRef , false ); + } } void wxMacControl::GetRectInWindowCoords( Rect *r ) diff --git a/Externals/wxWidgets3/src/osx/checkbox_osx.cpp b/Externals/wxWidgets3/src/osx/checkbox_osx.cpp index 6ec54eaaea..6e4d58a680 100644 --- a/Externals/wxWidgets3/src/osx/checkbox_osx.cpp +++ b/Externals/wxWidgets3/src/osx/checkbox_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: checkbox_osx.cpp 67892 2011-06-08 23:02:25Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -128,7 +127,7 @@ bool wxCheckBox::OSXHandleClicked( double WXUNUSED(timestampsec) ) if (sendEvent) { - wxCommandEvent event( wxEVT_COMMAND_CHECKBOX_CLICKED, m_windowId ); + wxCommandEvent event( wxEVT_CHECKBOX, m_windowId ); event.SetInt( newState ); event.SetEventObject( this ); ProcessCommand( event ); diff --git a/Externals/wxWidgets3/src/osx/checklst_osx.cpp b/Externals/wxWidgets3/src/osx/checklst_osx.cpp index 1dd27e13d3..8b4b28a897 100644 --- a/Externals/wxWidgets3/src/osx/checklst_osx.cpp +++ b/Externals/wxWidgets3/src/osx/checklst_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: checklst_osx.cpp 67243 2011-03-19 08:36:23Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -116,7 +115,7 @@ void wxCheckListBox::SetValueCallback( unsigned int n, wxListWidgetColumn* col , { Check( n, value.IsChecked() ); - wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, GetId() ); + wxCommandEvent event( wxEVT_CHECKLISTBOX, GetId() ); event.SetInt( n ); event.SetString( GetString( n ) ); event.SetEventObject( this ); diff --git a/Externals/wxWidgets3/src/osx/choice_osx.cpp b/Externals/wxWidgets3/src/osx/choice_osx.cpp index 611ccabfbc..fd9a59daa7 100644 --- a/Externals/wxWidgets3/src/osx/choice_osx.cpp +++ b/Externals/wxWidgets3/src/osx/choice_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: choice_osx.cpp 67343 2011-03-30 14:16:04Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -100,6 +99,13 @@ bool wxChoice::Create(wxWindow *parent, // adding/deleting items to/from the list // ---------------------------------------------------------------------------- +void wxChoice::DoAfterItemCountChange() +{ + InvalidateBestSize(); + + GetPeer()->SetMaximum( GetCount() ); +} + int wxChoice::DoInsertItems(const wxArrayStringsAdapter & items, unsigned int pos, void **clientData, wxClientDataType type) @@ -132,7 +138,7 @@ int wxChoice::DoInsertItems(const wxArrayStringsAdapter & items, AssignNewItemClientData(idx, clientData, i, type); } - GetPeer()->SetMaximum( GetCount() ); + DoAfterItemCountChange(); return pos - 1; } @@ -148,8 +154,8 @@ void wxChoice::DoDeleteOneItem(unsigned int n) m_strings.RemoveAt( n ) ; m_datas.RemoveAt( n ) ; - GetPeer()->SetMaximum( GetCount() ) ; + DoAfterItemCountChange(); } void wxChoice::DoClear() @@ -162,7 +168,7 @@ void wxChoice::DoClear() m_strings.Empty() ; m_datas.Empty() ; - GetPeer()->SetMaximum( 0 ) ; + DoAfterItemCountChange(); } // ---------------------------------------------------------------------------- @@ -229,60 +235,20 @@ void * wxChoice::DoGetItemClientData(unsigned int n) const bool wxChoice::OSXHandleClicked( double WXUNUSED(timestampsec) ) { - wxCommandEvent event( wxEVT_COMMAND_CHOICE_SELECTED, m_windowId ); - - // actually n should be made sure by the os to be a valid selection, but ... - int n = GetSelection(); - if ( n > -1 ) - { - event.SetInt( n ); - event.SetString( GetStringSelection() ); - event.SetEventObject( this ); - - if ( HasClientObjectData() ) - event.SetClientObject( GetClientObject( n ) ); - else if ( HasClientUntypedData() ) - event.SetClientData( GetClientData( n ) ); - - ProcessCommand( event ); - } + SendSelectionChangedEvent(wxEVT_CHOICE); return true ; } wxSize wxChoice::DoGetBestSize() const { - int lbWidth = GetCount() > 0 ? 20 : 100; // some defaults - wxSize baseSize = wxWindow::DoGetBestSize(); - int lbHeight = baseSize.y; - int wLine; + // We use the base window size for the height (which is wrong as it doesn't + // take the font into account -- TODO) and add some margins to the width + // computed by the base class method to account for the arrow. + const int lbHeight = wxWindow::DoGetBestSize().y; - { - wxClientDC dc(const_cast(this)); - - // Find the widest line - for(unsigned int i = 0; i < GetCount(); i++) - { - wxString str(GetString(i)); - - wxCoord width, height ; - dc.GetTextExtent( str , &width, &height); - wLine = width ; - - lbWidth = wxMax( lbWidth, wLine ) ; - } - - // Add room for the popup arrow - lbWidth += 2 * lbHeight ; - - wxCoord width, height ; - dc.GetTextExtent( wxT("X"), &width, &height); - int cx = width ; - - lbWidth += cx ; - } - - return wxSize( lbWidth, lbHeight ); + return wxSize(wxChoiceBase::DoGetBestSize().x + 2*lbHeight + GetCharWidth(), + lbHeight); } #endif // wxUSE_CHOICE diff --git a/Externals/wxWidgets3/src/osx/cocoa/aboutdlg.mm b/Externals/wxWidgets3/src/osx/cocoa/aboutdlg.mm index 3182a3f052..45b5456c76 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/aboutdlg.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/aboutdlg.mm @@ -3,7 +3,6 @@ // Purpose: native wxAboutBox() implementation for wxMac // Author: Vadim Zeitlin // Created: 2006-10-08 -// RCS-ID: $Id: aboutdlg.mm 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -81,7 +80,8 @@ void wxAboutBox(const wxAboutDialogInfo& info, wxWindow *parent) if ( info.HasVersion() ) { opts.Set(CFSTR("Version"),info.GetVersion()); - opts.Set(CFSTR("ApplicationVersion"),info.GetLongVersion()); + if ( info.GetLongVersion() != (_("Version ")+info.GetVersion())) + opts.Set(CFSTR("ApplicationVersion"),info.GetLongVersion()); } if ( info.HasCopyright() ) diff --git a/Externals/wxWidgets3/src/osx/cocoa/anybutton.mm b/Externals/wxWidgets3/src/osx/cocoa/anybutton.mm index 866866f350..299dcba2bc 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/anybutton.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/anybutton.mm @@ -3,7 +3,6 @@ // Purpose: wxAnyButton // Author: Stefan Csomor // Created: 1998-01-01 (extracted from button.mm) -// RCS-ID: $Id: anybutton.mm 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/button.mm b/Externals/wxWidgets3/src/osx/cocoa/button.mm index e775a3b7bc..35c2c4d941 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/button.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/button.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: button.mm 70402 2012-01-19 15:01:01Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -16,6 +15,8 @@ #endif #include "wx/button.h" +#include "wx/toplevel.h" +#include "wx/tglbtn.h" #include "wx/osx/private.h" @@ -81,136 +82,216 @@ - (NSControlSize)controlSize; @end -namespace +wxButtonCocoaImpl::wxButtonCocoaImpl(wxWindowMac *wxpeer, wxNSButton *v) +: wxWidgetCocoaImpl(wxpeer, v) { + SetNeedsFrame(false); +} -class wxButtonCocoaImpl : public wxWidgetCocoaImpl, public wxButtonImpl +void wxButtonCocoaImpl::SetBitmap(const wxBitmap& bitmap) { -public: - wxButtonCocoaImpl(wxWindowMac *wxpeer, wxNSButton *v) - : wxWidgetCocoaImpl(wxpeer, v) + // switch bezel style for plain pushbuttons + if ( bitmap.IsOk() ) { - SetNeedsFrame(false); + if ([GetNSButton() bezelStyle] == NSRoundedBezelStyle) + [GetNSButton() setBezelStyle:NSRegularSquareBezelStyle]; } - - virtual void SetBitmap(const wxBitmap& bitmap) + else { - // switch bezel style for plain pushbuttons - if ( bitmap.IsOk() ) - { - if ([GetNSButton() bezelStyle] == NSRoundedBezelStyle) - [GetNSButton() setBezelStyle:NSRegularSquareBezelStyle]; - } - else - { - [GetNSButton() setBezelStyle:NSRoundedBezelStyle]; - } - - wxWidgetCocoaImpl::SetBitmap(bitmap); + [GetNSButton() setBezelStyle:NSRoundedBezelStyle]; } + + wxWidgetCocoaImpl::SetBitmap(bitmap); +} #if wxUSE_MARKUP - virtual void SetLabelMarkup(const wxString& markup) - { - wxMarkupToAttrString toAttr(GetWXPeer(), markup); - NSMutableAttributedString *attrString = toAttr.GetNSAttributedString(); - - // Button text is always centered. - NSMutableParagraphStyle * - paragraphStyle = [[NSMutableParagraphStyle alloc] init]; - [paragraphStyle setAlignment: NSCenterTextAlignment]; - [attrString addAttribute:NSParagraphStyleAttributeName - value:paragraphStyle - range:NSMakeRange(0, [attrString length])]; - [paragraphStyle release]; - - [GetNSButton() setAttributedTitle:attrString]; - } +void wxButtonCocoaImpl::SetLabelMarkup(const wxString& markup) +{ + wxMarkupToAttrString toAttr(GetWXPeer(), markup); + NSMutableAttributedString *attrString = toAttr.GetNSAttributedString(); + + // Button text is always centered. + NSMutableParagraphStyle * + paragraphStyle = [[NSMutableParagraphStyle alloc] init]; + [paragraphStyle setAlignment: NSCenterTextAlignment]; + [attrString addAttribute:NSParagraphStyleAttributeName + value:paragraphStyle + range:NSMakeRange(0, [attrString length])]; + [paragraphStyle release]; + + [GetNSButton() setAttributedTitle:attrString]; +} #endif // wxUSE_MARKUP - void SetPressedBitmap( const wxBitmap& bitmap ) +void wxButtonCocoaImpl::SetPressedBitmap( const wxBitmap& bitmap ) +{ + NSButton* button = GetNSButton(); + [button setAlternateImage: bitmap.GetNSImage()]; + if ( GetWXPeer()->IsKindOf(wxCLASSINFO(wxToggleButton)) ) + { + [button setButtonType:NSToggleButton]; + } + else { - NSButton* button = GetNSButton(); - [button setAlternateImage: bitmap.GetNSImage()]; [button setButtonType:NSMomentaryChangeButton]; } +} - void GetLayoutInset(int &left , int &top , int &right, int &bottom) const - { - left = top = right = bottom = 0; - NSControlSize size = NSRegularControlSize; - if ( [m_osxView respondsToSelector:@selector(controlSize)] ) - size = [m_osxView controlSize]; - else if ([m_osxView respondsToSelector:@selector(cell)]) - { - id cell = [(id)m_osxView cell]; - if ([cell respondsToSelector:@selector(controlSize)]) - size = [cell controlSize]; - } - - if ( [GetNSButton() bezelStyle] == NSRoundedBezelStyle ) - { - switch( size ) - { - case NSRegularControlSize: - left = right = 6; - top = 4; - bottom = 8; - break; - case NSSmallControlSize: - left = right = 5; - top = 4; - bottom = 7; - break; - case NSMiniControlSize: - left = right = 1; - top = 0; - bottom = 2; - break; - } - } - } - - -private: - NSButton *GetNSButton() const - { - wxASSERT( [m_osxView isKindOfClass:[NSButton class]] ); - - return static_cast(m_osxView); - } -}; - -} // anonymous namespace - -extern "C" void SetBezelStyleFromBorderFlags(NSButton *v, long style); - -// set bezel style depending on the wxBORDER_XXX flags specified by the style -void SetBezelStyleFromBorderFlags(NSButton *v, long style) +void wxButtonCocoaImpl::GetLayoutInset(int &left , int &top , int &right, int &bottom) const { - if ( style & wxBORDER_NONE ) + left = top = right = bottom = 0; + NSControlSize size = NSRegularControlSize; + if ( [m_osxView respondsToSelector:@selector(controlSize)] ) + size = [m_osxView controlSize]; + else if ([m_osxView respondsToSelector:@selector(cell)]) { - [v setBezelStyle:NSShadowlessSquareBezelStyle]; - [v setBordered:NO]; + id cell = [(id)m_osxView cell]; + if ([cell respondsToSelector:@selector(controlSize)]) + size = [cell controlSize]; } - else // we do have a border + + if ( [GetNSButton() bezelStyle] == NSRoundedBezelStyle ) { - // see trac #11128 for a thorough discussion - if ( (style & wxBORDER_MASK) == wxBORDER_RAISED ) - [v setBezelStyle:NSRegularSquareBezelStyle]; - else if ( (style & wxBORDER_MASK) == wxBORDER_SUNKEN ) - [v setBezelStyle:NSSmallSquareBezelStyle]; - else if ( (style & wxBORDER_MASK) == wxBORDER_SIMPLE ) - [v setBezelStyle:NSShadowlessSquareBezelStyle]; - else - [v setBezelStyle:NSRegularSquareBezelStyle]; + switch( size ) + { + case NSRegularControlSize: + left = right = 6; + top = 4; + bottom = 8; + break; + case NSSmallControlSize: + left = right = 5; + top = 4; + bottom = 7; + break; + case NSMiniControlSize: + left = right = 1; + top = 0; + bottom = 2; + break; + } } } +void wxButtonCocoaImpl::SetAcceleratorFromLabel(const wxString& label) +{ + const int accelPos = wxControl::FindAccelIndex(label); + if ( accelPos != wxNOT_FOUND ) + { + wxString accelstring(label[accelPos + 1]); // Skip '&' itself + accelstring.MakeLower(); + wxCFStringRef cfText(accelstring); + [GetNSButton() setKeyEquivalent:cfText.AsNSString()]; + [GetNSButton() setKeyEquivalentModifierMask:NSCommandKeyMask]; + } + else + { + [GetNSButton() setKeyEquivalent:@""]; + } +} + +NSButton *wxButtonCocoaImpl::GetNSButton() const +{ + wxASSERT( [m_osxView isKindOfClass:[NSButton class]] ); + + return static_cast(m_osxView); +} + +// Set bezel style depending on the wxBORDER_XXX flags specified by the style +// and also accounting for the label (bezels are different for multiline +// buttons and normal ones) and the ID (special bezel is used for help button). +// +// This is extern because it's also used in src/osx/cocoa/tglbtn.mm. +extern "C" +void +SetBezelStyleFromBorderFlags(NSButton *v, + long style, + wxWindowID winid, + const wxString& label = wxString(), + const wxBitmap& bitmap = wxBitmap()) +{ + // We can't display a custom label inside a button with help bezel style so + // we only use it if we are using the default label. wxButton itself checks + // if the label is just "Help" in which case it discards it and passes us + // an empty string. + if ( winid == wxID_HELP && label.empty() ) + { + [v setBezelStyle:NSHelpButtonBezelStyle]; + } + else + { + // We can't use rounded bezel styles neither for multiline buttons nor + // for buttons containing (big) icons as they are only meant to be used + // at certain sizes, so the style used depends on whether the label is + // single or multi line. + const bool + isSimpleText = (label.find_first_of("\n\r") == wxString::npos) + && (!bitmap.IsOk() || bitmap.GetHeight() < 20); + + NSBezelStyle bezel; + switch ( style & wxBORDER_MASK ) + { + case wxBORDER_NONE: + bezel = NSShadowlessSquareBezelStyle; + [v setBordered:NO]; + break; + + case wxBORDER_SIMPLE: + bezel = NSShadowlessSquareBezelStyle; + break; + + case wxBORDER_SUNKEN: + bezel = isSimpleText ? NSTexturedRoundedBezelStyle + : NSSmallSquareBezelStyle; + break; + + default: + wxFAIL_MSG( "Unknown border style" ); + // fall through + + case 0: + case wxBORDER_STATIC: + case wxBORDER_RAISED: + case wxBORDER_THEME: + bezel = isSimpleText ? NSRoundedBezelStyle + : NSRegularSquareBezelStyle; + break; + } + + [v setBezelStyle:bezel]; + } +} + +// Set the keyboard accelerator key from the label (e.g. "Click &Me") +void wxButton::OSXUpdateAfterLabelChange(const wxString& label) +{ + wxButtonCocoaImpl *impl = static_cast(GetPeer()); + + // Update the bezel style as may be necessary if our new label is multi + // line while the old one wasn't (or vice versa). + SetBezelStyleFromBorderFlags(impl->GetNSButton(), + GetWindowStyle(), + GetId(), + label); + + + // Skip setting the accelerator for the default buttons as this would + // overwrite the default "Enter" which should be preserved. + wxTopLevelWindow * const + tlw = wxDynamicCast(wxGetTopLevelParent(this), wxTopLevelWindow); + if ( tlw ) + { + if ( tlw->GetDefaultItem() == this ) + return; + } + + impl->SetAcceleratorFromLabel(label); +} + wxWidgetImplType* wxWidgetImpl::CreateButton( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), - wxWindowID id, + wxWindowID winid, const wxString& label, const wxPoint& pos, const wxSize& size, @@ -220,53 +301,12 @@ wxWidgetImplType* wxWidgetImpl::CreateButton( wxWindowMac* wxpeer, NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; - // We can't display a custom label inside a button with help bezel style so - // we only use it if we are using the default label. wxButton itself checks - // if the label is just "Help" in which case it discards it and passes us - // an empty string. - if ( id == wxID_HELP && label.empty() ) - { - [v setBezelStyle:NSHelpButtonBezelStyle]; - } - else - { - if ( style & wxBORDER_NONE ) - { - [v setBezelStyle:NSShadowlessSquareBezelStyle]; - [v setBordered:NO]; - } - else - { - // the following styles only exist for certain sizes, so avoid them for - // multi-line - if ( label.Find('\n' ) == wxNOT_FOUND && label.Find('\r' ) == wxNOT_FOUND) - { - if ( (style & wxBORDER_MASK) == wxBORDER_RAISED ) - [v setBezelStyle:NSRoundedBezelStyle]; - else if ( (style & wxBORDER_MASK) == wxBORDER_SUNKEN ) - [v setBezelStyle:NSTexturedRoundedBezelStyle]; - else if ( (style & wxBORDER_MASK) == wxBORDER_SIMPLE ) - [v setBezelStyle:NSShadowlessSquareBezelStyle]; - else - [v setBezelStyle:NSRoundedBezelStyle]; - } - else - { - if ( (style & wxBORDER_MASK) == wxBORDER_RAISED ) - [v setBezelStyle:NSRegularSquareBezelStyle]; - else if ( (style & wxBORDER_MASK) == wxBORDER_SUNKEN ) - [v setBezelStyle:NSSmallSquareBezelStyle]; - else if ( (style & wxBORDER_MASK) == wxBORDER_SIMPLE ) - [v setBezelStyle:NSShadowlessSquareBezelStyle]; - else - [v setBezelStyle:NSRegularSquareBezelStyle]; - } + SetBezelStyleFromBorderFlags(v, style, winid, label); - } - } - [v setButtonType:NSMomentaryPushInButton]; - return new wxButtonCocoaImpl( wxpeer, v ); + wxButtonCocoaImpl* const impl = new wxButtonCocoaImpl( wxpeer, v ); + impl->SetAcceleratorFromLabel(label); + return impl; } void wxWidgetCocoaImpl::SetDefaultButton( bool isDefault ) @@ -274,7 +314,10 @@ void wxWidgetCocoaImpl::SetDefaultButton( bool isDefault ) if ( [m_osxView isKindOfClass:[NSButton class]] ) { if ( isDefault ) + { [(NSButton*)m_osxView setKeyEquivalent: @"\r" ]; + [(NSButton*)m_osxView setKeyEquivalentModifierMask: 0]; + } else [(NSButton*)m_osxView setKeyEquivalent: @"" ]; } @@ -290,7 +333,7 @@ void wxWidgetCocoaImpl::PerformClick() wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), + wxWindowID winid, const wxBitmap& bitmap, const wxPoint& pos, const wxSize& size, @@ -300,7 +343,7 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; - SetBezelStyleFromBorderFlags(v, style); + SetBezelStyleFromBorderFlags(v, style, winid, wxString(), bitmap); if (bitmap.IsOk()) [v setImage:bitmap.GetNSImage() ]; @@ -447,7 +490,7 @@ public : wxWidgetImplType* wxWidgetImpl::CreateDisclosureTriangle( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(winid), + wxWindowID winid, const wxString& label, const wxPoint& pos, const wxSize& size, @@ -459,7 +502,7 @@ wxWidgetImplType* wxWidgetImpl::CreateDisclosureTriangle( wxWindowMac* wxpeer, if ( !label.empty() ) [v setTitle:wxCFStringRef(label).AsNSString()]; - SetBezelStyleFromBorderFlags(v, style); + SetBezelStyleFromBorderFlags(v, style, winid, label); return new wxDisclosureTriangleCocoaImpl( wxpeer, v ); } diff --git a/Externals/wxWidgets3/src/osx/cocoa/checkbox.mm b/Externals/wxWidgets3/src/osx/cocoa/checkbox.mm index bc77962d08..941ea79a5a 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/checkbox.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/checkbox.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2008-08-20 -// RCS-ID: $Id: checkbox.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/choice.mm b/Externals/wxWidgets3/src/osx/cocoa/choice.mm index c9303988ad..0068d5d31d 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/choice.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/choice.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: choice.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/colour.mm b/Externals/wxWidgets3/src/osx/cocoa/colour.mm index c0acfd67e4..73df7fbf01 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/colour.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/colour.mm @@ -4,7 +4,6 @@ // Author: Kevin Ollivier // Modified by: // Created: 2009-10-31 -// RCS-ID: $Id: colour.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Kevin Ollivier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -42,5 +41,5 @@ wxColour::wxColour(WX_NSColor col) WX_NSColor wxColour::OSXGetNSColor() const { - return [NSColor colorWithDeviceRed:m_red / 255.0 green:m_green / 255.0 blue:m_blue / 255.0 alpha:m_alpha / 255.0]; + return [NSColor colorWithCalibratedRed:m_red / 255.0 green:m_green / 255.0 blue:m_blue / 255.0 alpha:m_alpha / 255.0]; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/combobox.mm b/Externals/wxWidgets3/src/osx/cocoa/combobox.mm index 61734d91cc..e817c64d8c 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/combobox.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/combobox.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: combobox.mm 69948 2011-12-07 23:41:06Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -14,6 +13,7 @@ #if wxUSE_COMBOBOX #include "wx/combobox.h" +#include "wx/evtloop.h" #ifndef WX_PRECOMP #include "wx/menu.h" @@ -35,12 +35,6 @@ @end -@interface wxNSComboBox : NSComboBox -{ -} - -@end - @implementation wxNSComboBox + (void)initialize @@ -53,6 +47,33 @@ } } +- (void) dealloc +{ + [fieldEditor release]; + [super dealloc]; +} + +// Over-riding NSComboBox onKeyDown method doesn't work for key events. +// Ensure that we can use our own wxNSTextFieldEditor to catch key events. +// See windowWillReturnFieldEditor in nonownedwnd.mm. +// Key events will be caught and handled via wxNSTextFieldEditor onkey... +// methods in textctrl.mm. + +- (void) setFieldEditor:(wxNSTextFieldEditor*) editor +{ + if ( editor != fieldEditor ) + { + [editor retain]; + [fieldEditor release]; + fieldEditor = editor; + } +} + +- (wxNSTextFieldEditor*) fieldEditor +{ + return fieldEditor; +} + - (void)controlTextDidChange:(NSNotification *)aNotification { wxUnusedVar(aNotification); @@ -61,7 +82,7 @@ { wxWindow* wxpeer = (wxWindow*) impl->GetWXPeer(); if ( wxpeer ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, wxpeer->GetId()); + wxCommandEvent event(wxEVT_TEXT, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetString( static_cast(wxpeer)->GetValue() ); wxpeer->HandleWindowEvent( event ); @@ -75,15 +96,20 @@ wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if ( impl && impl->ShouldSendEvents()) { - wxWindow* wxpeer = (wxWindow*) impl->GetWXPeer(); + wxComboBox* wxpeer = static_cast(impl->GetWXPeer()); if ( wxpeer ) { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, wxpeer->GetId()); + const int sel = wxpeer->GetSelection(); + + wxCommandEvent event(wxEVT_COMBOBOX, wxpeer->GetId()); event.SetEventObject( wxpeer ); - event.SetInt( static_cast(wxpeer)->GetSelection() ); + event.SetInt( sel ); + event.SetString( wxpeer->GetString(sel) ); // For some reason, wxComboBox::GetValue will not return the newly selected item // while we're inside this callback, so use AddPendingEvent to make sure // GetValue() returns the right value. + wxpeer->GetEventHandler()->AddPendingEvent( event ); + } } } @@ -99,6 +125,30 @@ wxNSComboBoxControl::~wxNSComboBoxControl() { } +void wxNSComboBoxControl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd) +{ + // NSComboBox has its own event loop, which reacts very badly to our synthetic + // events used to signal when a wxEvent is posted, so during that time we switch + // the wxEventLoop::WakeUp implementation to a lower-level version + + bool reset = false; + wxEventLoop* const loop = (wxEventLoop*) wxEventLoopBase::GetActive(); + + if ( loop != NULL && [event type] == NSLeftMouseDown ) + { + reset = true; + loop->OSXUseLowLevelWakeup(true); + } + + wxOSX_EventHandlerPtr superimpl = (wxOSX_EventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd]; + superimpl(slf, (SEL)_cmd, event); + + if ( reset ) + { + loop->OSXUseLowLevelWakeup(false); + } +} + int wxNSComboBoxControl::GetSelectedItem() const { return [m_comboBox indexOfSelectedItem]; @@ -145,6 +195,7 @@ void wxNSComboBoxControl::Clear() { SendEvents(false); [m_comboBox removeAllItems]; + [m_comboBox setStringValue:@""]; SendEvents(true); } @@ -177,6 +228,15 @@ void wxNSComboBoxControl::Dismiss() [ax accessibilitySetValue: [NSNumber numberWithBool: NO] forAttribute: NSAccessibilityExpandedAttribute]; } +void wxNSComboBoxControl::SetEditable(bool editable) +{ + // TODO: unfortunately this does not work, setEditable just means the same as CB_READONLY + // I don't see a way to access the text field directly + + // Behavior NONE <- SELECTECTABLE + [m_comboBox setEditable:editable]; +} + wxWidgetImplType* wxWidgetImpl::CreateComboBox( wxComboBox* wxpeer, wxWindowMac* WXUNUSED(parent), wxWindowID WXUNUSED(id), diff --git a/Externals/wxWidgets3/src/osx/cocoa/dataview.mm b/Externals/wxWidgets3/src/osx/cocoa/dataview.mm index ad8dfe54ec..d2d219d18e 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/dataview.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/dataview.mm @@ -4,7 +4,6 @@ // Author: // Modified by: // Created: 2009-01-31 -// RCS-ID: $Id: dataview.mm$ // Copyright: // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -542,7 +541,7 @@ outlineView:(NSOutlineView*)outlineView wxCHECK_MSG( dvc->GetModel(), false, "Pointer to model not set correctly." ); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_DROP, dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_DROP, dvc->GetId()); event.SetEventObject(dvc); event.SetItem(wxDataViewItemFromItem(item)); event.SetModel(dvc->GetModel()); @@ -753,7 +752,7 @@ outlineView:(NSOutlineView*)outlineView // send first the event to wxWidgets that the sorting has changed so that // the program can do special actions before the sorting actually starts: - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED,dvc->GetId()); // variable defintion + wxDataViewEvent event(wxEVT_DATAVIEW_COLUMN_SORTED,dvc->GetId()); // variable definition event.SetEventObject(dvc); if (noOfDescriptors > 0) @@ -792,7 +791,7 @@ outlineView:(NSOutlineView*)outlineView wxCHECK_MSG(dvc->GetModel(), false, "Pointer to model not set correctly."); wxDataViewEvent - event(wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE,dvc->GetId()); + event(wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE,dvc->GetId()); event.SetEventObject(dvc); event.SetItem(wxDataViewItemFromItem(item)); @@ -897,7 +896,7 @@ outlineView:(NSOutlineView*)outlineView // send a begin drag event for all selected items and proceed with // dragging unless the event is vetoed: wxDataViewEvent - event(wxEVT_COMMAND_DATAVIEW_ITEM_BEGIN_DRAG,dvc->GetId()); + event(wxEVT_DATAVIEW_ITEM_BEGIN_DRAG,dvc->GetId()); event.SetEventObject(dvc); event.SetModel(dvc->GetModel()); @@ -926,7 +925,8 @@ outlineView:(NSOutlineView*)outlineView size_t const dataSize = event.GetDataObject()->GetDataSize(idDataFormat); size_t const dataBufferSize = sizeof(wxDataFormatId)+dataSize; // variable definitions (used in all case statements): - wxMemoryBuffer dataBuffer(dataBufferSize); + // give additional headroom for trailing NULL + wxMemoryBuffer dataBuffer(dataBufferSize+4); dataBuffer.AppendData(&idDataFormat,sizeof(wxDataFormatId)); switch (idDataFormat) @@ -958,13 +958,13 @@ outlineView:(NSOutlineView*)outlineView break; default: wxFAIL_MSG("Data object has invalid or unsupported data format"); - [dataArray release]; return NO; } } delete[] dataFormats; delete itemObject; if (dataStringAvailable) + { if (itemStringAvailable) { if (itemCounter > 0) @@ -973,10 +973,10 @@ outlineView:(NSOutlineView*)outlineView } else dataStringAvailable = false; + } } else { - [dataArray release]; delete itemObject; return NO; // dragging was vetoed or no data available } @@ -1167,6 +1167,23 @@ outlineView:(NSOutlineView*)outlineView @implementation wxCustomCell +#if 0 // starting implementation for custom cell clicks + +- (id)init +{ + self = [super init]; + [self setAction:@selector(clickedAction)]; + [self setTarget:self]; + return self; +} + +- (void) clickedAction: (id) sender +{ + wxUnusedVar(sender); +} + +#endif + -(NSSize) cellSize { wxCustomRendererObject * const @@ -1608,7 +1625,7 @@ outlineView:(NSOutlineView*)outlineView // sent whether the cell is editable or not wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_ACTIVATED,dvc->GetId()); event.SetEventObject(dvc); @@ -1629,7 +1646,7 @@ outlineView:(NSOutlineView*)outlineView // menu should be shown or not wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU,dvc->GetId()); wxDataViewItemArray selectedItems; @@ -1650,7 +1667,7 @@ outlineView:(NSOutlineView*)outlineView // // delegate methods // --(void) outlineView:(NSOutlineView*)outlineView mouseDownInHeaderOfTableColumn:(NSTableColumn*)tableColumn +-(void) outlineView:(NSOutlineView*)outlineView didClickTableColumn:(NSTableColumn*)tableColumn { wxDataViewColumn* const col([static_cast(tableColumn) getColumnPointer]); @@ -1658,7 +1675,7 @@ outlineView:(NSOutlineView*)outlineView wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); wxDataViewEvent - event(wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK,dvc->GetId()); + event(wxEVT_DATAVIEW_COLUMN_HEADER_CLICK,dvc->GetId()); // first, send an event that the user clicked into a column's header: @@ -1685,7 +1702,7 @@ outlineView:(NSOutlineView*)outlineView NSArray* sortDescriptors; NSSortDescriptor* sortDescriptor; - sortDescriptor = [[NSSortDescriptor alloc] initWithKey:[NSString stringWithFormat:@"%d",[outlineView columnWithIdentifier:[tableColumn identifier]]] + sortDescriptor = [[NSSortDescriptor alloc] initWithKey:[NSString stringWithFormat:@"%ld",(long)[outlineView columnWithIdentifier:[tableColumn identifier]]] ascending:YES]; sortDescriptors = [NSArray arrayWithObject:sortDescriptor]; [tableColumn setSortDescriptorPrototype:sortDescriptor]; @@ -1700,7 +1717,7 @@ outlineView:(NSOutlineView*)outlineView wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSING,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_COLLAPSING,dvc->GetId()); event.SetEventObject(dvc); @@ -1718,7 +1735,7 @@ outlineView:(NSOutlineView*)outlineView wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDING,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_EXPANDING,dvc->GetId()); event.SetEventObject(dvc); @@ -1793,7 +1810,7 @@ outlineView:(NSOutlineView*)outlineView wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_COLUMN_REORDERED,dvc->GetId()); event.SetEventObject(dvc); @@ -1806,7 +1823,7 @@ outlineView:(NSOutlineView*)outlineView { wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_COLLAPSED,dvc->GetId()); event.SetEventObject(dvc); @@ -1819,7 +1836,7 @@ outlineView:(NSOutlineView*)outlineView { wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_ITEM_EXPANDED,dvc->GetId()); event.SetEventObject(dvc); @@ -1834,7 +1851,7 @@ outlineView:(NSOutlineView*)outlineView wxDataViewCtrl* const dvc = implementation->GetDataViewCtrl(); - wxDataViewEvent event(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED,dvc->GetId()); + wxDataViewEvent event(wxEVT_DATAVIEW_SELECTION_CHANGED,dvc->GetId()); event.SetEventObject(dvc); event.SetModel(dvc->GetModel()); @@ -1869,7 +1886,7 @@ outlineView:(NSOutlineView*)outlineView // now, send the event: wxDataViewEvent - event(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED,dvc->GetId()); + event(wxEVT_DATAVIEW_ITEM_EDITING_STARTED,dvc->GetId()); event.SetEventObject(dvc); event.SetItem( @@ -1889,9 +1906,9 @@ outlineView:(NSOutlineView*)outlineView // even if no event indicating a start of an editing session has been sent // (see Documentation for NSControl controlTextDidEndEditing:); this is // not expected by a user of the wxWidgets library and therefore an - // wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE event is only sent if a - // corresponding wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED has been sent - // before; to check if a wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_STARTED has + // wxEVT_DATAVIEW_ITEM_EDITING_DONE event is only sent if a + // corresponding wxEVT_DATAVIEW_ITEM_EDITING_STARTED has been sent + // before; to check if a wxEVT_DATAVIEW_ITEM_EDITING_STARTED has // been sent the last edited column/row are valid: if ( currentlyEditedColumn != -1 && currentlyEditedRow != -1 ) { @@ -1904,7 +1921,7 @@ outlineView:(NSOutlineView*)outlineView // send event to wxWidgets: wxDataViewEvent - event(wxEVT_COMMAND_DATAVIEW_ITEM_EDITING_DONE,dvc->GetId()); + event(wxEVT_DATAVIEW_ITEM_EDITING_DONE,dvc->GetId()); event.SetEventObject(dvc); event.SetItem( @@ -1948,6 +1965,9 @@ wxCocoaDataViewControl::wxCocoaDataViewControl(wxWindow* peer, [scrollview setAutohidesScrollers:YES]; [scrollview setDocumentView:m_OutlineView]; + // we cannot call InstallHandler(m_OutlineView) here, because we are handling + // our action:s ourselves, only associate the view with this impl + Associate(m_OutlineView,this); // initialize the native control itself too InitOutlineView(style); } @@ -2620,12 +2640,11 @@ wxDataViewRenderer::OSXOnCellChanged(NSObject *object, const wxDataViewItem& item, unsigned col) { - // TODO: we probably should get rid of this code entirely and make this - // function pure virtual, but currently we still have some native - // renderers (wxDataViewChoiceRenderer) which don't override it and - // there is also wxDataViewCustomRenderer for which it's not obvious - // how it should be implemented so keep this "auto-deduction" of - // variant type from NSObject for now + // TODO: This code should really be removed and this function be made pure + // virtual. We just need to decide what to do with custom renderers + // (i.e. wxDataViewCustomRenderer), currently OS X "in place" editing + // which doesn't really create an editor control is not compatible + // with the in place editing under other platforms. wxVariant value; if ( [object isKindOfClass:[NSString class]] ) @@ -2698,7 +2717,7 @@ void wxDataViewRenderer::OSXApplyAttr(const wxDataViewItemAttr& attr) } const wxColour& c = attr.GetColour(); - colText = [NSColor colorWithDeviceRed:c.Red() / 255. + colText = [NSColor colorWithCalibratedRed:c.Red() / 255. green:c.Green() / 255. blue:c.Blue() / 255. alpha:c.Alpha() / 255.]; @@ -2856,6 +2875,17 @@ wxDataViewChoiceRenderer::wxDataViewChoiceRenderer(const wxArrayString& choices, [cell release]; } +void +wxDataViewChoiceRenderer::OSXOnCellChanged(NSObject *value, + const wxDataViewItem& item, + unsigned col) +{ + // At least under OS X 10.7 we get the index of the item selected and not + // its string. + wxDataViewModel *model = GetOwner()->GetOwner()->GetModel(); + model->ChangeValue(GetChoice(ObjectToLong(value)), item, col); +} + bool wxDataViewChoiceRenderer::MacRender() { if (GetValue().GetType() == GetVariantType()) @@ -2995,6 +3025,8 @@ bool wxDataViewIconTextRenderer::MacRender() iconText << GetValue(); if (iconText.GetIcon().IsOk()) [cell setImage:[[wxBitmap(iconText.GetIcon()).GetNSImage() retain] autorelease]]; + else + [cell setImage:nil]; [cell setStringValue:[[wxCFStringRef(iconText.GetText()).AsNSString() retain] autorelease]]; return true; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/datetimectrl.mm b/Externals/wxWidgets3/src/osx/cocoa/datetimectrl.mm index 4e8a44e894..575a8a2b48 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/datetimectrl.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/datetimectrl.mm @@ -3,7 +3,6 @@ // Purpose: Implementation of wxDateTimePickerCtrl for Cocoa. // Author: Vadim Zeitlin // Created: 2011-12-18 -// Version: $Id$ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -78,7 +77,12 @@ public: virtual void SetDateTime(const wxDateTime& dt) { - [View() setDateValue: NSDateFromWX(dt)]; + wxDateTime dtFrom, dtTo; + + if ( GetDateRange(&dtFrom,&dtTo) == false || + ( (!dtFrom.IsValid() || dtFrom <= dt) && + (!dtTo.IsValid() || dt <= dtTo ) ) ) + [View() setDateValue: NSDateFromWX(dt)]; } virtual wxDateTime GetDateTime() const @@ -172,7 +176,9 @@ wxDateTimeWidgetImpl::CreateDateTimePicker(wxDateTimePickerCtrl* wxpeer, } wxDateTimeWidgetImpl* c = new wxDateTimeWidgetCocoaImpl(wxpeer, v); +#if !wxOSX_USE_NATIVE_FLIPPED c->SetFlipped(false); +#endif return c; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/dialog.mm b/Externals/wxWidgets3/src/osx/cocoa/dialog.mm index ad0a972e2f..8b1e48f1b4 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/dialog.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/dialog.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dialog.mm 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/dirdlg.mm b/Externals/wxWidgets3/src/osx/cocoa/dirdlg.mm index ff8bd78924..ef8886ac69 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/dirdlg.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/dirdlg.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2008-08-30 -// RCS-ID: $Id: dirdlg.mm 67897 2011-06-09 00:29:13Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -31,12 +30,19 @@ #endif #include "wx/filename.h" +#include "wx/evtloop.h" +#include "wx/modalhook.h" #include "wx/osx/private.h" IMPLEMENT_CLASS(wxDirDialog, wxDialog) -wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, +void wxDirDialog::Init() +{ + m_sheetDelegate = nil; +} + +void wxDirDialog::Create(wxWindow *parent, const wxString& message, const wxString& defaultPath, long style, const wxPoint& WXUNUSED(pos), const wxSize& WXUNUSED(size), const wxString& WXUNUSED(name)) { @@ -54,12 +60,8 @@ wxDirDialog::~wxDirDialog() [m_sheetDelegate release]; } -void wxDirDialog::ShowWindowModal() +WX_NSOpenPanel wxDirDialog::OSXCreatePanel() const { - wxCFStringRef dir( m_path ); - - m_modality = wxDIALOG_MODALITY_WINDOW_MODAL; - NSOpenPanel *oPanel = [NSOpenPanel openPanel]; [oPanel setCanChooseDirectories:YES]; [oPanel setResolvesAliases:YES]; @@ -68,38 +70,40 @@ void wxDirDialog::ShowWindowModal() wxCFStringRef cf( m_message ); [oPanel setMessage:cf.AsNSString()]; - if ( HasFlag(wxDD_NEW_DIR_BUTTON) ) + if ( !HasFlag(wxDD_DIR_MUST_EXIST) ) [oPanel setCanCreateDirectories:YES]; - + + return oPanel; +} + +void wxDirDialog::ShowWindowModal() +{ wxNonOwnedWindow* parentWindow = NULL; - + if (GetParent()) parentWindow = dynamic_cast(wxGetTopLevelParent(GetParent())); - - wxASSERT_MSG(parentWindow, "Window modal display requires parent."); - - if (parentWindow) - { - NSWindow* nativeParent = parentWindow->GetWXWindow(); - [oPanel beginSheetForDirectory:dir.AsNSString() file:nil types: nil - modalForWindow: nativeParent modalDelegate: m_sheetDelegate - didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) - contextInfo: nil]; - } + + wxCHECK_RET(parentWindow, "Window modal display requires parent."); + + m_modality = wxDIALOG_MODALITY_WINDOW_MODAL; + + NSOpenPanel *oPanel = OSXCreatePanel(); + + NSWindow* nativeParent = parentWindow->GetWXWindow(); + wxCFStringRef dir( m_path ); + [oPanel beginSheetForDirectory:dir.AsNSString() file:nil types: nil + modalForWindow: nativeParent modalDelegate: m_sheetDelegate + didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) + contextInfo: nil]; } int wxDirDialog::ShowModal() { - NSOpenPanel *oPanel = [NSOpenPanel openPanel]; - [oPanel setCanChooseDirectories:YES]; - [oPanel setResolvesAliases:YES]; - [oPanel setCanChooseFiles:NO]; + WX_HOOK_MODAL_DIALOG(); - wxCFStringRef cf( m_message ); - [oPanel setMessage:cf.AsNSString()]; + wxCFEventLoopPauseIdleEvents pause; - if ( HasFlag(wxDD_NEW_DIR_BUTTON) ) - [oPanel setCanCreateDirectories:YES]; + NSOpenPanel *oPanel = OSXCreatePanel(); wxCFStringRef dir( m_path ); @@ -120,11 +124,11 @@ void wxDirDialog::ModalFinishedCallback(void* panel, int returnCode) if (returnCode == NSOKButton ) { NSOpenPanel* oPanel = (NSOpenPanel*)panel; - SetPath( wxCFStringRef::AsString([[oPanel filenames] objectAtIndex:0])); + SetPath( wxCFStringRef::AsStringWithNormalizationFormC([[oPanel filenames] objectAtIndex:0])); result = wxID_OK; } SetReturnCode(result); - + if (GetModality() == wxDIALOG_MODALITY_WINDOW_MODAL) SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); } diff --git a/Externals/wxWidgets3/src/osx/cocoa/dnd.mm b/Externals/wxWidgets3/src/osx/cocoa/dnd.mm index befc2fdad8..47faae9b16 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/dnd.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/dnd.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dnd.mm 70810 2012-03-05 06:10:19Z SC $ // Copyright: (c) 1998 Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/evtloop.mm b/Externals/wxWidgets3/src/osx/cocoa/evtloop.mm index d41450df54..2a27139d35 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/evtloop.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/evtloop.mm @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin, Stefan Csomor // Modified by: // Created: 2006-01-12 -// RCS-ID: $Id: evtloop.mm 70786 2012-03-03 13:09:54Z SC $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -32,6 +31,7 @@ #endif // WX_PRECOMP #include "wx/log.h" +#include "wx/scopeguard.h" #include "wx/osx/private.h" @@ -109,6 +109,7 @@ wxGUIEventLoop::wxGUIEventLoop() m_dummyWindow = nil; m_modalNestedLevel = 0; m_modalWindow = NULL; + m_osxLowLevelWakeUp = false; } wxGUIEventLoop::~wxGUIEventLoop() @@ -239,28 +240,124 @@ int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout) } } -void wxGUIEventLoop::DoRun() +static int gs_loopNestingLevel = 0; + +void wxGUIEventLoop::OSXDoRun() { - wxMacAutoreleasePool autoreleasepool; - [NSApp run]; + /* + In order to properly nest GUI event loops in Cocoa, it is important to + have [NSApp run] only as the main/outermost event loop. There are many + problems if [NSApp run] is used as an inner event loop. The main issue + is that a call to [NSApp stop] is needed to exit an [NSApp run] event + loop. But the [NSApp stop] has some side effects that we do not want - + such as if there was a modal dialog box with a modal event loop running, + that event loop would also get exited, and the dialog would be closed. + The call to [NSApp stop] would also cause the enclosing event loop to + exit as well. + + webkit's webcore library uses CFRunLoopRun() for nested event loops. See + the log of the commit log about the change in webkit's webcore module: + http://www.mail-archive.com/webkit-changes@lists.webkit.org/msg07397.html + + See here for the latest run loop that is used in webcore: + https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/mac/RunLoopMac.mm + + CFRunLoopRun() was tried for the nested event loop here but it causes a + problem in that all user input is disabled - and there is no way to + re-enable it. The caller of this event loop may not want user input + disabled (such as synchronous wxExecute with wxEXEC_NODISABLE flag). + + In order to have an inner event loop where user input can be enabled, + the old wxCocoa code that used the [NSApp nextEventMatchingMask] was + borrowed but changed to use blocking instead of polling. By specifying + 'distantFuture' in 'untildate', we can have it block until the next + event. Then we can keep looping on each new event until m_shouldExit is + raised to exit the event loop. + */ + gs_loopNestingLevel++; + wxON_BLOCK_EXIT_SET(gs_loopNestingLevel, gs_loopNestingLevel - 1); + + while ( !m_shouldExit ) + { + // By putting this inside the loop, we can drain it in each + // loop iteration. + wxMacAutoreleasePool autoreleasepool; + + if ( gs_loopNestingLevel == 1 ) + { + // Use -[NSApplication run] for the main run loop. + [NSApp run]; + } + else + { + // We use this blocking call to [NSApp nextEventMatchingMask:...] + // because the other methods (such as CFRunLoopRun() and [runLoop + // runMode:beforeDate] were always disabling input to the windows + // (even if we wanted it enabled). + // + // Here are the other run loops which were tried, but always left + // user input disabled: + // + // [runLoop runMode:NSDefaultRunLoopMode beforeDate:date]; + // CFRunLoopRun(); + // CFRunLoopRunInMode(kCFRunLoopDefaultMode, 10 , true); + // + // Using [NSApp nextEventMatchingMask:...] would leave windows + // enabled if we wanted them to be, so that is why it is used. + NSEvent *event = [NSApp + nextEventMatchingMask:NSAnyEventMask + untilDate:[NSDate distantFuture] + inMode:NSDefaultRunLoopMode + dequeue: YES]; + + [NSApp sendEvent: event]; + + /** + The NSApplication documentation states that: + + " + This method is invoked automatically in the main event loop + after each event when running in NSDefaultRunLoopMode or + NSModalRunLoopMode. This method is not invoked automatically + when running in NSEventTrackingRunLoopMode. + " + + So to be safe, we also invoke it here in this event loop. + + See: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html + */ + [NSApp updateWindows]; + } + } + + // Wake up the enclosing loop so that it can check if it also needs + // to exit. + WakeUp(); } -void wxGUIEventLoop::DoStop() +void wxGUIEventLoop::OSXDoStop() { - // only calling stop: is not enough when called from a runloop-observer, - // therefore add a dummy event, to make sure the runloop gets another round - [NSApp stop:0]; + // We should only stop the top level event loop. + if ( gs_loopNestingLevel <= 1 ) + { + [NSApp stop:0]; + } + + // For the top level loop only calling stop: is not enough when called from + // a runloop-observer, therefore add a dummy event, to make sure the + // runloop gets another round. And for the nested loops we need to wake it + // up to notice that it should exit, so do this unconditionally. WakeUp(); } void wxGUIEventLoop::WakeUp() { // NSEvent* cevent = [NSApp currentEvent]; - NSString* mode = [[NSRunLoop mainRunLoop] currentMode]; + // NSString* mode = [[NSRunLoop mainRunLoop] currentMode]; // when already in a mouse event handler, don't add higher level event // if ( cevent != nil && [cevent type] <= NSMouseMoved && ) - if ( [NSEventTrackingRunLoopMode isEqualToString:mode] ) + if ( m_osxLowLevelWakeUp /* [NSEventTrackingRunLoopMode isEqualToString:mode] */ ) { // NSLog(@"event for wakeup %@ in mode %@",cevent,mode); wxCFEventLoop::WakeUp(); @@ -304,7 +401,7 @@ wxModalEventLoop::wxModalEventLoop(WXWindow modalNativeWindow) // END move into a evtloop_osx.cpp -void wxModalEventLoop::DoRun() +void wxModalEventLoop::OSXDoRun() { wxMacAutoreleasePool pool; @@ -323,7 +420,7 @@ void wxModalEventLoop::DoRun() [NSApp runModalForWindow:m_modalNativeWindow]; } -void wxModalEventLoop::DoStop() +void wxModalEventLoop::OSXDoStop() { [NSApp abortModal]; } @@ -459,4 +556,4 @@ wxWindowDisabler::~wxWindowDisabler() } delete m_winDisabled; -} \ No newline at end of file +} diff --git a/Externals/wxWidgets3/src/osx/cocoa/filedlg.mm b/Externals/wxWidgets3/src/osx/cocoa/filedlg.mm index 55a7034131..67f58554c4 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/filedlg.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/filedlg.mm @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 2004-10-02 -// RCS-ID: $Id: filedlg.mm 67897 2011-06-09 00:29:13Z SC $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -34,9 +33,13 @@ #include "wx/filename.h" #include "wx/tokenzr.h" +#include "wx/evtloop.h" #include "wx/osx/private.h" #include "wx/sysopt.h" +#include "wx/modalhook.h" + +#include // ============================================================================ // implementation @@ -49,6 +52,32 @@ // then the delegate method - (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename will have to // be implemented +namespace +{ + +bool HasAppKit_10_6() +{ + // Even if we require 10.6, we might be loaded by an application that + // was linked against 10.5. setAllowedFileTypes will still be ignored + // in this case. From NSSavePanel.h: + // NSOpenPanel: On versions less than 10.6, this property is ignored. + // For applications that link against 10.6 and higher, this property will + // determine which files should be enabled in the open panel. + int32_t version = NSVersionOfLinkTimeLibrary("AppKit"); + if (version == -1) + { + // If we're loaded by an application that doesn't link against AppKit, + // use the runtime version instead. This check will not work for the + // case above. + version = NSVersionOfRunTimeLibrary("AppKit"); + } + + // Notice that this still works correctly even if version is -1. + return version >= 0x40e2400 /* version of 10.6 AppKit */; +} + +} // anonymous namespace + @interface wxOpenPanelDelegate : NSObject wxOSX_10_6_AND_LATER() { wxFileDialog* _dialog; @@ -157,13 +186,20 @@ IMPLEMENT_CLASS(wxFileDialog, wxFileDialogBase) -wxFileDialog::wxFileDialog( +void wxFileDialog::Init() +{ + m_filterIndex = -1; + m_delegate = nil; + m_sheetDelegate = nil; +} + +void wxFileDialog::Create( wxWindow *parent, const wxString& message, const wxString& defaultDir, const wxString& defaultFileName, const wxString& wildCard, long style, const wxPoint& pos, const wxSize& sz, const wxString& name) - : wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name) { - m_filterIndex = -1; + wxFileDialogBase::Create(parent, message, defaultDir, defaultFileName, wildCard, style, pos, sz, name); + m_sheetDelegate = [[ModalDialogDelegate alloc] init]; [(ModalDialogDelegate*)m_sheetDelegate setImplementation: this]; } @@ -367,7 +403,7 @@ wxWindow* wxFileDialog::CreateFilterPanel(wxWindow *extracontrol) if ( m_firstFileTypeFilter >= 0 ) m_filterChoice->SetSelection(m_firstFileTypeFilter); } - m_filterChoice->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(wxFileDialog::OnFilterSelected), NULL, this); + m_filterChoice->Connect(wxEVT_CHOICE, wxCommandEventHandler(wxFileDialog::OnFilterSelected), NULL, this); } if(extracontrol) @@ -418,6 +454,11 @@ bool wxFileDialog::CheckFile( const wxString& filename ) void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) { NSSavePanel* panel = (NSSavePanel*) nativeWindow; + // for sandboxed app we cannot access the outer structures + // this leads to problems with extra controls, so as a temporary + // workaround for crashes we don't support those yet + if ( [panel contentView] == nil ) + return; wxNonOwnedWindow::Create( GetParent(), nativeWindow ); wxWindow* extracontrol = NULL; @@ -428,7 +469,6 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) } NSView* accView = nil; - m_delegate = nil; if ( m_useFileTypeFilter ) { @@ -436,7 +476,7 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) accView = m_filterPanel->GetHandle(); if( HasFlag(wxFD_OPEN) ) { - if ( UMAGetSystemVersion() < 0x1060 ) + if ( UMAGetSystemVersion() < 0x1060 || !HasAppKit_10_6() ) { wxOpenPanelDelegate* del = [[wxOpenPanelDelegate alloc]init]; [del setFileDialog:this]; @@ -466,6 +506,10 @@ void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) int wxFileDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + + wxCFEventLoopPauseIdleEvents pause; + wxMacAutoreleasePool autoreleasepool; wxCFStringRef cf( m_message ); @@ -585,20 +629,22 @@ int wxFileDialog::ShowModal() [oPanel setMessage:cf.AsNSString()]; [oPanel setAllowsMultipleSelection: (HasFlag(wxFD_MULTIPLE) ? YES : NO )]; - if ( UMAGetSystemVersion() < 0x1060 ) - { - returnCode = [oPanel runModalForDirectory:m_dir.IsEmpty() ? nil : dir.AsNSString() - file:file.AsNSString() types:(m_delegate == nil ? types : nil)]; - } - else +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1060 + if ( UMAGetSystemVersion() >= 0x1060 && HasAppKit_10_6() ) { [oPanel setAllowedFileTypes: (m_delegate == nil ? types : nil)]; if ( !m_dir.IsEmpty() ) [oPanel setDirectoryURL:[NSURL fileURLWithPath:dir.AsNSString() - isDirectory:YES]]; + isDirectory:YES]]; returnCode = [oPanel runModal]; } - + else +#endif + { + returnCode = [oPanel runModalForDirectory:m_dir.IsEmpty() ? nil : dir.AsNSString() + file:file.AsNSString() types:(m_delegate == nil ? types : nil)]; + } + ModalFinishedCallback(oPanel, returnCode); } @@ -615,7 +661,7 @@ void wxFileDialog::ModalFinishedCallback(void* panel, int returnCode) NSSavePanel* sPanel = (NSSavePanel*)panel; result = wxID_OK; - m_path = wxCFStringRef::AsString([sPanel filename]); + m_path = wxCFStringRef::AsStringWithNormalizationFormC([sPanel filename]); m_fileName = wxFileNameFromPath(m_path); m_dir = wxPathOnly( m_path ); if (m_filterChoice) @@ -634,7 +680,7 @@ void wxFileDialog::ModalFinishedCallback(void* panel, int returnCode) NSArray* filenames = [oPanel filenames]; for ( size_t i = 0 ; i < [filenames count] ; ++ i ) { - wxString fnstr = wxCFStringRef::AsString([filenames objectAtIndex:i]); + wxString fnstr = wxCFStringRef::AsStringWithNormalizationFormC([filenames objectAtIndex:i]); m_paths.Add( fnstr ); m_fileNames.Add( wxFileNameFromPath(fnstr) ); if ( i == 0 ) @@ -657,7 +703,9 @@ void wxFileDialog::ModalFinishedCallback(void* panel, int returnCode) if (GetModality() == wxDIALOG_MODALITY_WINDOW_MODAL) SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); - UnsubclassWin(); + // workaround for sandboxed app, see above + if ( m_isNativeWindowWrapper ) + UnsubclassWin(); [(NSSavePanel*) panel setAccessoryView:nil]; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/gauge.mm b/Externals/wxWidgets3/src/osx/cocoa/gauge.mm index fb3ce4998d..cf82bd434b 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/gauge.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/gauge.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: gauge.mm 69931 2011-12-05 00:00:58Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/glcanvas.mm b/Externals/wxWidgets3/src/osx/cocoa/glcanvas.mm index 18b89f2f66..c1f80b852e 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/glcanvas.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/glcanvas.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: glcanvas.mm 67243 2011-03-19 08:36:23Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -39,7 +38,9 @@ WXGLContext WXGLCreateContext( WXGLPixelFormat pixelFormat, WXGLContext shareCon { WXGLContext context = [[NSOpenGLContext alloc] initWithFormat:pixelFormat shareContext: shareContext]; if ( !context ) + { wxFAIL_MSG("NSOpenGLContext creation failed"); + } return context ; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/listbox.mm b/Externals/wxWidgets3/src/osx/cocoa/listbox.mm index e214b12abe..0cc450997e 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/listbox.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/listbox.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: listbox.mm 67888 2011-06-08 22:50:28Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -303,7 +302,7 @@ protected: wxListBox *list = static_cast ( impl->GetWXPeer()); wxCHECK_RET( list != NULL , wxT("Listbox expected")); - wxCommandEvent event( wxEVT_COMMAND_LISTBOX_SELECTED, list->GetId() ); + wxCommandEvent event( wxEVT_LISTBOX, list->GetId() ); if ((row < 0) || (row > (int) list->GetCount())) // OS X can select an item below the last item return; @@ -314,6 +313,24 @@ protected: } +- (void)setFont:(NSFont *)aFont +{ + NSArray *tableColumns = [self tableColumns]; + unsigned int columnIndex = [tableColumns count]; + while (columnIndex--) + [[(NSTableColumn *)[tableColumns objectAtIndex:columnIndex] dataCell] setFont:aFont]; + + [self setRowHeight:[gNSLayoutManager defaultLineHeightForFont:aFont]+2]; +} + +- (void) setControlSize:(NSControlSize) size +{ + NSArray *tableColumns = [self tableColumns]; + unsigned int columnIndex = [tableColumns count]; + while (columnIndex--) + [[(NSTableColumn *)[tableColumns objectAtIndex:columnIndex] dataCell] setControlSize:size]; +} + @end // @@ -369,6 +386,11 @@ wxListWidgetColumn* wxListWidgetCocoaImpl::InsertTextColumn( unsigned pos, const [col1 setWidth:1000]; } [col1 setResizingMask: NSTableColumnAutoresizingMask]; + + wxListBox *list = static_cast ( GetWXPeer()); + if ( list != NULL ) + [[col1 dataCell] setFont:list->GetFont().OSXGetNSFont()]; + wxCocoaTableColumn* wxcol = new wxCocoaTableColumn( col1, editable ); [col1 setColumn:wxcol]; @@ -388,6 +410,39 @@ wxListWidgetColumn* wxListWidgetCocoaImpl::InsertCheckColumn( unsigned pos , con [checkbox setTitle:@""]; [checkbox setButtonType:NSSwitchButton]; [col1 setDataCell:checkbox] ; + + wxListBox *list = static_cast ( GetWXPeer()); + if ( list != NULL ) + { + NSControlSize size = NSRegularControlSize; + + switch ( list->GetWindowVariant() ) + { + case wxWINDOW_VARIANT_NORMAL : + size = NSRegularControlSize; + break ; + + case wxWINDOW_VARIANT_SMALL : + size = NSSmallControlSize; + break ; + + case wxWINDOW_VARIANT_MINI : + size = NSMiniControlSize; + break ; + + case wxWINDOW_VARIANT_LARGE : + size = NSRegularControlSize; + break ; + + default: + break ; + } + + [[col1 dataCell] setControlSize:size]; + // although there is no text, it may help to get the correct vertical layout + [[col1 dataCell] setFont:list->GetFont().OSXGetNSFont()]; + } + [checkbox release]; unsigned formerColCount = [m_tableView numberOfColumns]; @@ -555,8 +610,8 @@ wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer, wxListWidgetCocoaImpl* c = new wxListWidgetCocoaImpl( wxpeer, scrollview, tableview, ds ); // temporary hook for dnd - [tableview registerForDraggedTypes:[NSArray arrayWithObjects: - NSStringPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]]; + // [tableview registerForDraggedTypes:[NSArray arrayWithObjects: + // NSStringPboardType, NSFilenamesPboardType, (NSString*) kPasteboardTypeFileURLPromise, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]]; [ds setImplementation:c]; return c; diff --git a/Externals/wxWidgets3/src/osx/cocoa/mediactrl.mm b/Externals/wxWidgets3/src/osx/cocoa/mediactrl.mm index 33381967df..73624098c5 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/mediactrl.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/mediactrl.mm @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 02/03/05 -// RCS-ID: $Id: mediactrl.mm 39285 2006-05-23 11:04:37Z ABX $ // Copyright: (c) 2004-2005 Ryan Norton, (c) 2005 David Elliot // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -55,9 +54,6 @@ #include "wx/cocoa/autorelease.h" #include "wx/cocoa/string.h" -#import -#import - class WXDLLIMPEXP_FWD_MEDIA wxQTMediaBackend; @interface wxQTMovie : QTMovie { @@ -191,21 +187,22 @@ private: } } --(void)loadStateChanged:(QTMovie *)movie +-(void)loadStateChanged:(NSNotification *)notification { + QTMovie *movie = [notification object]; long loadState = [[movie attributeForKey:QTMovieLoadStateAttribute] longValue]; - if (loadState >= QTMovieLoadStatePlayable) - { - // the movie has loaded enough media data to begin playing - } - else if (loadState >= QTMovieLoadStateLoaded) - { - m_backend->FinishLoad(); - } - else if (loadState == -1) + if ( loadState == QTMovieLoadStateError ) { // error occurred } + else if (loadState >= QTMovieLoadStatePlayable) + { + // the movie has loaded enough media data to begin playing, but we don't have an event for that yet + } + else if (loadState >= QTMovieLoadStateComplete) // we might use QTMovieLoadStatePlaythroughOK + { + m_backend->FinishLoad(); + } } -(BOOL)isPlaying @@ -227,8 +224,8 @@ private: IMPLEMENT_DYNAMIC_CLASS(wxQTMediaBackend, wxMediaBackend); wxQTMediaBackend::wxQTMediaBackend() : - m_interfaceflags(wxMEDIACTRLPLAYERCONTROLS_NONE), - m_movie(nil), m_movieview(nil) + m_movie(nil), m_movieview(nil), + m_interfaceflags(wxMEDIACTRLPLAYERCONTROLS_NONE) { } @@ -283,13 +280,30 @@ bool wxQTMediaBackend::Load(const wxString& fileName) bool wxQTMediaBackend::Load(const wxURI& location) { wxCFStringRef uri(location.BuildURI()); - - [m_movie release]; - wxQTMovie* movie = [[wxQTMovie alloc] initWithURL: [NSURL URLWithString: uri.AsNSString()] error: nil ]; + NSURL *url = [NSURL URLWithString: uri.AsNSString()]; + if (! [wxQTMovie canInitWithURL:url]) + return false; + + [m_movie release]; + wxQTMovie* movie = [[wxQTMovie alloc] initWithURL:url error: nil ]; + m_movie = movie; - [m_movie setBackend:this]; - [m_movieview setMovie:movie]; + if (movie != nil) + { + [m_movie setBackend:this]; + [m_movieview setMovie:movie]; + + // If the media file is able to be loaded quickly then there may not be + // any QTMovieLoadStateDidChangeNotification message sent, so we need to + // also check the load state here and finish our initialization if it has + // been loaded. + long loadState = [[m_movie attributeForKey:QTMovieLoadStateAttribute] longValue]; + if (loadState >= QTMovieLoadStateComplete) + { + FinishLoad(); + } + } return movie != nil; } @@ -298,12 +312,10 @@ void wxQTMediaBackend::FinishLoad() { DoShowPlayerControls(m_interfaceflags); - NSRect r =[m_movieview movieBounds]; - m_bestSize.x = r.size.width; - m_bestSize.y = r.size.height; + NSSize s = [[m_movie attributeForKey:QTMovieNaturalSizeAttribute] sizeValue]; + m_bestSize = wxSize(s.width, s.height); NotifyMovieLoaded(); - } bool wxQTMediaBackend::Play() @@ -394,6 +406,7 @@ wxSize wxQTMediaBackend::GetVideoSize() const void wxQTMediaBackend::Move(int x, int y, int w, int h) { + // as we have a native player, no need to move the video area } bool wxQTMediaBackend::ShowPlayerControls(wxMediaCtrlPlayerControls flags) @@ -413,6 +426,8 @@ void wxQTMediaBackend::DoShowPlayerControls(wxMediaCtrlPlayerControls flags) } else { + [m_movieview setControllerVisible:YES]; + [m_movieview setStepButtonsVisible:(flags & wxMEDIACTRLPLAYERCONTROLS_STEP) ? YES:NO]; [m_movieview setVolumeButtonVisible:(flags & wxMEDIACTRLPLAYERCONTROLS_VOLUME) ? YES:NO]; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/menu.mm b/Externals/wxWidgets3/src/osx/cocoa/menu.mm index dc0b61a2ed..9733bc56cd 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/menu.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/menu.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: menu.mm 70401 2012-01-19 14:59:35Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -67,8 +66,8 @@ - (void)menuNeedsUpdate:(NSMenu*)smenu; #else - (void)menuWillOpen:(NSMenu *)menu; -- (void)menuDidClose:(NSMenu *)menu; #endif +- (void)menuDidClose:(NSMenu *)menu; - (void)menu:(NSMenu *)menu willHighlightItem:(NSMenuItem *)item; @end @@ -105,6 +104,7 @@ wxpeer->HandleMenuOpened(); } } +#endif - (void)menuDidClose:(NSMenu *)smenu { @@ -117,7 +117,6 @@ wxpeer->HandleMenuClosed(); } } -#endif - (void)menu:(NSMenu *)smenu willHighlightItem:(NSMenuItem *)item { @@ -155,7 +154,6 @@ public : } [menu setDelegate:controller]; [m_osxMenu setImplementation:this]; - [menu setAutoenablesItems:NO]; // gc aware if ( m_osxMenu ) CFRetain(m_osxMenu); @@ -167,7 +165,7 @@ public : virtual void InsertOrAppend(wxMenuItem *pItem, size_t pos) { NSMenuItem* nsmenuitem = (NSMenuItem*) pItem->GetPeer()->GetHMenuItem(); - // make sure a call of SetSubMenu is also reflected (occuring after Create) + // make sure a call of SetSubMenu is also reflected (occurring after Create) // update the native menu item accordingly if ( pItem->IsSubMenu() ) diff --git a/Externals/wxWidgets3/src/osx/cocoa/menuitem.mm b/Externals/wxWidgets3/src/osx/cocoa/menuitem.mm index fe92deac10..eadec5cda6 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/menuitem.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/menuitem.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: menuitem.mm 69205 2011-09-27 07:21:44Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -311,6 +310,10 @@ bool wxMenuItemCocoaImpl::DoDefault() [theNSApplication unhideAllApplications:nil]; handled=true; } + else if (menuid == wxApp::s_macExitMenuItemId) + { + wxTheApp->ExitMainLoop(); + } return handled; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/msgdlg.mm b/Externals/wxWidgets3/src/osx/cocoa/msgdlg.mm index 4134406e47..fb52f0a7a0 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/msgdlg.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/msgdlg.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: msgdlg.mm 70926 2012-03-17 10:52:34Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -20,6 +19,8 @@ #include "wx/control.h" #include "wx/thread.h" +#include "wx/evtloop.h" +#include "wx/modalhook.h" #include "wx/osx/private.h" @@ -61,6 +62,10 @@ wxMessageDialog::~wxMessageDialog() int wxMessageDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + + wxCFEventLoopPauseIdleEvents pause; + int resultbutton = wxID_CANCEL; const long style = GetMessageDialogStyle(); diff --git a/Externals/wxWidgets3/src/osx/cocoa/nonownedwnd.mm b/Externals/wxWidgets3/src/osx/cocoa/nonownedwnd.mm index 3e4eb9a7b4..9e79c6a458 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/nonownedwnd.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/nonownedwnd.mm @@ -4,7 +4,6 @@ // Author: DavidStefan Csomor // Modified by: // Created: 2008-06-20 -// RCS-ID: $Id: nonownedwnd.mm 70862 2012-03-10 12:37:58Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -111,7 +110,7 @@ bool shouldHandleSelector(SEL selector) return (wxNonOwnedWindowCocoaImpl*) wxNonOwnedWindowImpl::FindFromWXWindow( self ); } -// TODO in cocoa everything during a drag is sent to the NSWindow the mouse down occured, +// TODO in cocoa everything during a drag is sent to the NSWindow the mouse down occurred, // this does not conform to the wx behaviour if the window is not captured, so try to resend // or capture all wx mouse event handling at the tlw as we did for carbon @@ -145,6 +144,8 @@ bool shouldHandleSelector(SEL selector) // wx native implementation // +static NSResponder* s_nextFirstResponder = NULL; + @interface wxNSWindow : NSWindow { } @@ -152,6 +153,7 @@ bool shouldHandleSelector(SEL selector) - (void) sendEvent:(NSEvent *)event; - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen; - (void)noResponderFor: (SEL) selector; +- (BOOL)makeFirstResponder:(NSResponder *)aResponder; @end @implementation wxNSWindow @@ -206,6 +208,14 @@ bool shouldHandleSelector(SEL selector) return YES; } +- (BOOL)makeFirstResponder:(NSResponder *)aResponder +{ + s_nextFirstResponder = aResponder; + BOOL retval = [super makeFirstResponder:aResponder]; + s_nextFirstResponder = nil; + return retval; +} + @end @interface wxNSPanel : NSPanel @@ -215,6 +225,7 @@ bool shouldHandleSelector(SEL selector) - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen; - (void)noResponderFor: (SEL) selector; - (void)sendEvent:(NSEvent *)event; +- (BOOL)makeFirstResponder:(NSResponder *)aResponder; @end @implementation wxNSPanel @@ -265,6 +276,14 @@ bool shouldHandleSelector(SEL selector) } } +- (BOOL)makeFirstResponder:(NSResponder *)aResponder +{ + s_nextFirstResponder = aResponder; + BOOL retval = [super makeFirstResponder:aResponder]; + s_nextFirstResponder = nil; + return retval; +} + @end @@ -450,12 +469,19 @@ extern int wxOSXGetIdFromSelector(SEL action ); if ( wxpeer ) { wxpeer->HandleActivated(0, false); + // as for wx the deactivation also means losing focus we + // must trigger this manually + [window makeFirstResponder:nil]; + + // TODO Remove if no problems arise with Popup Windows +#if 0 // Needed for popup window since the firstResponder // (focus in wx) doesn't change when this // TLW becomes inactive. wxFocusEvent event( wxEVT_KILL_FOCUS, wxpeer->GetId()); event.SetEventObject(wxpeer); wxpeer->HandleWindowEvent(event); +#endif } } } @@ -477,6 +503,19 @@ extern int wxOSXGetIdFromSelector(SEL action ); } return editor; } + else if ([anObject isKindOfClass:[wxNSComboBox class]]) + { + wxNSComboBox * cb = (wxNSComboBox*) anObject; + wxNSTextFieldEditor* editor = [cb fieldEditor]; + if ( editor == nil ) + { + editor = [[wxNSTextFieldEditor alloc] init]; + [editor setFieldEditor:YES]; + [cb setFieldEditor:editor]; + [editor release]; + } + return editor; + } return nil; } @@ -517,6 +556,12 @@ wxNonOwnedWindowCocoaImpl::~wxNonOwnedWindowCocoaImpl() if ( !m_wxPeer->IsNativeWindowWrapper() ) { [m_macWindow setDelegate:nil]; + + // make sure we remove this first, otherwise the ref count will not lead to the + // native window's destruction + if ([m_macWindow parentWindow] != 0) + [[m_macWindow parentWindow] removeChildWindow: m_macWindow]; + [m_macWindow release]; } } @@ -542,12 +587,12 @@ long style, long extraStyle, const wxString& WXUNUSED(name) ) if ( style & wxFRAME_TOOL_WINDOW || ( style & wxPOPUP_WINDOW ) || GetWXPeer()->GetExtraStyle() & wxTOPLEVEL_EX_DIALOG ) - { m_macWindow = [wxNSPanel alloc]; - } else m_macWindow = [wxNSWindow alloc]; + [m_macWindow setAcceptsMouseMovedEvents:YES]; + CGWindowLevel level = kCGNormalWindowLevel; if ( style & wxFRAME_TOOL_WINDOW ) @@ -613,7 +658,7 @@ long style, long extraStyle, const wxString& WXUNUSED(name) ) // If the parent is modal, windows with wxFRAME_FLOAT_ON_PARENT style need // to be in kCGUtilityWindowLevel and not kCGFloatingWindowLevel to stay // above the parent. - wxDialog * const parentDialog = wxDynamicCast(parent, wxDialog); + wxDialog * const parentDialog = parent == NULL ? NULL : wxDynamicCast(parent->MacGetTopLevelWindow(), wxDialog); if (parentDialog && parentDialog->IsModal()) { if (level == kCGFloatingWindowLevel) @@ -679,14 +724,35 @@ bool wxNonOwnedWindowCocoaImpl::Show(bool show) if ( show ) { wxNonOwnedWindow* wxpeer = GetWXPeer(); - if (wxpeer && !(wxpeer->GetWindowStyle() & wxFRAME_TOOL_WINDOW)) - [m_macWindow makeKeyAndOrderFront:nil]; - else - [m_macWindow orderFront:nil]; + if ( wxpeer ) + { + // add to parent window before showing + wxDialog * const dialog = wxDynamicCast(wxpeer, wxDialog); + if ( wxpeer->GetParent() && dialog && dialog->IsModal()) + { + NSView * parentView = wxpeer->GetParent()->GetPeer()->GetWXWidget(); + if ( parentView ) + { + NSWindow* parentNSWindow = [parentView window]; + if ( parentNSWindow ) + [parentNSWindow addChildWindow:m_macWindow ordered:NSWindowAbove]; + } + } + + if (!(wxpeer->GetWindowStyle() & wxFRAME_TOOL_WINDOW)) + [m_macWindow makeKeyAndOrderFront:nil]; + else + [m_macWindow orderFront:nil]; + } [[m_macWindow contentView] setNeedsDisplay: YES]; } else + { + // avoid propagation of orderOut to parent + if ([m_macWindow parentWindow] != 0) + [[m_macWindow parentWindow] removeChildWindow: m_macWindow]; [m_macWindow orderOut:nil]; + } return true; } @@ -737,7 +803,8 @@ void wxNonOwnedWindowCocoaImpl::SetExtraStyle( long exStyle ) void wxNonOwnedWindowCocoaImpl::SetWindowStyleFlag( long style ) { - if (m_macWindow) + // don't mess with native wrapped windows, they might throw an exception when their level is changed + if (!m_wxPeer->IsNativeWindowWrapper() && m_macWindow) { CGWindowLevel level = kCGNormalWindowLevel; @@ -993,6 +1060,12 @@ void wxNonOwnedWindowCocoaImpl::RestoreWindowLevel() [m_macWindow setLevel:m_macWindowLevel]; } +WX_NSResponder wxNonOwnedWindowCocoaImpl::GetNextFirstResponder() +{ + return s_nextFirstResponder; +} + + // // // diff --git a/Externals/wxWidgets3/src/osx/cocoa/notebook.mm b/Externals/wxWidgets3/src/osx/cocoa/notebook.mm index 11c4c27dc6..d71ca4047c 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/notebook.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/notebook.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: notebook.mm 67887 2011-06-08 22:48:29Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -94,6 +93,84 @@ @end +// ======================================================================== +// WXCTabViewImageItem +// ======================================================================== +@interface WXCTabViewImageItem : NSTabViewItem +{ + NSImage *m_image; +} +- (id)init; +- (void)dealloc; +- (NSSize)sizeOfLabel:(BOOL)shouldTruncateLabel; +- (void)drawLabel:(BOOL)shouldTruncateLabel inRect:(NSRect)tabRect; +- (NSImage*)image; +- (void)setImage:(NSImage*)image; +@end // interface WXCTabViewImageItem : NSTabViewItem + + +@implementation WXCTabViewImageItem : NSTabViewItem +- (id)init +{ + m_image = nil; + return [super initWithIdentifier:nil]; +} +- (void)dealloc +{ + [m_image release]; + [super dealloc]; +} +- (NSSize)sizeOfLabel:(BOOL)shouldTruncateLabel +{ + NSSize labelSize = [super sizeOfLabel:shouldTruncateLabel]; + if(!m_image) + return labelSize; + NSSize imageSize = [m_image size]; + // scale image size + if(imageSize.height > labelSize.height) + { + imageSize.width *= labelSize.height/imageSize.height; + imageSize.height *= labelSize.height/imageSize.height; + [m_image setScalesWhenResized:YES]; + [m_image setSize: imageSize]; + } + labelSize.width += imageSize.width; + return labelSize; +} +- (void)drawLabel:(BOOL)shouldTruncateLabel inRect:(NSRect)tabRect +{ + if(m_image) + { + NSSize imageSize = [m_image size]; + [m_image compositeToPoint:NSMakePoint(tabRect.origin.x, + tabRect.origin.y+imageSize.height) + operation:NSCompositeSourceOver]; + tabRect.size.width -= imageSize.width; + tabRect.origin.x += imageSize.width; + } + [super drawLabel:shouldTruncateLabel inRect:tabRect]; +} +- (NSImage*)image +{ + return m_image; +} +- (void)setImage:(NSImage*)image +{ + [image retain]; + [m_image release]; + m_image = image; + if(!m_image) + return; + [[NSPasteboard generalPasteboard] + declareTypes:[NSArray arrayWithObject:NSTIFFPboardType] + owner:nil]; + [[NSPasteboard generalPasteboard] + setData:[m_image TIFFRepresentation] + forType:NSTIFFPboardType]; +} +@end // implementation WXCTabViewImageItem : NSTabViewItem + + class wxCocoaTabView : public wxWidgetCocoaImpl { public: @@ -143,7 +220,7 @@ public: { for ( int i = cocoacount ; i < maximum ; ++i ) { - NSTabViewItem* item = [[NSTabViewItem alloc] init]; + NSTabViewItem* item = [[WXCTabViewImageItem alloc] init]; [slf addTabViewItem:item]; [item release]; } @@ -177,11 +254,33 @@ public: const wxBitmap bmap = notebook.GetImageList()->GetBitmap( notebook.GetPageImage( i ) ) ; if ( bmap.IsOk() ) { - // TODO how to set an image on a tab + [(WXCTabViewImageItem*) item setImage: bmap.GetNSImage()]; } } } } + + int TabHitTest(const wxPoint & pt, long* flags) + { + int retval = wxNOT_FOUND; + + NSPoint nspt = wxToNSPoint( m_osxView, pt ); + + wxNSTabView* slf = (wxNSTabView*) m_osxView; + + NSTabViewItem* hitItem = [slf tabViewItemAtPoint:nspt]; + + if (!hitItem) { + if ( flags ) + *flags = wxBK_HITTEST_NOWHERE; + } else { + retval = [slf indexOfTabViewItem:hitItem]; + if ( flags ) + *flags = wxBK_HITTEST_ONLABEL; + } + + return retval; + } }; diff --git a/Externals/wxWidgets3/src/osx/cocoa/overlay.mm b/Externals/wxWidgets3/src/osx/cocoa/overlay.mm index 1ec5a95b2d..55c6c09dd2 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/overlay.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/overlay.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2006-10-20 -// RCS-ID: $Id: overlay.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/preferences.mm b/Externals/wxWidgets3/src/osx/cocoa/preferences.mm new file mode 100644 index 0000000000..7b51732bf0 --- /dev/null +++ b/Externals/wxWidgets3/src/osx/cocoa/preferences.mm @@ -0,0 +1,261 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/osx/cocoa/preferences.cpp +// Purpose: Native OS X implementation of wxPreferencesEditor. +// Author: Vaclav Slavik +// Created: 2013-02-19 +// Copyright: (c) 2013 Vaclav Slavik +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#if wxUSE_PREFERENCES_EDITOR + +#include "wx/private/preferences.h" + +#ifdef wxHAS_PREF_EDITOR_NATIVE + +#include "wx/frame.h" +#include "wx/sharedptr.h" +#include "wx/toolbar.h" +#include "wx/vector.h" +#include "wx/weakref.h" +#include "wx/windowid.h" +#include "wx/osx/private.h" + +#import + + +wxBitmap wxStockPreferencesPage::GetLargeIcon() const +{ + switch ( m_kind ) + { + case Kind_General: + return wxBitmap([NSImage imageNamed:NSImageNamePreferencesGeneral]); + case Kind_Advanced: + return wxBitmap([NSImage imageNamed:NSImageNameAdvanced]); + } + return wxBitmap(); // silence compiler warning +} + + +class wxCocoaPrefsWindow : public wxFrame +{ +public: + wxCocoaPrefsWindow(const wxString& title) + : wxFrame(NULL, wxID_ANY, title, + wxDefaultPosition, wxDefaultSize, + wxDEFAULT_FRAME_STYLE & ~(wxRESIZE_BORDER | wxMAXIMIZE_BOX | wxMINIMIZE_BOX)), + m_toolbarRealized(false), + m_visiblePage(NULL) + { + m_toolbar = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, + wxTB_FLAT | wxTB_TEXT); + m_toolbar->SetToolBitmapSize(wxSize(32,32)); + m_toolbar->OSXSetSelectableTools(true); + SetToolBar(m_toolbar); + + m_toolbar->Bind(wxEVT_TOOL, + &wxCocoaPrefsWindow::OnPageChanged, this); + Bind(wxEVT_CLOSE_WINDOW, &wxCocoaPrefsWindow::OnClose, this); + } + + void AddPage(wxPreferencesPage *page) + { + wxASSERT_MSG( !m_toolbarRealized, + "can't add more preferences pages after showing the window" ); + + const wxString title = page->GetName(); + wxBitmap bmp(page->GetLargeIcon()); + wxASSERT_MSG( bmp.IsOk(), "OS X requires valid bitmap for preference page" ); + + int toolId = wxIdManager::ReserveId(); + wxToolBarToolBase *tool = m_toolbar->AddTool(toolId, title, bmp); + + wxSharedPtr info(new PageInfo(page)); + m_pages.push_back(info); + + tool->SetClientData(info.get()); + } + + virtual bool Show(bool show) + { + if ( show && !m_toolbarRealized ) + { + m_toolbar->Realize(); + m_toolbarRealized = true; + + const wxToolBarToolBase *first = m_toolbar->GetToolByPos(0); + wxCHECK_MSG( first, false, "no preferences panels" ); + OnSelectPageForTool(first); + m_toolbar->OSXSelectTool(first->GetId()); + } + + return wxFrame::Show(show); + } + + virtual bool ShouldPreventAppExit() const { return false; } + +protected: + // Native preferences windows resize when the selected panel changes and + // the resizing is animated, so we need to override DoMoveWindow. + virtual void DoMoveWindow(int x, int y, int width, int height) + { + NSRect r = wxToNSRect(NULL, wxRect(x, y, width, height)); + NSWindow *win = (NSWindow*)GetWXWindow(); + [win setFrame:r display:YES animate:YES]; + } + + +private: + void OnSelectPageForTool(const wxToolBarToolBase *tool) + { + PageInfo *info = static_cast(tool->GetClientData()); + wxCHECK_RET( info, "toolbar item lacks client data" ); + + if ( !info->win ) + { + info->win = info->page->CreateWindow(this); + info->win->Hide(); + info->win->Fit(); + // fill the page with data using wxEVT_INIT_DIALOG/TransferDataToWindow: + info->win->InitDialog(); + } + + // When the page changes in a native preferences dialog, the sequence + // of events is thus: + + // 1. the old page is hidden, only gray background remains + if ( m_visiblePage ) + m_visiblePage->Hide(); + m_visiblePage = info->win; + + // 2. window is resized to fix the new page, with animation + // (in our case, using overriden DoMoveWindow()) + SetClientSize(info->win->GetSize()); + + // 3. new page is shown and the title updated. + info->win->Show(); + SetTitle(info->page->GetName()); + + // TODO: Preferences window may have some pages resizeable and some + // non-resizable on OS X; the whole window is or is not resizable + // depending on which page is selected. + // + // We'll need to add wxPreferencesPage::IsResizable() virtual + // method to implement this. + } + + void OnPageChanged(wxCommandEvent& event) + { + wxToolBarToolBase *tool = m_toolbar->FindById(event.GetId()); + wxCHECK_RET( tool, "invalid tool ID" ); + OnSelectPageForTool(tool); + } + + void OnClose(wxCloseEvent& e) + { + // Instead of destroying the window, just hide it, it could be + // reused again by another invocation of the editor. + Hide(); + } + +private: + struct PageInfo : public wxObject + { + PageInfo(wxPreferencesPage *p) : page(p), win(NULL) {} + + wxSharedPtr page; + wxWindow *win; + }; + // All pages. Use shared pointer to be able to get pointers to PageInfo structs + wxVector< wxSharedPtr > m_pages; + + wxToolBar *m_toolbar; + bool m_toolbarRealized; + wxWindow *m_visiblePage; +}; + + +class wxCocoaPreferencesEditorImpl : public wxPreferencesEditorImpl +{ +public: + wxCocoaPreferencesEditorImpl(const wxString& title) + : m_win(NULL), m_title(title) + { + } + + virtual ~wxCocoaPreferencesEditorImpl() + { + // m_win may already be destroyed if this destructor is called from + // wxApp's destructor. In that case, all windows -- including this + // one -- would already be destroyed by now. + if ( m_win ) + m_win->Destroy(); + } + + virtual void AddPage(wxPreferencesPage* page) + { + GetWin()->AddPage(page); + } + + virtual void Show(wxWindow* WXUNUSED(parent)) + { + // OS X preferences windows don't have parents, they are independent + // windows, so we just ignore the 'parent' argument. + wxWindow *win = GetWin(); + win->Show(); + win->Raise(); + } + + virtual void Dismiss() + { + // Don't destroy the window, only hide it, because OS X preferences + // window typically remember their state even when closed. Reopening + // the window should show it in the exact same state the user left it. + GetWin()->Hide(); + } + +private: + // Use this function to access m_win, so that the window is only created on + // demand when actually needed. + wxCocoaPrefsWindow* GetWin() + { + if ( !m_win ) + { + if ( m_title.empty() ) + m_title = _("Preferences"); + + m_win = new wxCocoaPrefsWindow(m_title); + } + + return m_win; + } + + wxWeakRef m_win; + + wxString m_title; +}; + +/*static*/ +wxPreferencesEditorImpl* wxPreferencesEditorImpl::Create(const wxString& title) +{ + return new wxCocoaPreferencesEditorImpl(title); +} + +#endif // wxHAS_PREF_EDITOR_NATIVE + +#endif // wxUSE_PREFERENCES_EDITOR diff --git a/Externals/wxWidgets3/src/osx/cocoa/printdlg.mm b/Externals/wxWidgets3/src/osx/cocoa/printdlg.mm index e7ccdaca0a..06c7e15950 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/printdlg.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/printdlg.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: printdlg.mm 70707 2012-02-27 15:20:19Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -14,6 +13,7 @@ #if wxUSE_PRINTING_ARCHITECTURE #include "wx/printdlg.h" +#include "wx/modalhook.h" #ifndef WX_PRECOMP #include "wx/object.h" @@ -59,12 +59,19 @@ void wxOSXCocoaPrintData::UpdateToPMState() int wxMacPrintDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + m_printDialogData.GetPrintData().ConvertToNative(); int result = wxID_CANCEL; NSPrintPanel* panel = [NSPrintPanel printPanel]; NSPrintInfo* printInfo = ((wxOSXCocoaPrintData*)m_printDialogData.GetPrintData().GetNativeData())->GetNSPrintInfo(); + + NSMutableDictionary* dict = [printInfo printSettings]; + [dict setValue:[NSNumber numberWithInt:m_printDialogData.GetMinPage()] forKey:@"com_apple_print_PrintSettings_PMFirstPage"]; + [dict setValue:[NSNumber numberWithInt:m_printDialogData.GetMaxPage()] forKey:@"com_apple_print_PrintSettings_PMLastPage"]; + if ( (NSInteger)[panel runModalWithPrintInfo:printInfo] == NSOKButton ) { result = wxID_OK; @@ -77,6 +84,8 @@ int wxMacPrintDialog::ShowModal() int wxMacPageSetupDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + m_pageSetupData.GetPrintData().ConvertToNative(); ((wxOSXCocoaPrintData*)m_pageSetupData.GetPrintData().GetNativeData())->TransferFrom( &m_pageSetupData ); diff --git a/Externals/wxWidgets3/src/osx/cocoa/radiobut.mm b/Externals/wxWidgets3/src/osx/cocoa/radiobut.mm index 48ca2dbaa9..05e1a021d2 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/radiobut.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/radiobut.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: ??/??/98 -// RCS-ID: $Id: radiobut.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) AUTHOR // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -16,6 +15,87 @@ #include "wx/radiobut.h" #include "wx/osx/private.h" +// ugly workaround for the fact that since 10.8 is treating all subviews of a view +// which share the same action selector as a group and sets their value automatically +// so we are creating different selectors and iterate through them +// as we are assigning their selectors as actions + +#include + +const int maxAlternateActions = 100; +NSString* alternateActionsSelector = @"controlAction%d:"; + +extern void wxOSX_controlAction(NSView* self, SEL _cmd, id sender); + +@interface wxNSRadioButton : NSButton +{ + NSTrackingRectTag rectTag; +} + +@end + +@implementation wxNSRadioButton ++ (void)initialize +{ + static BOOL initialized = NO; + if (!initialized) + { + initialized = YES; + wxOSXCocoaClassAddWXMethods( self ); + for ( int i = 1 ; i <= maxAlternateActions ; i++ ) + { + class_addMethod(self, NSSelectorFromString([NSString stringWithFormat: alternateActionsSelector, i]), (IMP) wxOSX_controlAction, "v@:@" ); + } + } +} + +- (void) setState: (NSInteger) v +{ + [super setState:v]; + // [[self cell] setState:v]; +} + +- (int) intValue +{ + switch ( [self state] ) + { + case NSOnState: + return 1; + case NSMixedState: + return 2; + default: + return 0; + } +} + +- (void) setIntValue: (int) v +{ + switch( v ) + { + case 2: + [self setState:NSMixedState]; + break; + case 1: + [self setState:NSOnState]; + break; + default : + [self setState:NSOffState]; + break; + } +} + +- (void) setTrackingTag: (NSTrackingRectTag)tag +{ + rectTag = tag; +} + +- (NSTrackingRectTag) trackingTag +{ + return rectTag; +} + +@end + wxWidgetImplType* wxWidgetImpl::CreateRadioButton( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), wxWindowID WXUNUSED(id), @@ -26,10 +106,16 @@ wxWidgetImplType* wxWidgetImpl::CreateRadioButton( wxWindowMac* wxpeer, long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; - wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; + wxNSRadioButton* v = [[wxNSRadioButton alloc] initWithFrame:r]; [v setButtonType:NSRadioButton]; + static int alternateAction = 1; + + [v setAction: NSSelectorFromString([NSString stringWithFormat: alternateActionsSelector, alternateAction])]; + if ( ++alternateAction > maxAlternateActions ) + alternateAction = 1; + wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); return c; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/scrolbar.mm b/Externals/wxWidgets3/src/osx/cocoa/scrolbar.mm index 2016cc5124..6559a8d47c 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/scrolbar.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/scrolbar.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: scrolbar.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/slider.mm b/Externals/wxWidgets3/src/osx/cocoa/slider.mm index 310e0fef0b..2803fbcd32 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/slider.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/slider.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: slider.mm 67887 2011-06-08 22:48:29Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/spinbutt.mm b/Externals/wxWidgets3/src/osx/cocoa/spinbutt.mm index 5aadd66e87..67675aba9f 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/spinbutt.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/spinbutt.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: spinbutt.mm 70259 2012-01-04 07:54:00Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/srchctrl.mm b/Externals/wxWidgets3/src/osx/cocoa/srchctrl.mm index 55d1442e6a..880d590773 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/srchctrl.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/srchctrl.mm @@ -3,7 +3,6 @@ // Purpose: implements mac carbon wxSearchCtrl // Author: Vince Harron // Created: 2006-02-19 -// RCS-ID: $Id: srchctrl.mm 67905 2011-06-09 01:25:27Z SC $ // Copyright: Vince Harron // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/statbox.mm b/Externals/wxWidgets3/src/osx/cocoa/statbox.mm index 307255eb9f..1a346a4d75 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/statbox.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/statbox.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: statbox.mm 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -73,7 +72,9 @@ wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer, NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSBox* v = [[wxNSBox alloc] initWithFrame:r]; wxStaticBoxCocoaImpl* c = new wxStaticBoxCocoaImpl( wxpeer, v ); +#if !wxOSX_USE_NATIVE_FLIPPED c->SetFlipped(false); +#endif return c; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/statline.mm b/Externals/wxWidgets3/src/osx/cocoa/statline.mm index de356d2338..8590d36740 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/statline.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/statline.mm @@ -3,7 +3,6 @@ // Purpose: wxStaticLine class // Author: Stefan Csomor // Created: 28.06.99 -// Version: $Id: statline.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) 2008 Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/stattext.mm b/Externals/wxWidgets3/src/osx/cocoa/stattext.mm index 77c7ed19af..832b319017 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/stattext.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/stattext.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: stattext.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -102,7 +101,7 @@ private: NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init]; [paragraphStyle setLineBreakMode:m_lineBreak]; int style = GetWXPeer()->GetWindowStyleFlag(); - if (style & wxALIGN_CENTER) + if (style & wxALIGN_CENTER_HORIZONTAL) [paragraphStyle setAlignment: NSCenterTextAlignment]; else if (style & wxALIGN_RIGHT) [paragraphStyle setAlignment: NSRightTextAlignment]; diff --git a/Externals/wxWidgets3/src/osx/cocoa/taskbar.mm b/Externals/wxWidgets3/src/osx/cocoa/taskbar.mm index f3cca4a6f9..06342b4e72 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/taskbar.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/taskbar.mm @@ -4,7 +4,6 @@ // Author: David Elliott, Stefan Csomor // Modified by: // Created: 2004/01/24 -// RCS-ID: $Id: taskbar.mm 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) 2004 David Elliott, Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// @@ -141,9 +140,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler) wxTaskBarIcon::wxTaskBarIcon(wxTaskBarIconType iconType) { - if(iconType == DOCK) + if(iconType == wxTBI_DOCK) m_impl = new wxTaskBarIconDockImpl(this); - else if(iconType == CUSTOM_STATUSITEM) + else if(iconType == wxTBI_CUSTOM_STATUSITEM) m_impl = new wxTaskBarIconCustomStatusItemImpl(this); else { m_impl = NULL; @@ -338,7 +337,7 @@ wxTaskBarIconCustomStatusItemImpl::~wxTaskBarIconCustomStatusItemImpl() { } -bool wxTaskBarIconCustomStatusItemImpl::SetIcon(const wxIcon& icon, const wxString& WXUNUSED(tooltip)) +bool wxTaskBarIconCustomStatusItemImpl::SetIcon(const wxIcon& icon, const wxString& tooltip) { if(!m_statusItem) { @@ -347,6 +346,7 @@ bool wxTaskBarIconCustomStatusItemImpl::SetIcon(const wxIcon& icon, const wxStri m_target = [[wxOSXStatusItemTarget alloc] init]; [m_target setImplementation:this]; + [m_statusItem setHighlightMode:YES]; [m_statusItem setTarget:m_target]; [m_statusItem setAction:@selector(clickedAction:)]; [m_statusItem sendActionOn:NSLeftMouseDownMask]; @@ -367,6 +367,8 @@ bool wxTaskBarIconCustomStatusItemImpl::SetIcon(const wxIcon& icon, const wxStri } [m_statusItem setImage:m_icon.GetNSImage()]; + wxCFStringRef cfTooltip(tooltip); + [m_statusItem setToolTip:cfTooltip.AsNSString()]; return true; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/textctrl.mm b/Externals/wxWidgets3/src/osx/cocoa/textctrl.mm index 280d236b59..6c38fdf74f 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/textctrl.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/textctrl.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Ryan Norton (MLTE GetLineLength and GetLineText) // Created: 1998-01-01 -// RCS-ID: $Id: textctrl.mm 70667 2012-02-22 08:24:09Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -111,6 +110,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; @interface wxMaximumLengthFormatter : NSFormatter { int maxLength; + wxTextEntry* field; } @end @@ -119,7 +119,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; - (id)init { - [super init]; + self = [super init]; maxLength = 0; return self; } @@ -148,12 +148,17 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; int len = [*partialStringPtr length]; if ( maxLength > 0 && len > maxLength ) { - // TODO wxEVT_COMMAND_TEXT_MAXLEN + field->SendMaxLenEvent(); return NO; } return YES; } +- (void) setTextEntry:(wxTextEntry*) tf +{ + field = tf; +} + @end @implementation wxNSSecureTextField @@ -182,7 +187,11 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if ( impl ) { - impl->DoNotifyFocusEvent( false, NULL ); + NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder(); + NSView* otherView = wxOSXGetViewFromResponder(responder); + + wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView); + impl->DoNotifyFocusEvent( false, otherWindow ); } } @@ -206,7 +215,7 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; wxButton *def = wxDynamicCast(tlw->GetDefaultItem(), wxButton); if ( def && def->IsEnabled() ) { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() ); + wxCommandEvent event(wxEVT_BUTTON, def->GetId() ); event.SetEventObject(def); def->Command(event); handled = YES; @@ -336,7 +345,11 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if ( impl ) { - impl->DoNotifyFocusEvent( false, NULL ); + NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder(); + NSView* otherView = wxOSXGetViewFromResponder(responder); + + wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView); + impl->DoNotifyFocusEvent( false, otherWindow ); } } @@ -499,7 +512,18 @@ NSView* wxMacEditHelper::ms_viewCurrentlyEdited = nil; wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if ( impl ) { - impl->DoNotifyFocusEvent( false, NULL ); + wxNSTextFieldControl* timpl = dynamic_cast(impl); + if ( fieldEditor ) + { + NSRange range = [fieldEditor selectedRange]; + timpl->SetInternalSelection(range.location, range.location + range.length); + } + + NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder(); + NSView* otherView = wxOSXGetViewFromResponder(responder); + + wxWidgetImpl* otherWindow = impl->FindBestFromWXWidget(otherView); + impl->DoNotifyFocusEvent( false, otherWindow ); } } @end @@ -515,7 +539,8 @@ wxNSTextViewControl::wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w ) [m_scrollView setHasVerticalScroller:YES]; [m_scrollView setHasHorizontalScroller:NO]; - [m_scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; + // TODO Remove if no regression, this was causing automatic resizes of multi-line textfields when the tlw changed + // [m_scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; NSSize contentSize = [m_scrollView contentSize]; wxNSTextView* tv = [[wxNSTextView alloc] initWithFrame: NSMakeRect(0, 0, @@ -688,24 +713,35 @@ void wxNSTextViewControl::SetStyle(long start, long end, const wxTextAttr& style) { - if (m_textView) { + if ( !m_textView ) + return; + + if ( start == -1 && end == -1 ) + { + NSMutableDictionary* const + attrs = [NSMutableDictionary dictionaryWithCapacity:3]; + if ( style.HasFont() ) + [attrs setValue:style.GetFont().OSXGetNSFont() forKey:NSFontAttributeName]; + if ( style.HasBackgroundColour() ) + [attrs setValue:style.GetBackgroundColour().OSXGetNSColor() forKey:NSBackgroundColorAttributeName]; + if ( style.HasTextColour() ) + [attrs setValue:style.GetTextColour().OSXGetNSColor() forKey:NSForegroundColorAttributeName]; + + [m_textView setTypingAttributes:attrs]; + } + else // Set the attributes just for this range. + { NSRange range = NSMakeRange(start, end-start); - if (start == -1 && end == -1) - range = [m_textView selectedRange]; NSTextStorage* storage = [m_textView textStorage]; - - wxFont font = style.GetFont(); - if (style.HasFont() && font.IsOk()) - [storage addAttribute:NSFontAttributeName value:font.OSXGetNSFont() range:range]; - - wxColour bgcolor = style.GetBackgroundColour(); - if (style.HasBackgroundColour() && bgcolor.IsOk()) - [storage addAttribute:NSBackgroundColorAttributeName value:bgcolor.OSXGetNSColor() range:range]; - - wxColour fgcolor = style.GetTextColour(); - if (style.HasTextColour() && fgcolor.IsOk()) - [storage addAttribute:NSForegroundColorAttributeName value:fgcolor.OSXGetNSColor() range:range]; + if ( style.HasFont() ) + [storage addAttribute:NSFontAttributeName value:style.GetFont().OSXGetNSFont() range:range]; + + if ( style.HasBackgroundColour() ) + [storage addAttribute:NSBackgroundColorAttributeName value:style.GetBackgroundColour().OSXGetNSColor() range:range]; + + if ( style.HasTextColour() ) + [storage addAttribute:NSForegroundColorAttributeName value:style.GetTextColour().OSXGetNSColor() range:range]; } } @@ -774,6 +810,7 @@ void wxNSTextFieldControl::SetMaxLength(unsigned long len) { wxMaximumLengthFormatter* formatter = [[[wxMaximumLengthFormatter alloc] init] autorelease]; [formatter setMaxLength:len]; + [formatter setTextEntry:GetTextEntry()]; [m_textField setFormatter:formatter]; } @@ -852,11 +889,11 @@ void wxNSTextFieldControl::SetSelection( long from , long to ) { [editor setSelectedRange:NSMakeRange(from, to-from)]; } - else - { - m_selStart = from; - m_selEnd = to; - } + + // the editor might still be in existence, but we might be already passed our 'focus lost' storage + // of the selection, so make sure we copy this + m_selStart = from; + m_selEnd = to; } void wxNSTextFieldControl::WriteText(const wxString& str) @@ -867,7 +904,12 @@ void wxNSTextFieldControl::WriteText(const wxString& str) if ( editor ) { wxMacEditHelper helper(m_textField); + BOOL hasUndo = [editor respondsToSelector:@selector(setAllowsUndo:)]; + if ( hasUndo ) + [(NSTextView*)editor setAllowsUndo:NO]; [editor insertText:wxCFStringRef( str , m_wxPeer->GetFont().GetEncoding() ).AsNSString()]; + if ( hasUndo ) + [(NSTextView*)editor setAllowsUndo:YES]; } else { @@ -888,13 +930,59 @@ void wxNSTextFieldControl::controlAction(WXWidget WXUNUSED(slf), wxWindow* wxpeer = (wxWindow*) GetWXPeer(); if ( wxpeer && (wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER) ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, wxpeer->GetId()); + wxCommandEvent event(wxEVT_TEXT_ENTER, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetString( GetTextEntry()->GetValue() ); wxpeer->HandleWindowEvent( event ); } } +void wxNSTextFieldControl::SetInternalSelection( long from , long to ) +{ + m_selStart = from; + m_selEnd = to; +} + +// as becoming first responder on a window - triggers a resign on the same control, we have to avoid +// the resign notification writing back native selection values before we can set our own + +static WXWidget s_widgetBecomingFirstResponder = nil; + +bool wxNSTextFieldControl::becomeFirstResponder(WXWidget slf, void *_cmd) +{ + s_widgetBecomingFirstResponder = slf; + bool retval = wxWidgetCocoaImpl::becomeFirstResponder(slf, _cmd); + s_widgetBecomingFirstResponder = nil; + if ( retval ) + { + NSText* editor = [m_textField currentEditor]; + if ( editor ) + { + long textLength = [[m_textField stringValue] length]; + m_selStart = wxMin(textLength,wxMax(m_selStart,0)) ; + m_selEnd = wxMax(0,wxMin(textLength,m_selEnd)) ; + + [editor setSelectedRange:NSMakeRange(m_selStart, m_selEnd-m_selStart)]; + } + } + return retval; +} + +bool wxNSTextFieldControl::resignFirstResponder(WXWidget slf, void *_cmd) +{ + if ( slf != s_widgetBecomingFirstResponder ) + { + NSText* editor = [m_textField currentEditor]; + if ( editor ) + { + NSRange range = [editor selectedRange]; + m_selStart = range.location; + m_selEnd = range.location + range.length; + } + } + return wxWidgetCocoaImpl::resignFirstResponder(slf, _cmd); +} + bool wxNSTextFieldControl::SetHint(const wxString& hint) { wxCFStringRef hintstring(hint); @@ -918,11 +1006,12 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxWidgetCocoaImpl* c = NULL; - if ( style & wxTE_MULTILINE || style & wxTE_RICH || style & wxTE_RICH2 ) + if ( style & wxTE_MULTILINE ) { wxNSTextScrollView* v = nil; v = [[wxNSTextScrollView alloc] initWithFrame:r]; c = new wxNSTextViewControl( wxpeer, v ); + c->SetNeedsFocusRect( true ); } else { @@ -932,24 +1021,39 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, else v = [[wxNSTextField alloc] initWithFrame:r]; - if ( style & wxNO_BORDER ) + if ( style & wxTE_RIGHT) { - // FIXME: How can we remove the native control's border? - // setBordered is separate from the text ctrl's border. + [v setAlignment:NSRightTextAlignment]; } - + else if ( style & wxTE_CENTRE) + { + [v setAlignment:NSCenterTextAlignment]; + } + NSTextFieldCell* cell = [v cell]; [cell setScrollable:YES]; // TODO: Remove if we definitely are sure, it's not needed // as setting scrolling to yes, should turn off any wrapping // [cell setLineBreakMode:NSLineBreakByClipping]; - [v setBezeled:NO]; - [v setBordered:NO]; - c = new wxNSTextFieldControl( wxpeer, wxpeer, v ); + + if ( (style & wxNO_BORDER) || (style & wxSIMPLE_BORDER) ) + { + // under 10.7 the textcontrol can draw its own focus + // even if no border is shown, on previous systems + // we have to emulate this + [v setBezeled:NO]; + [v setBordered:NO]; + if ( UMAGetSystemVersion() < 0x1070 ) + c->SetNeedsFocusRect( true ); + } + else + { + // use native border + c->SetNeedsFrame(false); + } } - c->SetNeedsFocusRect( true ); return c; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/tglbtn.mm b/Externals/wxWidgets3/src/osx/cocoa/tglbtn.mm index c31590e8fe..3dd6dedd87 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/tglbtn.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/tglbtn.mm @@ -5,7 +5,6 @@ // Author: Stefan Csomor // Modified by: // Created: 08.02.01 -// RCS-ID: $Id: tglbtn.mm 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -27,12 +26,16 @@ // from button.mm -extern "C" void SetBezelStyleFromBorderFlags(NSButton *v, long style); +extern "C" void SetBezelStyleFromBorderFlags(NSButton *v, + long style, + wxWindowID winid = wxID_ANY, + const wxString& label = wxString(), + const wxBitmap& bitmap = wxBitmap()); wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), - const wxString& WXUNUSED(label), + wxWindowID winid, + const wxString& label, const wxPoint& pos, const wxSize& size, long style, @@ -41,16 +44,16 @@ wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer, NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; - SetBezelStyleFromBorderFlags(v, style); + SetBezelStyleFromBorderFlags(v, style, winid, label); [v setButtonType:NSOnOffButton]; - wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); + wxWidgetCocoaImpl* c = new wxButtonCocoaImpl( wxpeer, v ); return c; } wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), + wxWindowID winid, const wxBitmap& label, const wxPoint& pos, const wxSize& size, @@ -60,13 +63,13 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer, NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; + SetBezelStyleFromBorderFlags(v, style, winid, wxString(), label); + if (label.IsOk()) [v setImage:label.GetNSImage() ]; - SetBezelStyleFromBorderFlags(v, style); - [v setButtonType:NSOnOffButton]; - wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); + wxWidgetCocoaImpl* c = new wxButtonCocoaImpl( wxpeer, v ); return c; } diff --git a/Externals/wxWidgets3/src/osx/cocoa/toolbar.mm b/Externals/wxWidgets3/src/osx/cocoa/toolbar.mm index ba1b60bcac..ebca4f42e1 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/toolbar.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/toolbar.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: toolbar.mm 70851 2012-03-09 12:49:59Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -305,8 +304,11 @@ private: @interface wxNSToolbarDelegate : NSObject wxOSX_10_6_AND_LATER() { + bool m_isSelectable; } +- (void)setSelectable:(bool) value; + - (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag; - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar; @@ -363,6 +365,17 @@ private: @implementation wxNSToolbarDelegate +- (id)init +{ + m_isSelectable = false; + return [super init]; +} + +- (void)setSelectable:(bool) value +{ + m_isSelectable = true; +} + - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar { wxUnusedVar(toolbar); @@ -377,8 +390,10 @@ private: - (NSArray *)toolbarSelectableItemIdentifiers:(NSToolbar *)toolbar { - wxUnusedVar(toolbar); - return nil; + if ( m_isSelectable ) + return [[toolbar items] valueForKey:@"itemIdentifier"]; + else + return nil; } - (NSToolbarItem*) toolbar:(NSToolbar*) toolbar itemForItemIdentifier:(NSString*) itemIdentifier willBeInsertedIntoToolbar:(BOOL) flag @@ -1228,9 +1243,6 @@ bool wxToolBar::Realize() SetInitialSize( wxSize(m_minWidth, m_minHeight)); SendSizeEventToParent(); - wxWindow * const parent = GetParent(); - if ( parent && !parent->IsBeingDeleted() ) - parent->MacOnInternalSize(); return true; } @@ -1428,7 +1440,9 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase) wxNSToolBarButton* v = [[wxNSToolBarButton alloc] initWithFrame:toolrect]; - [v setBezelStyle:NSRegularSquareBezelStyle]; + [v setBezelStyle:NSSmallSquareBezelStyle]; + [[v cell] setControlSize:NSSmallControlSize]; + [v setFont:[NSFont fontWithName:[[v font] fontName] size:[NSFont systemFontSizeForControlSize:NSSmallControlSize]]]; [v setBordered:NO]; [v setButtonType: ( tool->CanBeToggled() ? NSToggleButton : NSMomentaryPushInButton )]; [v setImplementation:tool]; @@ -1447,7 +1461,8 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase) #endif // wxOSX_USE_NATIVE_TOOLBAR tool->SetControlHandle( controlHandle ); - tool->UpdateImages(); + if ( !(style & wxTB_NOICONS) ) + tool->UpdateImages(); tool->UpdateLabel(); if ( style & wxTB_NOICONS ) @@ -1589,45 +1604,41 @@ void wxToolBar::OnPaint(wxPaintEvent& event) int w, h; GetSize( &w, &h ); - bool drawMetalTheme = MacGetTopLevelWindow()->GetExtraStyle() & wxFRAME_EX_METAL; - - if ( UMAGetSystemVersion() < 0x1050 ) - { - if ( !drawMetalTheme ) - { - HIThemePlacardDrawInfo info; - memset( &info, 0, sizeof(info) ); - info.version = 0; - info.state = IsEnabled() ? kThemeStateActive : kThemeStateInactive; - - CGContextRef cgContext = (CGContextRef) MacGetCGContextRef(); - HIRect rect = CGRectMake( 0, 0, w, h ); - HIThemeDrawPlacard( &rect, &info, cgContext, kHIThemeOrientationNormal ); - } - else - { - // leave the background as it is (striped or metal) - } - } - else - { - wxPaintDC dc(this); - - wxRect rect(0,0,w,h); - - dc.GradientFillLinear( rect , wxColour( 0xCC,0xCC,0xCC ), wxColour( 0xA8,0xA8,0xA8 ) , wxSOUTH ); - dc.SetPen( wxPen( wxColour( 0x51,0x51,0x51 ) ) ); - if ( HasFlag(wxTB_LEFT) ) - dc.DrawLine(w-1, 0, w-1, h); - else if ( HasFlag(wxTB_RIGHT) ) - dc.DrawLine(0, 0, 0, h); - else if ( HasFlag(wxTB_BOTTOM) ) - dc.DrawLine(0, 0, w, 0); - else if ( HasFlag(wxTB_TOP) ) - dc.DrawLine(0, h-1, w, h-1); - } + wxPaintDC dc(this); + + wxRect rect(0,0,w,h); + + dc.GradientFillLinear( rect , wxColour( 0xCC,0xCC,0xCC ), wxColour( 0xA8,0xA8,0xA8 ) , wxSOUTH ); + dc.SetPen( wxPen( wxColour( 0x51,0x51,0x51 ) ) ); + if ( HasFlag(wxTB_LEFT) ) + dc.DrawLine(w-1, 0, w-1, h); + else if ( HasFlag(wxTB_RIGHT) ) + dc.DrawLine(0, 0, 0, h); + else if ( HasFlag(wxTB_BOTTOM) ) + dc.DrawLine(0, 0, w, 0); + else if ( HasFlag(wxTB_TOP) ) + dc.DrawLine(0, h-1, w, h-1); } event.Skip(); } +#if wxOSX_USE_NATIVE_TOOLBAR +void wxToolBar::OSXSetSelectableTools(bool set) +{ + wxCHECK_RET( m_macToolbar, "toolbar must be non-NULL" ); + [(wxNSToolbarDelegate*)[(NSToolbar*)m_macToolbar delegate] setSelectable:set]; +} + +void wxToolBar::OSXSelectTool(int toolId) +{ + wxToolBarToolBase *tool = FindById(toolId); + wxCHECK_RET( tool, "invalid tool ID" ); + wxCHECK_RET( m_macToolbar, "toolbar must be non-NULL" ); + + wxString identifier = wxString::Format(wxT("%ld"), (long)tool); + wxCFStringRef cfidentifier(identifier, wxFont::GetDefaultEncoding()); + [(NSToolbar*)m_macToolbar setSelectedItemIdentifier:cfidentifier.AsNSString()]; +} +#endif // wxOSX_USE_NATIVE_TOOLBAR + #endif // wxUSE_TOOLBAR diff --git a/Externals/wxWidgets3/src/osx/cocoa/tooltip.mm b/Externals/wxWidgets3/src/osx/cocoa/tooltip.mm index 5a33db72bd..d36bbeba52 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/tooltip.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/tooltip.mm @@ -2,7 +2,6 @@ // Name: src/osx/cocoa/tooltip.mm // Purpose: wxToolTip implementation // Author: Stefan Csomor -// Id: $Id: tooltip.mm 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/cocoa/utils.mm b/Externals/wxWidgets3/src/osx/cocoa/utils.mm index 5b23abb85d..3e07d7dc2c 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/utils.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/utils.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: utils.mm 68958 2011-08-30 09:02:11Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -37,7 +36,7 @@ #if wxOSX_USE_COCOA -#if wxUSE_BASE +#if wxUSE_GUI // Emit a beeeeeep void wxBell() @@ -45,13 +44,10 @@ void wxBell() NSBeep(); } -#endif // wxUSE_BASE - -#if wxUSE_GUI - @implementation wxNSAppController -- (void)applicationWillFinishLaunching:(NSNotification *)application { +- (void)applicationWillFinishLaunching:(NSNotification *)application +{ wxUnusedVar(application); // we must install our handlers later than setting the app delegate, because otherwise our handlers @@ -65,6 +61,12 @@ void wxBell() [appleEventManager setEventHandler:self andSelector:@selector(handleOpenAppEvent:withReplyEvent:) forEventClass:kCoreEventClass andEventID:kAEOpenApplication]; + wxTheApp->OSXOnWillFinishLaunching(); +} + +- (void)applicationDidFinishLaunching:(NSNotification *)notification +{ + wxTheApp->OSXOnDidFinishLaunching(); } - (void)application:(NSApplication *)sender openFiles:(NSArray *)fileNames @@ -75,7 +77,7 @@ void wxBell() const size_t count = [fileNames count]; for (i = 0; i < count; i++) { - fileList.Add( wxCFStringRef::AsString([fileNames objectAtIndex:i]) ); + fileList.Add( wxCFStringRef::AsStringWithNormalizationFormC([fileNames objectAtIndex:i]) ); } wxTheApp->MacOpenFiles(fileList); @@ -123,9 +125,7 @@ void wxBell() - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { wxUnusedVar(sender); - wxCloseEvent event; - wxTheApp->OnQueryEndSession(event); - if ( event.GetVeto() ) + if ( !wxTheApp->OSXOnShouldTerminate() ) return NSTerminateCancel; return NSTerminateNow; @@ -133,9 +133,7 @@ void wxBell() - (void)applicationWillTerminate:(NSNotification *)application { wxUnusedVar(application); - wxCloseEvent event; - event.SetCanVeto(false); - wxTheApp->OnEndSession(event); + wxTheApp->OSXOnWillTerminate(); } - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender @@ -241,15 +239,66 @@ void wxBell() } @end +// here we subclass NSApplication, for the purpose of being able to override sendEvent. +@interface wxNSApplication : NSApplication +{ + BOOL firstPass; +} + +- (id)init; + +- (void)sendEvent:(NSEvent *)anEvent; + +@end + +@implementation wxNSApplication + +- (id)init +{ + self = [super init]; + firstPass = YES; + return self; +} + +/* This is needed because otherwise we don't receive any key-up events for command-key + combinations (an AppKit bug, apparently) */ +- (void)sendEvent:(NSEvent *)anEvent +{ + if ([anEvent type] == NSKeyUp && ([anEvent modifierFlags] & NSCommandKeyMask)) + [[self keyWindow] sendEvent:anEvent]; + else + [super sendEvent:anEvent]; + + if ( firstPass ) + { + [NSApp stop:nil]; + firstPass = NO; + return; + } +} + +@end + +WX_NSObject appcontroller = nil; + +NSLayoutManager* gNSLayoutManager = nil; + +WX_NSObject wxApp::OSXCreateAppController() +{ + return [[wxNSAppController alloc] init]; +} + bool wxApp::DoInitGui() { wxMacAutoreleasePool pool; - [NSApplication sharedApplication]; if (!sm_isEmbedded) { - wxNSAppController* controller = [[wxNSAppController alloc] init]; - [NSApp setDelegate:controller]; + [wxNSApplication sharedApplication]; + + appcontroller = OSXCreateAppController(); + [NSApp setDelegate:appcontroller]; + [NSColor setIgnoresAlpha:NO]; // calling finishLaunching so early before running the loop seems to trigger some 'MenuManager compatibility' which leads // to the duplication of menus under 10.5 and a warning under 10.6 @@ -257,11 +306,32 @@ bool wxApp::DoInitGui() [NSApp finishLaunching]; #endif } + gNSLayoutManager = [[NSLayoutManager alloc] init]; + return true; } +bool wxApp::CallOnInit() +{ + wxMacAutoreleasePool autoreleasepool; + m_onInitResult = false; + [NSApp run]; + return m_onInitResult; +} + void wxApp::DoCleanUp() { + if ( appcontroller != nil ) + { + [NSApp setDelegate:nil]; + [appcontroller release]; + appcontroller = nil; + } + if ( gNSLayoutManager != nil ) + { + [gNSLayoutManager release]; + gNSLayoutManager = nil; + } } void wxClientDisplayRect(int *x, int *y, int *width, int *height) diff --git a/Externals/wxWidgets3/src/osx/cocoa/window.mm b/Externals/wxWidgets3/src/osx/cocoa/window.mm index dd8fb68e53..78cd6f99aa 100644 --- a/Externals/wxWidgets3/src/osx/cocoa/window.mm +++ b/Externals/wxWidgets3/src/osx/cocoa/window.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2008-06-20 -// RCS-ID: $Id: window.mm 70863 2012-03-10 13:13:51Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -17,6 +16,7 @@ #include "wx/log.h" #include "wx/textctrl.h" #include "wx/combobox.h" + #include "wx/radiobut.h" #endif #ifdef __WXMAC__ @@ -41,7 +41,7 @@ // Get the window with the focus -NSView* GetViewFromResponder( NSResponder* responder ) +NSView* wxOSXGetViewFromResponder( NSResponder* responder ) { NSView* view = nil; if ( [responder isKindOfClass:[NSTextView class]] ) @@ -64,16 +64,29 @@ NSView* GetFocusedViewInWindow( NSWindow* keyWindow ) { NSView* focusedView = nil; if ( keyWindow != nil ) - focusedView = GetViewFromResponder([keyWindow firstResponder]); + focusedView = wxOSXGetViewFromResponder([keyWindow firstResponder]); return focusedView; } WXWidget wxWidgetImpl::FindFocus() { - return GetFocusedViewInWindow( [NSApp keyWindow] ); + return GetFocusedViewInWindow( [NSApp keyWindow] );; } +wxWidgetImpl* wxWidgetImpl::FindBestFromWXWidget(WXWidget control) +{ + wxWidgetImpl* impl = FindFromWXWidget(control); + + // NSScrollViews can have their subviews like NSClipView + // therefore check and use the NSScrollView peer in that case + if ( impl == NULL && [[control superview] isKindOfClass:[NSScrollView class]]) + impl = FindFromWXWidget([control superview]); + + return impl; +} + + NSRect wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin ) { int x, y, w, h ; @@ -96,6 +109,22 @@ NSRect wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const @end // wxNSView +@interface wxNSView(TextInput) + +- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange; +- (void)doCommandBySelector:(SEL)aSelector; +- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange; +- (void)unmarkText; +- (NSRange)selectedRange; +- (NSRange)markedRange; +- (BOOL)hasMarkedText; +- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange; +- (NSArray*)validAttributesForMarkedText; +- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange; +- (NSUInteger)characterIndexForPoint:(NSPoint)aPoint; + +@end + @interface NSView(PossibleMethods) - (void)setTitle:(NSString *)aString; - (void)setStringValue:(NSString *)aString; @@ -293,59 +322,70 @@ long wxOSXTranslateCocoaKey( NSEvent* event, int eventType ) case 48: retval = WXK_TAB; break; - - case 75: // / - retval = WXK_NUMPAD_DIVIDE; - break; - case 67: // * - retval = WXK_NUMPAD_MULTIPLY; - break; - case 78: // - - retval = WXK_NUMPAD_SUBTRACT; - break; - case 69: // + - retval = WXK_NUMPAD_ADD; - break; - case 76: // Enter - retval = WXK_NUMPAD_ENTER; - break; - case 65: // . - retval = WXK_NUMPAD_DECIMAL; - break; - case 82: // 0 - retval = WXK_NUMPAD0; - break; - case 83: // 1 - retval = WXK_NUMPAD1; - break; - case 84: // 2 - retval = WXK_NUMPAD2; - break; - case 85: // 3 - retval = WXK_NUMPAD3; - break; - case 86: // 4 - retval = WXK_NUMPAD4; - break; - case 87: // 5 - retval = WXK_NUMPAD5; - break; - case 88: // 6 - retval = WXK_NUMPAD6; - break; - case 89: // 7 - retval = WXK_NUMPAD7; - break; - case 91: // 8 - retval = WXK_NUMPAD8; - break; - case 92: // 9 - retval = WXK_NUMPAD9; - break; default: - //retval = [event keyCode]; break; } + + // Check for NUMPAD keys. For KEY_UP/DOWN events we need to use the + // WXK_NUMPAD constants, but for the CHAR event we want to use the + // standard ascii values + if ( eventType != wxEVT_CHAR ) + { + switch( [event keyCode] ) + { + case 75: // / + retval = WXK_NUMPAD_DIVIDE; + break; + case 67: // * + retval = WXK_NUMPAD_MULTIPLY; + break; + case 78: // - + retval = WXK_NUMPAD_SUBTRACT; + break; + case 69: // + + retval = WXK_NUMPAD_ADD; + break; + case 76: // Enter + retval = WXK_NUMPAD_ENTER; + break; + case 65: // . + retval = WXK_NUMPAD_DECIMAL; + break; + case 82: // 0 + retval = WXK_NUMPAD0; + break; + case 83: // 1 + retval = WXK_NUMPAD1; + break; + case 84: // 2 + retval = WXK_NUMPAD2; + break; + case 85: // 3 + retval = WXK_NUMPAD3; + break; + case 86: // 4 + retval = WXK_NUMPAD4; + break; + case 87: // 5 + retval = WXK_NUMPAD5; + break; + case 88: // 6 + retval = WXK_NUMPAD6; + break; + case 89: // 7 + retval = WXK_NUMPAD7; + break; + case 91: // 8 + retval = WXK_NUMPAD8; + break; + case 92: // 9 + retval = WXK_NUMPAD9; + break; + default: + //retval = [event keyCode]; + break; + } + } return retval; } @@ -455,13 +495,15 @@ bool g_lastButtonWasFakeRight = false ; @interface NSEvent (DeviceDelta) - (CGFloat)deviceDeltaX; - (CGFloat)deviceDeltaY; + +// 10.7+ +- (BOOL)hasPreciseScrollingDeltas; +- (CGFloat)scrollingDeltaX; +- (CGFloat)scrollingDeltaY; @end -void wxWidgetCocoaImpl::SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEvent ) +void wxWidgetCocoaImpl::SetupCoordinates(wxCoord &x, wxCoord &y, NSEvent* nsEvent) { - int eventType = [nsEvent type]; - UInt32 modifiers = [nsEvent modifierFlags] ; - NSPoint locationInWindow = [nsEvent locationInWindow]; // adjust coordinates for the window of the target view @@ -469,20 +511,30 @@ void wxWidgetCocoaImpl::SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEve { if ( [nsEvent window] != nil ) locationInWindow = [[nsEvent window] convertBaseToScreen:locationInWindow]; - + if ( [m_osxView window] != nil ) locationInWindow = [[m_osxView window] convertScreenToBase:locationInWindow]; } - + NSPoint locationInView = [m_osxView convertPoint:locationInWindow fromView:nil]; wxPoint locationInViewWX = wxFromNSPoint( m_osxView, locationInView ); + + x = locationInViewWX.x; + y = locationInViewWX.y; + +} + +void wxWidgetCocoaImpl::SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEvent ) +{ + int eventType = [nsEvent type]; + UInt32 modifiers = [nsEvent modifierFlags] ; + + SetupCoordinates(wxevent.m_x, wxevent.m_y, nsEvent); // these parameters are not given for all events UInt32 button = [nsEvent buttonNumber]; UInt32 clickCount = 0; - wxevent.m_x = locationInViewWX.x; - wxevent.m_y = locationInViewWX.y; wxevent.m_shiftDown = modifiers & NSShiftKeyMask; wxevent.m_rawControlDown = modifiers & NSControlKeyMask; wxevent.m_altDown = modifiers & NSAlternateKeyMask; @@ -609,32 +661,52 @@ void wxWidgetCocoaImpl::SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEve wxevent.SetEventType( wxEVT_MOUSEWHEEL ) ; - // see http://developer.apple.com/qa/qa2005/qa1453.html - // for more details on why we have to look for the exact type - - const EventRef cEvent = (EventRef) [nsEvent eventRef]; - bool isMouseScrollEvent = false; - if ( cEvent ) - isMouseScrollEvent = ::GetEventKind(cEvent) == kEventMouseScroll; - - if ( isMouseScrollEvent ) + if ( UMAGetSystemVersion() >= 0x1070 ) { - deltaX = [nsEvent deviceDeltaX]; - deltaY = [nsEvent deviceDeltaY]; + if ( [nsEvent hasPreciseScrollingDeltas] ) + { + deltaX = [nsEvent scrollingDeltaX]; + deltaY = [nsEvent scrollingDeltaY]; + } + else + { + deltaX = [nsEvent scrollingDeltaX] * 10; + deltaY = [nsEvent scrollingDeltaY] * 10; + } } else { - deltaX = ([nsEvent deltaX] * 10); - deltaY = ([nsEvent deltaY] * 10); + const EventRef cEvent = (EventRef) [nsEvent eventRef]; + // see http://developer.apple.com/qa/qa2005/qa1453.html + // for more details on why we have to look for the exact type + + bool isMouseScrollEvent = false; + if ( cEvent ) + isMouseScrollEvent = ::GetEventKind(cEvent) == kEventMouseScroll; + + if ( isMouseScrollEvent ) + { + deltaX = [nsEvent deviceDeltaX]; + deltaY = [nsEvent deviceDeltaY]; + } + else + { + deltaX = ([nsEvent deltaX] * 10); + deltaY = ([nsEvent deltaY] * 10); + } } wxevent.m_wheelDelta = 10; wxevent.m_linesPerAction = 1; + wxevent.m_columnsPerAction = 1; if ( fabs(deltaX) > fabs(deltaY) ) { - wxevent.m_wheelAxis = 1; - wxevent.m_wheelRotation = (int)deltaX; + // wx conventions for horizontal are inverted from vertical (originating from native msw behavior) + // right and up are positive values, left and down are negative values, while on OSX right and down + // are negative and left and up are positive. + wxevent.m_wheelAxis = wxMOUSE_WHEEL_HORIZONTAL; + wxevent.m_wheelRotation = -(int)deltaX; } else { @@ -762,8 +834,89 @@ void wxWidgetCocoaImpl::SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEve } [super removeTrackingRect:tag]; } + +#if wxOSX_USE_NATIVE_FLIPPED +- (BOOL)isFlipped +{ + return YES; +} +#endif + +- (BOOL) canBecomeKeyView +{ + wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); + if ( viewimpl && viewimpl->IsUserPane() && viewimpl->GetWXPeer() ) + return viewimpl->GetWXPeer()->AcceptsFocus(); + return NO; +} + @end // wxNSView +// We need to adopt NSTextInputClient protocol in order to interpretKeyEvents: to work. +// Currently, only insertText:(replacementRange:) is +// implemented here, and the rest of the methods are stubs. +// It is hoped that someday IME-related functionality is implemented in +// wxWidgets and the methods of this protocol are fully working. + +@implementation wxNSView(TextInput) + +void wxOSX_insertText(NSView* self, SEL _cmd, NSString* text); + +- (void)insertText:(id)aString replacementRange:(NSRange)replacementRange +{ + wxOSX_insertText(self, @selector(insertText:), aString); +} + +- (void)doCommandBySelector:(SEL)aSelector +{ + // these are already caught in the keyEvent handler +} + +- (void)setMarkedText:(id)aString selectedRange:(NSRange)selectedRange replacementRange:(NSRange)replacementRange +{ +} + +- (void)unmarkText +{ +} + +- (NSRange)selectedRange +{ + return NSMakeRange(NSNotFound, 0); +} + +- (NSRange)markedRange +{ + return NSMakeRange(NSNotFound, 0); +} + +- (BOOL)hasMarkedText +{ + return NO; +} + +- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange +{ + return nil; +} + +- (NSArray*)validAttributesForMarkedText +{ + return nil; +} + +- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange +{ + return NSMakeRect(0, 0, 0, 0); +} +- (NSUInteger)characterIndexForPoint:(NSPoint)aPoint +{ + return NSNotFound; +} + +@end // wxNSView(TextInput) + + // // event handlers // @@ -890,6 +1043,8 @@ BOOL wxOSX_resignFirstResponder(NSView* self, SEL _cmd) return impl->resignFirstResponder(self, _cmd); } +#if !wxOSX_USE_NATIVE_FLIPPED + BOOL wxOSX_isFlipped(NSView* self, SEL _cmd) { wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); @@ -899,6 +1054,8 @@ BOOL wxOSX_isFlipped(NSView* self, SEL _cmd) return impl->isFlipped(self, _cmd) ? YES:NO; } +#endif + typedef void (*wxOSX_DrawRectHandlerPtr)(NSView* self, SEL _cmd, NSRect rect); void wxOSX_drawRect(NSView* self, SEL _cmd, NSRect rect) @@ -1112,24 +1269,29 @@ bool wxWidgetCocoaImpl::performDragOperation(void* s, WXWidget WXUNUSED(slf), vo return result != wxDragNone; } -typedef void (*wxOSX_TextEventHandlerPtr)(NSView* self, SEL _cmd, NSString *event); -typedef void (*wxOSX_EventHandlerPtr)(NSView* self, SEL _cmd, NSEvent *event); -typedef BOOL (*wxOSX_PerformKeyEventHandlerPtr)(NSView* self, SEL _cmd, NSEvent *event); -typedef BOOL (*wxOSX_FocusHandlerPtr)(NSView* self, SEL _cmd); - void wxWidgetCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd) { + // we are getting moved events for all windows in the hierarchy, not something wx expects + // therefore we only handle it for the deepest child in the hierarchy + if ( [event type] == NSMouseMoved ) + { + NSView* hitview = [[[slf window] contentView] hitTest:[event locationInWindow]]; + if ( hitview == NULL || hitview != slf) + return; + } + if ( !DoHandleMouseEvent(event) ) { // for plain NSView mouse events would propagate to parents otherwise - if (!IsUserPane()) + // scrollwheel events have to be propagated if not handled in all cases + if (!IsUserPane() || [event type] == NSScrollWheel ) { wxOSX_EventHandlerPtr superimpl = (wxOSX_EventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd]; superimpl(slf, (SEL)_cmd, event); // super of built-ins keeps the mouse up, as wx expects this event, we have to synthesize it - - if ( [ event type] == NSLeftMouseDown ) + // only trigger if at this moment the mouse is already up + if ( [ event type] == NSLeftMouseDown && !wxGetMouseState().LeftIsDown() ) { wxMouseEvent wxevent(wxEVT_LEFT_DOWN); SetupMouseEvent(wxevent , event) ; @@ -1143,20 +1305,45 @@ void wxWidgetCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd) void wxWidgetCocoaImpl::cursorUpdate(WX_NSEvent event, WXWidget slf, void *_cmd) { - NSCursor *cursor = (NSCursor*)GetWXPeer()->GetCursor().GetHCURSOR(); - if (cursor == NULL) + if ( !SetupCursor(event) ) { wxOSX_EventHandlerPtr superimpl = (wxOSX_EventHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd]; - superimpl(slf, (SEL)_cmd, event); + superimpl(slf, (SEL)_cmd, event); } - else + } + +bool wxWidgetCocoaImpl::SetupCursor(WX_NSEvent event) +{ + extern wxCursor gGlobalCursor; + + if ( gGlobalCursor.IsOk() ) { - [cursor set]; + gGlobalCursor.MacInstall(); + return true; + } + else + { + wxWindow* cursorTarget = GetWXPeer(); + wxCoord x,y; + SetupCoordinates(x, y, event); + wxPoint cursorPoint( x , y ) ; + + while ( cursorTarget && !cursorTarget->MacSetupCursor( cursorPoint ) ) + { + // at least in GTK cursor events are not propagated either ... +#if 1 + cursorTarget = NULL; +#else + cursorTarget = cursorTarget->GetParent() ; + if ( cursorTarget ) + cursorPoint += cursorTarget->GetPosition(); +#endif + } + + return cursorTarget != NULL; } } - - void wxWidgetCocoaImpl::keyEvent(WX_NSEvent event, WXWidget slf, void *_cmd) { if ( [event type] == NSKeyDown ) @@ -1202,14 +1389,14 @@ bool wxWidgetCocoaImpl::performKeyEquivalent(WX_NSEvent event, WXWidget slf, voi { wxEvtHandler * const handler = m_wxPeer->GetEventHandler(); - wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command ); + wxCommandEvent command_event( wxEVT_MENU, command ); command_event.SetEventObject( wxevent.GetEventObject() ); handled = handler->ProcessEvent( command_event ); if ( !handled ) { // accelerators can also be used with buttons, try them too - command_event.SetEventType(wxEVT_COMMAND_BUTTON_CLICKED); + command_event.SetEventType(wxEVT_BUTTON); handled = handler->ProcessEvent( command_event ); } } @@ -1253,20 +1440,17 @@ bool wxWidgetCocoaImpl::resignFirstResponder(WXWidget slf, void *_cmd) { wxOSX_FocusHandlerPtr superimpl = (wxOSX_FocusHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd]; BOOL r = superimpl(slf, (SEL)_cmd); - // get the current focus after running resignFirstResponder - // note that this value isn't reliable, it might return the same view that - // is resigning - NSView* otherView = FindFocus(); - wxWidgetImpl* otherWindow = FindFromWXWidget(otherView); + + NSResponder * responder = wxNonOwnedWindowCocoaImpl::GetNextFirstResponder(); + NSView* otherView = wxOSXGetViewFromResponder(responder); - // It doesn't make sense to notify about the loss of focus if we're not - // really losing it and the window which has just gained focus is the same - // one as this window itself. Of course, this should never happen in the - // first place but somehow it does in wxGrid code and without this check we - // enter into an infinite recursion, see #12267. + wxWidgetImpl* otherWindow = FindBestFromWXWidget(otherView); + + // It doesn't make sense to notify about the loss of focus if it's the same + // control in the end, and just a different subview if ( otherWindow == this ) return r; - + // NSTextViews have an editor as true responder, therefore the might get the // resign notification if their editor takes over, don't trigger any event then if ( r && !m_hasEditor) @@ -1276,11 +1460,14 @@ bool wxWidgetCocoaImpl::resignFirstResponder(WXWidget slf, void *_cmd) return r; } -bool wxWidgetCocoaImpl::isFlipped(WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd)) +#if !wxOSX_USE_NATIVE_FLIPPED + +bool wxWidgetCocoaImpl::isFlipped(WXWidget slf, void *WXUNUSED(_cmd)) { return m_isFlipped; } +#endif #define OSX_DEBUG_DRAWING 0 @@ -1289,15 +1476,20 @@ void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *WXUNUSED(_cmd)) // preparing the update region wxRegion updateRgn; + + // since adding many rects to a region is a costly process, by default use the bounding rect +#if 0 const NSRect *rects; NSInteger count; - [slf getRectsBeingDrawn:&rects count:&count]; for ( int i = 0 ; i < count ; ++i ) { updateRgn.Union(wxFromNSRect(slf, rects[i])); } - +#else + updateRgn.Union(wxFromNSRect(slf,*(NSRect*)rect)); +#endif + wxWindow* wxpeer = GetWXPeer(); if ( wxpeer->MacGetLeftBorderSize() != 0 || wxpeer->MacGetTopBorderSize() != 0 ) @@ -1352,7 +1544,7 @@ void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *WXUNUSED(_cmd)) CGContextStrokePath(context); #endif - if ( !m_isFlipped ) + if ( ![slf isFlipped] ) { CGContextTranslateCTM( context, 0, [m_osxView bounds].size.height ); CGContextScaleCTM( context, 1, -1 ); @@ -1374,7 +1566,7 @@ void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *WXUNUSED(_cmd)) CGContextSaveGState( context ); } // as we called restore above, we have to flip again if necessary - if ( !m_isFlipped ) + if ( ![slf isFlipped] ) { CGContextTranslateCTM( context, 0, [m_osxView bounds].size.height ); CGContextScaleCTM( context, 1, -1 ); @@ -1417,7 +1609,10 @@ void wxWidgetCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_c { wxWindow* wxpeer = (wxWindow*) GetWXPeer(); if ( wxpeer ) + { + wxpeer->OSXSimulateFocusEvents(); wxpeer->OSXHandleClicked(0); + } } void wxWidgetCocoaImpl::controlDoubleAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd), void *WXUNUSED(sender)) @@ -1499,7 +1694,9 @@ void wxOSXCocoaClassAddWXMethods(Class c) wxOSX_CLASS_ADD_METHOD(c, @selector(becomeFirstResponder), (IMP) wxOSX_becomeFirstResponder, "c@:" ) wxOSX_CLASS_ADD_METHOD(c, @selector(resignFirstResponder), (IMP) wxOSX_resignFirstResponder, "c@:" ) +#if !wxOSX_USE_NATIVE_FLIPPED wxOSX_CLASS_ADD_METHOD(c, @selector(isFlipped), (IMP) wxOSX_isFlipped, "c@:" ) +#endif wxOSX_CLASS_ADD_METHOD(c, @selector(drawRect:), (IMP) wxOSX_drawRect, "v@:{_NSRect={_NSPoint=ff}{_NSSize=ff}}" ) wxOSX_CLASS_ADD_METHOD(c, @selector(controlAction:), (IMP) wxOSX_controlAction, "v@:@" ) @@ -1557,7 +1754,9 @@ wxWidgetCocoaImpl::wxWidgetCocoaImpl() void wxWidgetCocoaImpl::Init() { m_osxView = NULL; +#if !wxOSX_USE_NATIVE_FLIPPED m_isFlipped = true; +#endif m_lastKeyDownEvent = NULL; m_hasEditor = false; } @@ -1587,6 +1786,17 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible ) [m_osxView setHidden:(visible ? NO:YES)]; } +double wxWidgetCocoaImpl::GetContentScaleFactor() const +{ +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 + NSWindow* tlw = [m_osxView window]; + if ( [ tlw respondsToSelector:@selector(backingScaleFactor) ] ) + return [tlw backingScaleFactor]; + else +#endif + return 1.0; +} + // ---------------------------------------------------------------------------- // window animation stuff // ---------------------------------------------------------------------------- @@ -1632,7 +1842,6 @@ void wxWidgetCocoaImpl::SetVisibility( bool visible ) wxUnusedVar(progress); m_win->SendSizeEvent(); - m_win->MacOnInternalSize(); } - (void)animationDidEnd:(NSAnimation*)animation @@ -1809,7 +2018,6 @@ wxWidgetCocoaImpl::ShowViewOrWindowWithEffect(wxWindow *win, // refresh it once again after the end to ensure that everything is in // place win->SendSizeEvent(); - win->MacOnInternalSize(); } [anim setDelegate:nil]; @@ -2072,6 +2280,27 @@ bool wxWidgetCocoaImpl::SetFocus() return true; } +void wxWidgetCocoaImpl::SetDropTarget(wxDropTarget* target) +{ + [m_osxView unregisterDraggedTypes]; + + if ( target == NULL ) + return; + + wxDataObject* dobj = target->GetDataObject(); + + if( dobj ) + { + CFMutableArrayRef typesarray = CFArrayCreateMutable(kCFAllocatorDefault,0,&kCFTypeArrayCallBacks); + dobj->AddSupportedTypes(typesarray); + NSView* targetView = m_osxView; + if ( [m_osxView isKindOfClass:[NSScrollView class] ] ) + targetView = [(NSScrollView*) m_osxView documentView]; + + [targetView registerForDraggedTypes:(NSArray*)typesarray]; + CFRelease(typesarray); + } +} void wxWidgetCocoaImpl::RemoveFromParent() { @@ -2083,6 +2312,9 @@ void wxWidgetCocoaImpl::Embed( wxWidgetImpl *parent ) NSView* container = parent->GetWXWidget() ; wxASSERT_MSG( container != NULL , wxT("No valid mac container control") ) ; [container addSubview:m_osxView]; + + if( m_wxPeer->IsFrozen() ) + [[m_osxView window] disableFlushWindow]; } void wxWidgetCocoaImpl::SetBackgroundColour( const wxColour &col ) @@ -2330,14 +2562,33 @@ void wxWidgetCocoaImpl::SetControlSize( wxWindowVariant variant ) if ([cell respondsToSelector:@selector(setControlSize:)]) [cell setControlSize:size]; } + + // we need to propagate this to inner views as well + if ( [m_osxView isKindOfClass:[NSScrollView class] ] ) + { + NSView* targetView = [(NSScrollView*) m_osxView documentView]; + + if ( [targetView respondsToSelector:@selector(setControlSize:)] ) + [targetView setControlSize:size]; + else if ([targetView respondsToSelector:@selector(cell)]) + { + id cell = [(id)targetView cell]; + if ([cell respondsToSelector:@selector(setControlSize:)]) + [cell setControlSize:size]; + } + } } void wxWidgetCocoaImpl::SetFont(wxFont const& font, wxColour const&col, long, bool) { - if ([m_osxView respondsToSelector:@selector(setFont:)]) - [m_osxView setFont: font.OSXGetNSFont()]; - if ([m_osxView respondsToSelector:@selector(setTextColor:)]) - [m_osxView setTextColor:[NSColor colorWithCalibratedRed:(CGFloat) (col.Red() / 255.0) + NSView* targetView = m_osxView; + if ( [m_osxView isKindOfClass:[NSScrollView class] ] ) + targetView = [(NSScrollView*) m_osxView documentView]; + + if ([targetView respondsToSelector:@selector(setFont:)]) + [targetView setFont: font.OSXGetNSFont()]; + if ([targetView respondsToSelector:@selector(setTextColor:)]) + [targetView setTextColor:[NSColor colorWithCalibratedRed:(CGFloat) (col.Red() / 255.0) green:(CGFloat) (col.Green() / 255.0) blue:(CGFloat) (col.Blue() / 255.0) alpha:(CGFloat) (col.Alpha() / 255.0)]]; @@ -2363,7 +2614,13 @@ void wxWidgetCocoaImpl::InstallEventHandler( WXWidget control ) if ([c respondsToSelector:@selector(setAction:)]) { [c setTarget: c]; - [c setAction: @selector(controlAction:)]; + if ( dynamic_cast(GetWXPeer()) ) + { + // everything already set up + } + else + [c setAction: @selector(controlAction:)]; + if ([c respondsToSelector:@selector(setDoubleAction:)]) { [c setDoubleAction: @selector(controlDoubleAction:)]; @@ -2371,17 +2628,25 @@ void wxWidgetCocoaImpl::InstallEventHandler( WXWidget control ) } NSTrackingAreaOptions options = NSTrackingMouseEnteredAndExited|NSTrackingCursorUpdate|NSTrackingMouseMoved|NSTrackingActiveAlways|NSTrackingInVisibleRect; - NSTrackingArea* area = [[NSTrackingArea alloc] initWithRect: NSZeroRect options: options owner: m_osxView userInfo: nil]; + NSTrackingArea* area = [[NSTrackingArea alloc] initWithRect: NSZeroRect options: options owner: m_osxView userInfo: nil]; [m_osxView addTrackingArea: area]; [area release]; } bool wxWidgetCocoaImpl::DoHandleCharEvent(NSEvent *event, NSString *text) { - wxKeyEvent wxevent(wxEVT_CHAR); - SetupKeyEvent( wxevent, event, text ); + bool result = false; + + for (NSUInteger i = 0; i < [text length]; ++i) + { + wxKeyEvent wxevent(wxEVT_CHAR); + unichar c = [text characterAtIndex:i]; + SetupKeyEvent( wxevent, event, [NSString stringWithCharacters:&c length:1]); - return GetWXPeer()->OSXHandleKeyEvent(wxevent); + result = GetWXPeer()->OSXHandleKeyEvent(wxevent) || result; + } + + return result; } bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event) @@ -2407,7 +2672,7 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event) if ( !result ) { - if ( IsUserPane() && [event type] == NSKeyDown) + if ( [event type] == NSKeyDown) { long keycode = wxOSXTranslateCocoaKey( event, wxEVT_CHAR ); @@ -2416,12 +2681,20 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event) // eventually we could setup a doCommandBySelector catcher and retransform this into the wx key chars wxKeyEvent wxevent2(wxevent) ; wxevent2.SetEventType(wxEVT_CHAR); + SetupKeyEvent( wxevent2, event ); wxevent2.m_keyCode = keycode; result = GetWXPeer()->OSXHandleKeyEvent(wxevent2); } + else if (wxevent.CmdDown()) + { + wxKeyEvent wxevent2(wxevent) ; + wxevent2.SetEventType(wxEVT_CHAR); + SetupKeyEvent( wxevent2, event ); + result = GetWXPeer()->OSXHandleKeyEvent(wxevent2); + } else { - if ( !wxevent.CmdDown() ) + if ( IsUserPane() && !wxevent.CmdDown() ) { if ( [m_osxView isKindOfClass:[NSScrollView class] ] ) [[(NSScrollView*)m_osxView documentView] interpretKeyEvents:[NSArray arrayWithObject:event]]; @@ -2440,7 +2713,11 @@ bool wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent *event) { wxMouseEvent wxevent(wxEVT_LEFT_DOWN); SetupMouseEvent(wxevent , event) ; - return GetWXPeer()->HandleWindowEvent(wxevent); + bool result = GetWXPeer()->HandleWindowEvent(wxevent); + + (void)SetupCursor(event); + + return result; } void wxWidgetCocoaImpl::DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow) @@ -2468,7 +2745,7 @@ void wxWidgetCocoaImpl::DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* oth event.SetWindow(otherWindow->GetWXPeer()); thisWindow->HandleWindowEvent(event) ; } - else // !receivedFocuss + else // !receivedFocus { #if wxUSE_CARET if ( thisWindow->GetCaret() ) @@ -2502,19 +2779,37 @@ void wxWidgetCocoaImpl::SetCursor(const wxCursor& cursor) void wxWidgetCocoaImpl::CaptureMouse() { - [[m_osxView window] disableCursorRects]; + // TODO remove if we don't get into problems with cursor settings + // [[m_osxView window] disableCursorRects]; } void wxWidgetCocoaImpl::ReleaseMouse() { - [[m_osxView window] enableCursorRects]; + // TODO remove if we don't get into problems with cursor settings + // [[m_osxView window] enableCursorRects]; } +#if !wxOSX_USE_NATIVE_FLIPPED + void wxWidgetCocoaImpl::SetFlipped(bool flipped) { m_isFlipped = flipped; } +#endif + +void wxWidgetCocoaImpl::SetDrawingEnabled(bool enabled) +{ + if ( enabled ) + { + [[m_osxView window] enableFlushWindow]; + [m_osxView setNeedsDisplay:YES]; + } + else + { + [[m_osxView window] disableFlushWindow]; + } +} // // Factory methods // @@ -2526,10 +2821,6 @@ wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WX NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSView* v = [[wxNSView alloc] initWithFrame:r]; - // temporary hook for dnd - [v registerForDraggedTypes:[NSArray arrayWithObjects: - NSStringPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]]; - wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v, false, true ); return c; } @@ -2543,11 +2834,13 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) { NSView* cv = [tlw contentView]; c = new wxWidgetCocoaImpl( now, cv, true ); - // increase ref count, because the impl destructor will decrement it again - CFRetain(cv); - if ( !now->IsShown() ) - [cv setHidden:NO]; - + if ( cv != nil ) + { + // increase ref count, because the impl destructor will decrement it again + CFRetain(cv); + if ( !now->IsShown() ) + [cv setHidden:NO]; + } } else { diff --git a/Externals/wxWidgets3/src/osx/combobox_osx.cpp b/Externals/wxWidgets3/src/osx/combobox_osx.cpp index abcae432bb..faf325a867 100644 --- a/Externals/wxWidgets3/src/osx/combobox_osx.cpp +++ b/Externals/wxWidgets3/src/osx/combobox_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: combobox_osx.cpp 69948 2011-12-07 23:41:06Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -131,11 +130,13 @@ unsigned int wxComboBox::GetCount() const void wxComboBox::DoDeleteOneItem(unsigned int n) { + m_datas.RemoveAt(n); GetComboPeer()->RemoveItem(n); } void wxComboBox::DoClear() { + m_datas.Clear(); GetComboPeer()->Clear(); } @@ -187,10 +188,21 @@ wxString wxComboBox::GetStringSelection() const return sel == wxNOT_FOUND ? wxString() : GetString(sel); } +void wxComboBox::SetValue(const wxString& value) +{ + if ( HasFlag(wxCB_READONLY) ) + SetStringSelection( value ) ; + else + wxTextEntry::SetValue( value ); +} + void wxComboBox::SetString(unsigned int n, const wxString& s) { - Delete(n); - Insert(s, n); + // Notice that we shouldn't delete and insert the item in this control + // itself as this would also affect the client data which we need to + // preserve here. + GetComboPeer()->RemoveItem(n); + GetComboPeer()->InsertItem(n, s); SetValue(s); // changing the item in the list won't update the display item } @@ -202,7 +214,7 @@ void wxComboBox::EnableTextChangedEvents(bool WXUNUSED(enable)) bool wxComboBox::OSXHandleClicked( double WXUNUSED(timestampsec) ) { - wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); + wxCommandEvent event(wxEVT_COMBOBOX, m_windowId ); event.SetInt(GetSelection()); event.SetEventObject(this); event.SetString(GetStringSelection()); diff --git a/Externals/wxWidgets3/src/osx/core/bitmap.cpp b/Externals/wxWidgets3/src/osx/core/bitmap.cpp index 3b7eaeadd8..8ee6127b11 100644 --- a/Externals/wxWidgets3/src/osx/core/bitmap.cpp +++ b/Externals/wxWidgets3/src/osx/core/bitmap.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: bitmap.cpp 70737 2012-02-28 16:30:58Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -25,6 +24,8 @@ #include "wx/rawbmp.h" +#include "wx/filename.h" + IMPLEMENT_DYNAMIC_CLASS(wxBitmap, wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxMask, wxObject) @@ -56,8 +57,10 @@ class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData friend class WXDLLIMPEXP_FWD_CORE wxIcon; friend class WXDLLIMPEXP_FWD_CORE wxCursor; public: + wxBitmapRefData(int width , int height , int depth, double logicalscale); wxBitmapRefData(int width , int height , int depth); - wxBitmapRefData(CGImageRef image); + wxBitmapRefData(CGContextRef context); + wxBitmapRefData(CGImageRef image, double scale); wxBitmapRefData(); wxBitmapRefData(const wxBitmapRefData &tocopy); @@ -75,7 +78,7 @@ public: int GetWidth() const { return m_width; } int GetHeight() const { return m_height; } int GetDepth() const { return m_depth; } - + double GetScaleFactor() const { return m_scaleFactor; } void *GetRawAccess() const; void *BeginRawAccess(); void EndRawAccess(); @@ -98,13 +101,10 @@ public: // rescaled to 16 x 16 bool HasNativeSize(); +#ifndef __WXOSX_IPHONE__ // caller should increase ref count if needed longer // than the bitmap exists IconRef GetIconRef(); - -#ifndef __WXOSX_IPHONE__ - // returns a Pict from the bitmap content - PicHandle GetPictHandle(); #endif CGContextRef GetBitmapContext() const; @@ -112,7 +112,9 @@ public: int GetBytesPerRow() const { return m_bytesPerRow; } private : bool Create(int width , int height , int depth); - bool Create( CGImageRef image ); + bool Create(int width , int height , int depth, double logicalScale); + bool Create( CGImageRef image, double scale ); + bool Create( CGContextRef bitmapcontext); void Init(); int m_width; @@ -125,11 +127,12 @@ public: bool m_ok; mutable CGImageRef m_cgImageRef; - IconRef m_iconRef; #ifndef __WXOSX_IPHONE__ - PicHandle m_pictHandle; + IconRef m_iconRef; #endif + CGContextRef m_hBitmap; + double m_scaleFactor; }; @@ -189,13 +192,6 @@ void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bi info->contentType = kControlContentCGImageRef ; info->u.imageRef = (CGImageRef) bmap->CreateCGImage() ; } - else - { -#ifndef __LP64__ - info->contentType = kControlContentPictHandle ; - info->u.picture = bmap->GetPictHandle() ; -#endif - } } } @@ -247,18 +243,18 @@ void wxBitmapRefData::Init() #ifndef __WXOSX_IPHONE__ m_iconRef = NULL ; - m_pictHandle = NULL ; #endif m_hBitmap = NULL ; m_rawAccessCount = 0 ; m_hasAlpha = false; + m_scaleFactor = 1.0; } wxBitmapRefData::wxBitmapRefData(const wxBitmapRefData &tocopy) : wxGDIRefData() { Init(); - Create(tocopy.m_width, tocopy.m_height, tocopy.m_depth); + Create(tocopy.m_width, tocopy.m_height, tocopy.m_depth, tocopy.m_scaleFactor); if (tocopy.m_bitmapMask) m_bitmapMask = new wxMask(*tocopy.m_bitmapMask); @@ -282,14 +278,26 @@ wxBitmapRefData::wxBitmapRefData( int w , int h , int d ) Create( w , h , d ) ; } -wxBitmapRefData::wxBitmapRefData(CGImageRef image) +wxBitmapRefData::wxBitmapRefData(int w , int h , int d, double logicalscale) +{ + Init() ; + Create( w , h , d, logicalscale ) ; +} + +wxBitmapRefData::wxBitmapRefData(CGContextRef context) { Init(); - Create( image ); + Create( context ); +} + +wxBitmapRefData::wxBitmapRefData(CGImageRef image, double scale) +{ + Init(); + Create( image, scale ); } // code from Technical Q&A QA1509 -bool wxBitmapRefData::Create(CGImageRef image) +bool wxBitmapRefData::Create(CGImageRef image, double scale) { if ( image != NULL ) { @@ -297,6 +305,7 @@ bool wxBitmapRefData::Create(CGImageRef image) m_height = CGImageGetHeight(image); m_depth = 32; m_hBitmap = NULL; + m_scaleFactor = scale; m_bytesPerRow = GetBestBytesPerRow( m_width * 4 ) ; size_t size = m_bytesPerRow * m_height ; @@ -306,7 +315,7 @@ bool wxBitmapRefData::Create(CGImageRef image) memset( data , 0 , size ) ; m_memBuf.UngetWriteBuf( size ) ; CGImageAlphaInfo alpha = CGImageGetAlphaInfo(image); - if ( alpha == kCGImageAlphaNone || alpha == kCGImageAlphaNoneSkipLast || alpha == kCGImageAlphaNoneSkipLast ) + if ( alpha == kCGImageAlphaNone || alpha == kCGImageAlphaNoneSkipFirst || alpha == kCGImageAlphaNoneSkipLast ) { m_hBitmap = CGBitmapContextCreate((char*) data, m_width, m_height, 8, m_bytesPerRow, wxMacGetGenericRGBColorSpace(), kCGImageAlphaNoneSkipFirst ); } @@ -315,12 +324,12 @@ bool wxBitmapRefData::Create(CGImageRef image) m_hasAlpha = true; m_hBitmap = CGBitmapContextCreate((char*) data, m_width, m_height, 8, m_bytesPerRow, wxMacGetGenericRGBColorSpace(), kCGImageAlphaPremultipliedFirst ); } - CGRect rect = {{0,0},{m_width,m_height}}; + CGRect rect = CGRectMake(0,0,m_width,m_height); CGContextDrawImage(m_hBitmap, rect, image); wxASSERT_MSG( m_hBitmap , wxT("Unable to create CGBitmapContext context") ) ; CGContextTranslateCTM( m_hBitmap, 0, m_height ); - CGContextScaleCTM( m_hBitmap, 1, -1 ); + CGContextScaleCTM( m_hBitmap, 1*m_scaleFactor, -1*m_scaleFactor ); } /* data != NULL */ } m_ok = ( m_hBitmap != NULL ) ; @@ -329,6 +338,41 @@ bool wxBitmapRefData::Create(CGImageRef image) } +bool wxBitmapRefData::Create(CGContextRef context) +{ + if ( context != NULL && CGBitmapContextGetData(context) ) + { + m_hBitmap = context; + m_bytesPerRow = CGBitmapContextGetBytesPerRow(context); + m_width = CGBitmapContextGetWidth(context); + m_height = CGBitmapContextGetHeight(context); + m_depth = CGBitmapContextGetBitsPerPixel(context) ; + + // our own contexts conform to this, always. + wxASSERT( m_depth == 32 ); + + // determine content scale + CGRect userrect = CGRectMake(0, 0, 10, 10); + CGRect devicerect; + devicerect = CGContextConvertRectToDeviceSpace(context, userrect); + m_scaleFactor = devicerect.size.height / userrect.size.height; + + CGImageAlphaInfo alpha = CGBitmapContextGetAlphaInfo(context); + + if ( alpha == kCGImageAlphaNone || alpha == kCGImageAlphaNoneSkipFirst || alpha == kCGImageAlphaNoneSkipLast ) + { + // no alpha + } + else + { + m_hasAlpha = true; + } + } + m_ok = ( m_hBitmap != NULL ) ; + + return m_ok ; +} + bool wxBitmapRefData::Create( int w , int h , int d ) { m_width = wxMax(1, w); @@ -347,13 +391,19 @@ bool wxBitmapRefData::Create( int w , int h , int d ) m_hBitmap = CGBitmapContextCreate((char*) data, m_width, m_height, 8, m_bytesPerRow, wxMacGetGenericRGBColorSpace(), kCGImageAlphaNoneSkipFirst ); wxASSERT_MSG( m_hBitmap , wxT("Unable to create CGBitmapContext context") ) ; CGContextTranslateCTM( m_hBitmap, 0, m_height ); - CGContextScaleCTM( m_hBitmap, 1, -1 ); + CGContextScaleCTM( m_hBitmap, 1*m_scaleFactor, -1*m_scaleFactor ); } /* data != NULL */ m_ok = ( m_hBitmap != NULL ) ; return m_ok ; } +bool wxBitmapRefData::Create( int w , int h , int d, double logicalScale ) +{ + m_scaleFactor = logicalScale; + return Create(w*logicalScale,h*logicalScale,d); +} + void wxBitmapRefData::UseAlpha( bool use ) { if ( m_hasAlpha == use ) @@ -365,7 +415,7 @@ void wxBitmapRefData::UseAlpha( bool use ) m_hBitmap = CGBitmapContextCreate((char*) m_memBuf.GetData(), m_width, m_height, 8, m_bytesPerRow, wxMacGetGenericRGBColorSpace(), m_hasAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNoneSkipFirst ); wxASSERT_MSG( m_hBitmap , wxT("Unable to create CGBitmapContext context") ) ; CGContextTranslateCTM( m_hBitmap, 0, m_height ); - CGContextScaleCTM( m_hBitmap, 1, -1 ); + CGContextScaleCTM( m_hBitmap, 1*m_scaleFactor, -1*m_scaleFactor ); } void *wxBitmapRefData::GetRawAccess() const @@ -379,8 +429,8 @@ void *wxBitmapRefData::BeginRawAccess() wxCHECK_MSG( IsOk(), NULL, wxT("invalid bitmap") ) ; wxASSERT( m_rawAccessCount == 0 ) ; #ifndef __WXOSX_IPHONE__ - wxASSERT_MSG( m_pictHandle == NULL && m_iconRef == NULL , - wxT("Currently, modifing bitmaps that are used in controls already is not supported") ) ; + wxASSERT_MSG( m_iconRef == NULL , + wxT("Currently, modifing bitmaps that are used in controls already is not supported") ) ; #endif ++m_rawAccessCount ; @@ -428,8 +478,39 @@ IconRef wxBitmapRefData::GetIconRef() OSType dataType = 0 ; OSType maskType = 0 ; + // since we don't have PICT conversion available, use + // the next larger standard icon size + // TODO: Use NSImage + if (sz <= 16) + sz = 16; + else if ( sz <= 32) + sz = 32; + else if ( sz <= 48) + sz = 48; + else if ( sz <= 128) + sz = 128; + else if ( sz <= 256) + sz = 256; + else if ( sz <= 512) + sz = 512; + else if ( sz <= 1024) + sz = 1024; + switch (sz) { +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 + case 1024: + dataType = kIconServices1024PixelDataARGB; + break; +#endif + case 512: + dataType = kIconServices512PixelDataARGB; + break; + + case 256: + dataType = kIconServices256PixelDataARGB; + break; + case 128: dataType = kIconServices128PixelDataARGB ; break; @@ -581,11 +662,6 @@ IconRef wxBitmapRefData::GetIconRef() DisposeHandle( maskdata ) ; } } - else - { - PicHandle pic = GetPictHandle() ; - SetIconFamilyData( iconFamily, 'PICT' , (Handle) pic ) ; - } // transform into IconRef // cleaner version existing from 10.3 upwards @@ -600,10 +676,6 @@ IconRef wxBitmapRefData::GetIconRef() return m_iconRef ; } -PicHandle wxBitmapRefData::GetPictHandle() -{ - return m_pictHandle ; -} #endif CGImageRef wxBitmapRefData::CreateCGImage() const @@ -743,13 +815,6 @@ void wxBitmapRefData::Free() ReleaseIconRef( m_iconRef ) ; m_iconRef = NULL ; } - -#ifndef __LP64__ - if ( m_pictHandle ) - { - m_pictHandle = NULL ; - } -#endif #endif if ( m_hBitmap ) { @@ -886,9 +951,9 @@ wxBitmap::wxBitmap(const char bits[], int the_width, int the_height, int no_bits { if ( no_bits == 1 ) { - int linesize = ( the_width / (sizeof(unsigned char) * 8)) ; - if ( the_width % (sizeof(unsigned char) * 8) ) - linesize += sizeof(unsigned char); + int linesize = the_width / 8; + if ( the_width % 8 ) + linesize++; unsigned char* linestart = (unsigned char*) bits ; unsigned char* destptr = (unsigned char*) BeginRawAccess() ; @@ -935,14 +1000,19 @@ wxBitmap::wxBitmap(const void* data, wxBitmapType type, int width, int height, i (void) Create(data, type, width, height, depth); } +wxBitmap::wxBitmap(int width, int height, const wxDC& dc) +{ + (void)Create(width, height, dc); +} + wxBitmap::wxBitmap(const wxString& filename, wxBitmapType type) { LoadFile(filename, type); } -wxBitmap::wxBitmap(CGImageRef image) +wxBitmap::wxBitmap(CGImageRef image, double scale) { - (void) Create(image); + (void) Create(image,scale); } wxGDIRefData* wxBitmap::CreateGDIRefData() const @@ -1001,10 +1071,34 @@ IconRef wxBitmap::CreateIconRef() const #if wxOSX_USE_COCOA +wxBitmap::wxBitmap(WX_NSImage image) +{ + (void)Create(image); +} + +bool wxBitmap::Create(WX_NSImage image) +{ + return Create(wxOSXCreateBitmapContextFromNSImage(image)); +} + +wxBitmap::wxBitmap(CGContextRef bitmapcontext) +{ + (void)Create(bitmapcontext); +} + +bool wxBitmap::Create(CGContextRef bitmapcontext) +{ + UnRef(); + + m_refData = new wxBitmapRefData( bitmapcontext ); + + return M_BITMAPDATA->IsOk() ; +} + WX_NSImage wxBitmap::GetNSImage() const { wxCFRef< CGImageRef > cgimage(CreateCGImage()); - return wxOSXGetNSImageFromCGImage( cgimage ); + return wxOSXGetNSImageFromCGImage( cgimage, GetScaleFactor() ); } #endif @@ -1026,29 +1120,34 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect &rect) const (rect.y+rect.height <= GetHeight()), wxNullBitmap, wxT("invalid bitmap or bitmap region") ); - wxBitmap ret( rect.width, rect.height, GetDepth() ); + wxBitmap ret; + double scale = GetScaleFactor(); + ret.CreateScaled( rect.width, rect.height, GetDepth(), scale ); wxASSERT_MSG( ret.IsOk(), wxT("GetSubBitmap error") ); - int destwidth = rect.width ; - int destheight = rect.height ; + int destwidth = rect.width*scale ; + int destheight = rect.height*scale ; { unsigned char *sourcedata = (unsigned char*) GetRawAccess() ; unsigned char *destdata = (unsigned char*) ret.BeginRawAccess() ; - wxASSERT( (sourcedata != NULL) && (destdata != NULL) ) ; + wxASSERT((sourcedata != NULL) && (destdata != NULL)); - int sourcelinesize = GetBitmapData()->GetBytesPerRow() ; - int destlinesize = ret.GetBitmapData()->GetBytesPerRow() ; - unsigned char *source = sourcedata + rect.x * 4 + rect.y * sourcelinesize ; - unsigned char *dest = destdata ; - - for (int yy = 0; yy < destheight; ++yy, source += sourcelinesize , dest += destlinesize) + if ( (sourcedata != NULL) && (destdata != NULL) ) { - memcpy( dest , source , destlinesize ) ; + int sourcelinesize = GetBitmapData()->GetBytesPerRow() ; + int destlinesize = ret.GetBitmapData()->GetBytesPerRow() ; + unsigned char *source = sourcedata + int(rect.x * scale * 4 + rect.y *scale * sourcelinesize) ; + unsigned char *dest = destdata ; + + for (int yy = 0; yy < destheight; ++yy, source += sourcelinesize , dest += destlinesize) + { + memcpy( dest , source , destlinesize ) ; + } } + ret.EndRawAccess() ; } - ret.EndRawAccess() ; if ( M_BITMAPDATA->m_bitmapMask ) { @@ -1063,15 +1162,18 @@ wxBitmap wxBitmap::GetSubBitmap(const wxRect &rect) const unsigned char *destdata = (unsigned char * ) maskbuf.GetWriteBuf( maskbufsize ) ; wxASSERT( (source != NULL) && (destdata != NULL) ) ; - source += rect.x * kMaskBytesPerPixel + rect.y * sourcelinesize ; - unsigned char *dest = destdata ; - - for (int yy = 0; yy < destheight; ++yy, source += sourcelinesize , dest += destlinesize) + if ( (source != NULL) && (destdata != NULL) ) { - memcpy( dest , source , destlinesize ) ; - } + source += rect.x * kMaskBytesPerPixel + rect.y * sourcelinesize ; + unsigned char *dest = destdata ; - maskbuf.UngetWriteBuf( maskbufsize ) ; + for (int yy = 0; yy < destheight; ++yy, source += sourcelinesize , dest += destlinesize) + { + memcpy( dest , source , destlinesize ) ; + } + + maskbuf.UngetWriteBuf( maskbufsize ) ; + } ret.SetMask( new wxMask( maskbuf , destwidth , destheight , rowBytes ) ) ; } else if ( HasAlpha() ) @@ -1092,12 +1194,29 @@ bool wxBitmap::Create(int w, int h, int d) return M_BITMAPDATA->IsOk() ; } +bool wxBitmap::Create(int w, int h, const wxDC& dc) +{ + double factor = dc.GetContentScaleFactor(); + return CreateScaled(w,h,wxBITMAP_SCREEN_DEPTH, factor); +} -bool wxBitmap::Create(CGImageRef image) +bool wxBitmap::CreateScaled(int w, int h, int d, double logicalScale) { UnRef(); - m_refData = new wxBitmapRefData( image ); + if ( d < 0 ) + d = wxDisplayDepth() ; + + m_refData = new wxBitmapRefData( w , h , d, logicalScale ); + + return M_BITMAPDATA->IsOk() ; +} + +bool wxBitmap::Create(CGImageRef image, double scale) +{ + UnRef(); + + m_refData = new wxBitmapRefData( image, scale ); return M_BITMAPDATA->IsOk() ; } @@ -1117,10 +1236,29 @@ bool wxBitmap::LoadFile(const wxString& filename, wxBitmapType type) else { #if wxUSE_IMAGE - wxImage loadimage(filename, type); + double scale = 1.0; + wxString fname = filename; + + if ( type == wxBITMAP_TYPE_PNG ) + { + if ( wxOSXGetMainScreenContentScaleFactor() > 1.9 ) + { + wxFileName fn(filename); + fn.MakeAbsolute(); + fn.SetName(fn.GetName()+"@2x"); + + if ( fn.Exists() ) + { + fname = fn.GetFullPath(); + scale = 2.0; + } + } + } + + wxImage loadimage(fname, type); if (loadimage.IsOk()) { - *this = loadimage; + *this = wxBitmap(loadimage,-1,scale); return true; } @@ -1152,7 +1290,7 @@ bool wxBitmap::Create(const void* data, wxBitmapType type, int width, int height #if wxUSE_IMAGE -wxBitmap::wxBitmap(const wxImage& image, int depth) +wxBitmap::wxBitmap(const wxImage& image, int depth, double scale) { wxCHECK_RET( image.IsOk(), wxT("invalid image") ); @@ -1162,7 +1300,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth) wxBitmapRefData* bitmapRefData; - m_refData = bitmapRefData = new wxBitmapRefData( width , height , depth ) ; + m_refData = bitmapRefData = new wxBitmapRefData( width/scale, height/scale, depth, scale) ; if ( bitmapRefData->IsOk()) { @@ -1372,6 +1510,13 @@ int wxBitmap::GetWidth() const return M_BITMAPDATA->GetWidth() ; } +double wxBitmap::GetScaleFactor() const +{ + wxCHECK_MSG( IsOk(), -1, wxT("invalid bitmap") ); + + return M_BITMAPDATA->GetScaleFactor() ; +} + int wxBitmap::GetDepth() const { wxCHECK_MSG( IsOk(), -1, wxT("invalid bitmap") ); @@ -1607,37 +1752,60 @@ bool wxMask::Create(const wxBitmap& bitmap, const wxColour& colour) size_t size = m_bytesPerRow * m_height ; unsigned char * destdatabase = (unsigned char*) m_memBuf.GetWriteBuf( size ) ; wxASSERT( destdatabase != NULL ) ; - - memset( destdatabase , 0 , size ) ; - unsigned char * srcdatabase = (unsigned char*) bitmap.GetRawAccess() ; - size_t sourceBytesRow = bitmap.GetBitmapData()->GetBytesPerRow(); - - for ( int y = 0 ; y < m_height ; ++y , srcdatabase+= sourceBytesRow, destdatabase += m_bytesPerRow) + if ( destdatabase != NULL) { - unsigned char *srcdata = srcdatabase ; - unsigned char *destdata = destdatabase ; - unsigned char r, g, b; + memset( destdatabase , 0 , size ) ; + unsigned char * srcdatabase = (unsigned char*) bitmap.GetRawAccess() ; + size_t sourceBytesRow = bitmap.GetBitmapData()->GetBytesPerRow(); - for ( int x = 0 ; x < m_width ; ++x ) + for ( int y = 0 ; y < m_height ; ++y , srcdatabase+= sourceBytesRow, destdatabase += m_bytesPerRow) { - srcdata++ ; - r = *srcdata++ ; - g = *srcdata++ ; - b = *srcdata++ ; + unsigned char *srcdata = srcdatabase ; + unsigned char *destdata = destdatabase ; + unsigned char r, g, b; - if ( colour == wxColour( r , g , b ) ) - *destdata++ = 0xFF ; - else - *destdata++ = 0x00 ; + for ( int x = 0 ; x < m_width ; ++x ) + { + srcdata++ ; + r = *srcdata++ ; + g = *srcdata++ ; + b = *srcdata++ ; + + if ( colour == wxColour( r , g , b ) ) + *destdata++ = 0xFF ; + else + *destdata++ = 0x00 ; + } } } - m_memBuf.UngetWriteBuf( size ) ; RealizeNative() ; return true; } +wxBitmap wxMask::GetBitmap() const +{ + wxBitmap bitmap(m_width, m_height, 1); + unsigned char* dst = static_cast(bitmap.BeginRawAccess()); + const int dst_stride = bitmap.GetBitmapData()->GetBytesPerRow(); + const unsigned char* src = static_cast(GetRawAccess()); + for (int j = 0; j < m_height; j++, src += m_bytesPerRow, dst += dst_stride) + { + unsigned char* d = dst; + for (int i = 0; i < m_width; i++) + { + const unsigned char byte = src[i]; + *d++ = 0xff; + *d++ = byte; + *d++ = byte; + *d++ = byte; + } + } + bitmap.EndRawAccess(); + return bitmap; +} + WXHBITMAP wxMask::GetHBITMAP() const { return m_maskBitmap ; @@ -1682,7 +1850,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNGResourceHandler, wxBundleResourceHandler) class WXDLLEXPORT wxJPEGResourceHandler: public wxBundleResourceHandler { - DECLARE_DYNAMIC_CLASS(wxPNGResourceHandler) + DECLARE_DYNAMIC_CLASS(wxJPEGResourceHandler) public: inline wxJPEGResourceHandler() @@ -1703,9 +1871,23 @@ bool wxBundleResourceHandler::LoadFile(wxBitmap *bitmap, { wxString ext = GetExtension().Lower(); wxCFStringRef resname(name); + wxCFStringRef resname2x(name+"@2x"); wxCFStringRef restype(ext); + double scale = 1.0; - wxCFRef imageURL(CFBundleCopyResourceURL(CFBundleGetMainBundle(), resname, restype, NULL)); + wxCFRef imageURL; + + if ( wxOSXGetMainScreenContentScaleFactor() > 1.9 ) + { + imageURL.reset(CFBundleCopyResourceURL(CFBundleGetMainBundle(), resname2x, restype, NULL)); + scale = 2.0; + } + + if ( imageURL.get() == NULL ) + { + imageURL.reset(CFBundleCopyResourceURL(CFBundleGetMainBundle(), resname, restype, NULL)); + scale = 1.0; + } if ( imageURL.get() != NULL ) { @@ -1721,7 +1903,7 @@ bool wxBundleResourceHandler::LoadFile(wxBitmap *bitmap, kCGRenderingIntentDefault); if ( image != NULL ) { - bitmap->Create(image); + bitmap->Create(image,scale); CGImageRelease(image); } } @@ -1729,6 +1911,18 @@ bool wxBundleResourceHandler::LoadFile(wxBitmap *bitmap, return false ; } +/* static */ +wxBitmap wxBitmapHelpers::NewFromPNGData(const void* data, size_t size) +{ + wxCFRef + provider(CGDataProviderCreateWithData(NULL, data, size, NULL) ); + wxCFRef + image(CGImageCreateWithPNGDataProvider(provider, NULL, true, + kCGRenderingIntentDefault)); + + return wxBitmap(image); +} + void wxBitmap::InitStandardHandlers() { #if wxOSX_USE_COCOA_OR_CARBON diff --git a/Externals/wxWidgets3/src/osx/core/cfstring.cpp b/Externals/wxWidgets3/src/osx/core/cfstring.cpp index c2d08701b0..384bf88e72 100644 --- a/Externals/wxWidgets3/src/osx/core/cfstring.cpp +++ b/Externals/wxWidgets3/src/osx/core/cfstring.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2004-10-29 (from code in src/osx/carbon/utils.cpp) -// RCS-ID: $Id: cfstring.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence // Usage: Darwin (base library) @@ -632,6 +631,18 @@ wxCFStringRef::wxCFStringRef( const wxString &st , wxFontEncoding WXUNUSED_IN_UN } } +wxString wxCFStringRef::AsStringWithNormalizationFormC( CFStringRef ref, wxFontEncoding encoding ) +{ + if ( !ref ) + return wxEmptyString ; + + CFMutableStringRef cfMutableString = CFStringCreateMutableCopy(NULL, 0, ref); + CFStringNormalize(cfMutableString,kCFStringNormalizationFormC); + wxString str = wxCFStringRef::AsString(ref,encoding); + CFRelease(cfMutableString); + return str; +} + wxString wxCFStringRef::AsString( CFStringRef ref, wxFontEncoding WXUNUSED_IN_UNICODE(encoding) ) { if ( !ref ) @@ -687,7 +698,12 @@ wxString wxCFStringRef::AsString( NSString* ref, wxFontEncoding encoding ) { return AsString( (CFStringRef) ref, encoding ); } -#endif + +wxString wxCFStringRef::AsStringWithNormalizationFormC( NSString* ref, wxFontEncoding encoding ) +{ + return AsStringWithNormalizationFormC( (CFStringRef) ref, encoding ); +} +#endif // wxOSX_USE_COCOA_OR_IPHONE // diff --git a/Externals/wxWidgets3/src/osx/core/colour.cpp b/Externals/wxWidgets3/src/osx/core/colour.cpp index 75388b74a1..e39d215cdc 100644 --- a/Externals/wxWidgets3/src/osx/core/colour.cpp +++ b/Externals/wxWidgets3/src/osx/core/colour.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: colour.cpp 70400 2012-01-19 14:06:36Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -70,7 +69,7 @@ void wxColour::InitRGBA (ChannelType r, ChannelType g, ChannelType b, ChannelTyp m_alpha = a ; CGColorRef col = 0 ; -#if wxOSX_USE_COCOA_OR_CARBON && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if wxOSX_USE_COCOA_OR_CARBON if ( CGColorCreateGenericRGB != NULL ) col = CGColorCreateGenericRGB( (CGFloat)(r / 255.0), (CGFloat) (g / 255.0), (CGFloat) (b / 255.0), (CGFloat) (a / 255.0) ); else @@ -91,17 +90,8 @@ void wxColour::InitRGBColor( const RGBColor& col ) m_green = col.green >> 8; m_alpha = wxALPHA_OPAQUE; CGColorRef cfcol; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 - if ( CGColorCreateGenericRGB != NULL ) - cfcol = CGColorCreateGenericRGB((CGFloat)(col.red / 65535.0), (CGFloat)(col.green / 65535.0), + cfcol = CGColorCreateGenericRGB((CGFloat)(col.red / 65535.0), (CGFloat)(col.green / 65535.0), (CGFloat)(col.blue / 65535.0), (CGFloat) 1.0 ); - else -#endif - { - CGFloat components[4] = { (CGFloat)(col.red / 65535.0), (CGFloat)(col.green / 65535.0), - (CGFloat)(col.blue / 65535.0), (CGFloat) 1.0 } ; - cfcol = CGColorCreate( wxMacGetGenericRGBColorSpace() , components ) ; - } wxASSERT_MSG(cfcol != NULL, "Invalid CoreGraphics Color"); m_cgColour.reset( cfcol ); } diff --git a/Externals/wxWidgets3/src/osx/core/dcmemory.cpp b/Externals/wxWidgets3/src/osx/core/dcmemory.cpp index 7143745124..a7a47d6213 100644 --- a/Externals/wxWidgets3/src/osx/core/dcmemory.cpp +++ b/Externals/wxWidgets3/src/osx/core/dcmemory.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 01/02/97 -// RCS-ID: $Id: dcmemory.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -76,8 +75,9 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) if ( m_selected.GetDepth() != 1 ) m_selected.UseAlpha() ; m_selected.BeginRawAccess() ; - m_width = bitmap.GetWidth(); - m_height = bitmap.GetHeight(); + m_width = bitmap.GetScaledWidth(); + m_height = bitmap.GetScaledHeight(); + m_contentScaleFactor = bitmap.GetScaleFactor(); CGColorSpaceRef genericColorSpace = wxMacGetGenericRGBColorSpace(); CGContextRef bmCtx = (CGContextRef) m_selected.GetHBITMAP(); @@ -100,9 +100,9 @@ void wxMemoryDCImpl::DoGetSize( int *width, int *height ) const if (m_selected.IsOk()) { if (width) - (*width) = m_selected.GetWidth(); + (*width) = m_selected.GetScaledWidth(); if (height) - (*height) = m_selected.GetHeight(); + (*height) = m_selected.GetScaledHeight(); } else { diff --git a/Externals/wxWidgets3/src/osx/core/display.cpp b/Externals/wxWidgets3/src/osx/core/display.cpp index 06764a2f27..b1961bc92e 100644 --- a/Externals/wxWidgets3/src/osx/core/display.cpp +++ b/Externals/wxWidgets3/src/osx/core/display.cpp @@ -4,7 +4,6 @@ // Author: Ryan Norton & Brian Victor // Modified by: Royce Mitchell III, Vadim Zeitlin // Created: 06/21/02 -// RCS-ID: $Id: display.cpp 66843 2011-02-05 16:36:18Z VZ $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/core/evtloop_cf.cpp b/Externals/wxWidgets3/src/osx/core/evtloop_cf.cpp index 93f835078a..e3e0752f04 100644 --- a/Externals/wxWidgets3/src/osx/core/evtloop_cf.cpp +++ b/Externals/wxWidgets3/src/osx/core/evtloop_cf.cpp @@ -3,8 +3,8 @@ // Purpose: wxEventLoop implementation common to both Carbon and Cocoa // Author: Vadim Zeitlin // Created: 2009-10-18 -// RCS-ID: $Id: evtloop_cf.cpp 70504 2012-02-03 17:27:17Z VZ $ // Copyright: (c) 2009 Vadim Zeitlin +// (c) 2013 Rob Bresalier // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -25,8 +25,6 @@ #include "wx/evtloop.h" -#if wxUSE_EVENTLOOP_SOURCE - #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/app.h" @@ -44,110 +42,30 @@ #include "wx/nonownedwnd.h" #endif +#include + // ============================================================================ // wxCFEventLoopSource and wxCFEventLoop implementation // ============================================================================ -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -namespace +#if wxUSE_EVENTLOOP_SOURCE + +void wxCFEventLoopSource::InitSourceSocket(CFSocketRef cfSocket) { + wxASSERT_MSG( !m_cfSocket, "shouldn't be called more than once" ); -void EnableDescriptorCallBacks(CFFileDescriptorRef cffd, int flags) -{ - if ( flags & wxEVENT_SOURCE_INPUT ) - CFFileDescriptorEnableCallBacks(cffd, kCFFileDescriptorReadCallBack); - if ( flags & wxEVENT_SOURCE_OUTPUT ) - CFFileDescriptorEnableCallBacks(cffd, kCFFileDescriptorWriteCallBack); -} - -void -wx_cffiledescriptor_callback(CFFileDescriptorRef cffd, - CFOptionFlags flags, - void *ctxData) -{ - wxLogTrace(wxTRACE_EVT_SOURCE, - "CFFileDescriptor callback, flags=%d", flags); - - wxCFEventLoopSource * const - source = static_cast(ctxData); - - wxEventLoopSourceHandler * const - handler = source->GetHandler(); - if ( flags & kCFFileDescriptorReadCallBack ) - handler->OnReadWaiting(); - if ( flags & kCFFileDescriptorWriteCallBack ) - handler->OnWriteWaiting(); - - // we need to re-enable callbacks to be called again - EnableDescriptorCallBacks(cffd, source->GetFlags()); -} - -} // anonymous namespace - -wxEventLoopSource * -wxCFEventLoop::AddSourceForFD(int fd, - wxEventLoopSourceHandler *handler, - int flags) -{ - wxCHECK_MSG( fd != -1, NULL, "can't monitor invalid fd" ); - - wxScopedPtr - source(new wxCFEventLoopSource(handler, flags)); - - CFFileDescriptorContext ctx = { 0, source.get(), NULL, NULL, NULL }; - wxCFRef - cffd(CFFileDescriptorCreate - ( - kCFAllocatorDefault, - fd, - true, // close on invalidate - wx_cffiledescriptor_callback, - &ctx - )); - if ( !cffd ) - return NULL; - - wxCFRef - cfsrc(CFFileDescriptorCreateRunLoopSource(kCFAllocatorDefault, cffd, 0)); - if ( !cfsrc ) - return NULL; - - CFRunLoopRef cfloop = CFGetCurrentRunLoop(); - CFRunLoopAddSource(cfloop, cfsrc, kCFRunLoopDefaultMode); - - // Enable the callbacks initially. - EnableDescriptorCallBacks(cffd, source->GetFlags()); - - source->SetFileDescriptor(cffd.release()); - - return source.release(); -} - -void wxCFEventLoopSource::SetFileDescriptor(CFFileDescriptorRef cffd) -{ - wxASSERT_MSG( !m_cffd, "shouldn't be called more than once" ); - - m_cffd = cffd; + m_cfSocket = cfSocket; } wxCFEventLoopSource::~wxCFEventLoopSource() { - if ( m_cffd ) - CFRelease(m_cffd); + if ( m_cfSocket ) + { + CFSocketInvalidate(m_cfSocket); + CFRelease(m_cfSocket); + } } -#else // OS X < 10.5 - -wxEventLoopSource * -wxCFEventLoop::AddSourceForFD(int WXUNUSED(fd), - wxEventLoopSourceHandler * WXUNUSED(handler), - int WXUNUSED(flags)) -{ - return NULL; -} - -#endif // MAC_OS_X_VERSION_MAX_ALLOWED - #endif // wxUSE_EVENTLOOP_SOURCE void wxCFEventLoop::OSXCommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity, void *info) @@ -176,13 +94,13 @@ void wxCFEventLoop::CommonModeObserverCallBack(CFRunLoopObserverRef WXUNUSED(obs // and this input is only removed from it when pending event handlers are // executed) - if ( wxTheApp ) + if ( wxTheApp && ShouldProcessIdleEvents() ) wxTheApp->ProcessPendingEvents(); } if ( activity & kCFRunLoopBeforeWaiting ) { - if ( ProcessIdle() ) + if ( ShouldProcessIdleEvents() && ProcessIdle() ) { WakeUp(); } @@ -214,7 +132,12 @@ wxCFEventLoop::DefaultModeObserverCallBack(CFRunLoopObserverRef WXUNUSED(observe wxCFEventLoop::wxCFEventLoop() { m_shouldExit = false; + m_processIdleEvents = true; +#if wxUSE_UIACTIONSIMULATOR + m_shouldWaitForEvent = false; +#endif + m_runLoop = CFGetCurrentRunLoop(); CFRunLoopObserverContext ctxt; @@ -223,18 +146,19 @@ wxCFEventLoop::wxCFEventLoop() m_commonModeRunLoopObserver = CFRunLoopObserverCreate( kCFAllocatorDefault, kCFRunLoopBeforeTimers | kCFRunLoopBeforeWaiting , true /* repeats */, 0, (CFRunLoopObserverCallBack) wxCFEventLoop::OSXCommonModeObserverCallBack, &ctxt ); CFRunLoopAddObserver(m_runLoop, m_commonModeRunLoopObserver, kCFRunLoopCommonModes); - CFRelease(m_commonModeRunLoopObserver); m_defaultModeRunLoopObserver = CFRunLoopObserverCreate( kCFAllocatorDefault, kCFRunLoopBeforeTimers | kCFRunLoopBeforeWaiting , true /* repeats */, 0, (CFRunLoopObserverCallBack) wxCFEventLoop::OSXDefaultModeObserverCallBack, &ctxt ); CFRunLoopAddObserver(m_runLoop, m_defaultModeRunLoopObserver, kCFRunLoopDefaultMode); - CFRelease(m_defaultModeRunLoopObserver); } wxCFEventLoop::~wxCFEventLoop() { CFRunLoopRemoveObserver(m_runLoop, m_commonModeRunLoopObserver, kCFRunLoopCommonModes); CFRunLoopRemoveObserver(m_runLoop, m_defaultModeRunLoopObserver, kCFRunLoopDefaultMode); + + CFRelease(m_defaultModeRunLoopObserver); + CFRelease(m_commonModeRunLoopObserver); } @@ -309,7 +233,17 @@ bool wxCFEventLoop::Pending() const int wxCFEventLoop::DoProcessEvents() { - return DispatchTimeout( 0 ); +#if wxUSE_UIACTIONSIMULATOR + if ( m_shouldWaitForEvent ) + { + int handled = DispatchTimeout( 1000 ); + wxASSERT_MSG( handled == 1, "No Event Available"); + m_shouldWaitForEvent = false; + return handled; + } + else +#endif + return DispatchTimeout( 0 ); } bool wxCFEventLoop::Dispatch() @@ -361,7 +295,7 @@ int wxCFEventLoop::DoDispatchTimeout(unsigned long timeout) return 1; } -void wxCFEventLoop::DoRun() +void wxCFEventLoop::OSXDoRun() { for ( ;; ) { @@ -382,23 +316,15 @@ void wxCFEventLoop::DoRun() } } -void wxCFEventLoop::DoStop() +void wxCFEventLoop::OSXDoStop() { CFRunLoopStop(CFGetCurrentRunLoop()); } // enters a loop calling OnNextIteration(), Pending() and Dispatch() and // terminating when Exit() is called -int wxCFEventLoop::Run() +int wxCFEventLoop::DoRun() { - // event loops are not recursive, you need to create another loop! - wxCHECK_MSG( !IsRunning(), -1, wxT("can't reenter a message loop") ); - - // ProcessIdle() and ProcessEvents() below may throw so the code here should - // be exception-safe, hence we must use local objects for all actions we - // should undo - wxEventLoopActivator activate(this); - // we must ensure that OnExit() is called even if an exception is thrown // from inside ProcessEvents() but we must call it from Exit() in normal // situations because it is supposed to be called synchronously, @@ -411,7 +337,7 @@ int wxCFEventLoop::Run() { #endif // wxUSE_EXCEPTIONS - DoRun(); + OSXDoRun(); #if wxUSE_EXCEPTIONS // exit the outer loop as well @@ -445,11 +371,30 @@ int wxCFEventLoop::Run() // sets the "should exit" flag and wakes up the loop so that it terminates // soon -void wxCFEventLoop::Exit(int rc) +void wxCFEventLoop::ScheduleExit(int rc) { m_exitcode = rc; m_shouldExit = true; - DoStop(); + OSXDoStop(); +} + +wxCFEventLoopPauseIdleEvents::wxCFEventLoopPauseIdleEvents() +{ + wxCFEventLoop* cfl = dynamic_cast(wxEventLoopBase::GetActive()); + if ( cfl ) + { + m_formerState = cfl->ShouldProcessIdleEvents(); + cfl->SetProcessIdleEvents(false); + } + else + m_formerState = true; +} + +wxCFEventLoopPauseIdleEvents::~wxCFEventLoopPauseIdleEvents() +{ + wxCFEventLoop* cfl = dynamic_cast(wxEventLoopBase::GetActive()); + if ( cfl ) + cfl->SetProcessIdleEvents(m_formerState); } // TODO Move to thread_osx.cpp diff --git a/Externals/wxWidgets3/src/osx/core/fontenum.cpp b/Externals/wxWidgets3/src/osx/core/fontenum.cpp index fb4ed5640b..658701bc82 100644 --- a/Externals/wxWidgets3/src/osx/core/fontenum.cpp +++ b/Externals/wxWidgets3/src/osx/core/fontenum.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: fontenum.cpp 70712 2012-02-27 15:41:35Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -31,66 +30,104 @@ // wxFontEnumerator // ---------------------------------------------------------------------------- +#if wxOSX_USE_IPHONE +extern CFArrayRef CopyAvailableFontFamilyNames(); +#endif + bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, bool fixedWidthOnly) { - if ( fixedWidthOnly ) - { - wxFAIL_MSG( "enumerating only fixed width fonts not supported" ); - return false; - } - - wxArrayString fontFamilies ; - -#if wxOSX_USE_ATSU_TEXT || wxOSX_USE_CORE_TEXT - - // - // From Apple's QA 1471 http://developer.apple.com/qa/qa2006/qa1471.html - // - - ATSFontFamilyIterator theFontFamilyIterator = NULL; - ATSFontFamilyRef theATSFontFamilyRef = 0; - OSStatus status = noErr; - - // Create the iterator - status = ATSFontFamilyIteratorCreate(kATSFontContextLocal, nil,nil, - kATSOptionFlagsUnRestrictedScope, - &theFontFamilyIterator ); + wxArrayString fontFamilies ; wxUint32 macEncoding = wxMacGetSystemEncFromFontEnc(encoding) ; - - while (status == noErr) + +#if wxOSX_USE_CORE_TEXT { - // Get the next font in the iteration. - status = ATSFontFamilyIteratorNext( theFontFamilyIterator, &theATSFontFamilyRef ); - if(status == noErr) + CFArrayRef cfFontFamilies = nil; + +#if wxOSX_USE_COCOA_OR_CARBON +#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6) + if ( UMAGetSystemVersion() >= 0x1060 ) + cfFontFamilies = CTFontManagerCopyAvailableFontFamilyNames(); + else +#endif { - if ( encoding != wxFONTENCODING_SYSTEM ) +#if (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6) + // + // From Apple's QA 1471 http://developer.apple.com/qa/qa2006/qa1471.html + // + + CFMutableArrayRef atsfontnames = CFArrayCreateMutable(kCFAllocatorDefault,0,&kCFTypeArrayCallBacks);; + + ATSFontFamilyIterator theFontFamilyIterator = NULL; + ATSFontFamilyRef theATSFontFamilyRef = 0; + OSStatus status = noErr; + + // Create the iterator + status = ATSFontFamilyIteratorCreate(kATSFontContextLocal, nil,nil, + kATSOptionFlagsUnRestrictedScope, + &theFontFamilyIterator ); + + while (status == noErr) { - TextEncoding fontFamiliyEncoding = ATSFontFamilyGetEncoding(theATSFontFamilyRef) ; - if ( fontFamiliyEncoding != macEncoding ) - continue ; + // Get the next font in the iteration. + status = ATSFontFamilyIteratorNext( theFontFamilyIterator, &theATSFontFamilyRef ); + if(status == noErr) + { + CFStringRef theName = NULL; + ATSFontFamilyGetName(theATSFontFamilyRef, kATSOptionFlagsDefault, &theName); + CFArrayAppendValue(atsfontnames, theName); + CFRelease(theName); + + } + else if (status == kATSIterationScopeModified) // Make sure the font database hasn't changed. + { + // reset the iterator + status = ATSFontFamilyIteratorReset (kATSFontContextLocal, nil, nil, + kATSOptionFlagsUnRestrictedScope, + &theFontFamilyIterator); + CFArrayRemoveAllValues(atsfontnames); + } } + ATSFontFamilyIteratorRelease(&theFontFamilyIterator); + cfFontFamilies = atsfontnames; +#endif + } +#elif wxOSX_USE_IPHONE + cfFontFamilies = CopyAvailableFontFamilyNames(); +#endif + + CFIndex count = CFArrayGetCount(cfFontFamilies); + for(CFIndex i = 0; i < count; i++) + { + CFStringRef fontName = (CFStringRef)CFArrayGetValueAtIndex(cfFontFamilies, i); - // TODO: determine fixed widths ... - - CFStringRef theName = NULL; - ATSFontFamilyGetName(theATSFontFamilyRef, kATSOptionFlagsDefault, &theName); - wxCFStringRef cfName(theName) ; + if ( encoding != wxFONTENCODING_SYSTEM || fixedWidthOnly) + { + wxCFRef font(CTFontCreateWithName(fontName, 12.0, NULL)); + if ( encoding != wxFONTENCODING_SYSTEM ) + { + CFStringEncoding fontFamiliyEncoding = CTFontGetStringEncoding(font); + if ( fontFamiliyEncoding != macEncoding ) + continue; + } + + if ( fixedWidthOnly ) + { + CTFontSymbolicTraits traits = CTFontGetSymbolicTraits(font); + if ( (traits & kCTFontMonoSpaceTrait) == 0 ) + continue; + } + + } + + wxCFStringRef cfName(wxCFRetain(fontName)) ; fontFamilies.Add(cfName.AsString(wxLocale::GetSystemEncoding())); } - else if (status == kATSIterationScopeModified) // Make sure the font database hasn't changed. - { - // reset the iterator - status = ATSFontFamilyIteratorReset (kATSFontContextLocal, nil, nil, - kATSOptionFlagsUnRestrictedScope, - &theFontFamilyIterator); - fontFamilies.Clear() ; - } + + CFRelease(cfFontFamilies); } - ATSFontFamilyIteratorRelease(&theFontFamilyIterator); #endif - for ( size_t i = 0 ; i < fontFamilies.Count() ; ++i ) { if ( OnFacename( fontFamilies[i] ) == false ) diff --git a/Externals/wxWidgets3/src/osx/core/glgrab.cpp b/Externals/wxWidgets3/src/osx/core/glgrab.cpp index 74644b45c7..669f2ba6c4 100644 --- a/Externals/wxWidgets3/src/osx/core/glgrab.cpp +++ b/Externals/wxWidgets3/src/osx/core/glgrab.cpp @@ -39,6 +39,7 @@ #import #import +#include "wx/osx/core/private.h" #include "wx/osx/private/glgrab.h" extern CGColorSpaceRef wxMacGetGenericRGBColorSpace(); @@ -114,7 +115,6 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) void * data; long bytewidth; GLint width, height; - long bytes; CGLContextObj glContextObj; CGLPixelFormatObj pixelFormatObj ; @@ -156,7 +156,6 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) bytewidth = width * 4; // Assume 4 bytes/pixel for now bytewidth = (bytewidth + 3) & ~3; // Align to 4 bytes - bytes = bytewidth * height; // width * height /* Build bitmap context */ data = malloc(height * bytewidth); diff --git a/Externals/wxWidgets3/src/osx/core/hid.cpp b/Externals/wxWidgets3/src/osx/core/hid.cpp index 30df548e65..92c874aa26 100644 --- a/Externals/wxWidgets3/src/osx/core/hid.cpp +++ b/Externals/wxWidgets3/src/osx/core/hid.cpp @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 11/11/2003 -// RCS-ID: $Id: hid.cpp 70251 2012-01-03 10:34:14Z SC $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -36,7 +35,7 @@ #include "wx/module.h" #endif -#include "wx/osx/core/cfstring.h" +#include "wx/osx/private.h" // ============================================================================ // implementation @@ -97,7 +96,7 @@ bool wxHIDDevice::Create (int nClass, int nType, int nDev) CFRelease(pClass); } - //Now get the maching services + //Now get the matching services io_iterator_t pIterator; if( IOServiceGetMatchingServices(m_pPort, pDictionary, &pIterator) != kIOReturnSuccess ) @@ -261,7 +260,7 @@ size_t wxHIDDevice::GetCount (int nClass, int nType) CFRelease(pClass); } - //Now get the maching services + //Now get the matching services io_iterator_t pIterator; if( IOServiceGetMatchingServices(pPort, pDictionary, &pIterator) != kIOReturnSuccess ) @@ -379,7 +378,7 @@ bool wxHIDDevice::IsActive(int nIndex) // ---------------------------------------------------------------------------- bool wxHIDDevice::HasElement(int nIndex) { - return (void*) m_pCookies[nIndex] != NULL; + return m_pCookies[nIndex] != 0; } // ---------------------------------------------------------------------------- @@ -673,73 +672,8 @@ bool wxGetKeyState (wxKeyCode key) wxASSERT_MSG(key != WXK_LBUTTON && key != WXK_RBUTTON && key != WXK_MBUTTON, wxT("can't use wxGetKeyState() for mouse buttons")); - if (wxHIDModule::sm_keyboards.GetCount() == 0) - { - int nKeyboards = wxHIDKeyboard::GetCount(); - - for(int i = 1; i <= nKeyboards; ++i) - { - wxHIDKeyboard* keyboard = new wxHIDKeyboard(); - if(keyboard->Create(i)) - { - wxHIDModule::sm_keyboards.Add(keyboard); - } - else - { - delete keyboard; - break; - } - } - - wxASSERT_MSG(wxHIDModule::sm_keyboards.GetCount() != 0, - wxT("No keyboards found!")); - } - - for(size_t i = 0; i < wxHIDModule::sm_keyboards.GetCount(); ++i) - { - wxHIDKeyboard* keyboard = (wxHIDKeyboard*) - wxHIDModule::sm_keyboards[i]; - - switch(key) - { - case WXK_SHIFT: - if( keyboard->IsActive(WXK_SHIFT) || - keyboard->IsActive(WXK_RSHIFT) ) - { - return true; - } - break; - case WXK_ALT: - if( keyboard->IsActive(WXK_ALT) || - keyboard->IsActive(WXK_RALT) ) - { - return true; - } - break; - case WXK_CONTROL: - if( keyboard->IsActive(WXK_CONTROL) || - keyboard->IsActive(WXK_RCONTROL) ) - { - return true; - } - break; - case WXK_RAW_CONTROL: - if( keyboard->IsActive(WXK_RAW_CONTROL) || - keyboard->IsActive(WXK_RAW_RCONTROL) ) - { - return true; - } - break; - default: - if( keyboard->IsActive(key) ) - { - return true; - } - break; - } - } - - return false; //not down/error + CGKeyCode cgcode = wxCharCodeWXToOSX((wxKeyCode)key); + return CGEventSourceKeyState(kCGEventSourceStateCombinedSessionState, cgcode); } #endif //__DARWIN__ diff --git a/Externals/wxWidgets3/src/osx/core/hidjoystick.cpp b/Externals/wxWidgets3/src/osx/core/hidjoystick.cpp index 2eb4feb2e2..4a8273838e 100644 --- a/Externals/wxWidgets3/src/osx/core/hidjoystick.cpp +++ b/Externals/wxWidgets3/src/osx/core/hidjoystick.cpp @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 2/13/2005 -// RCS-ID: $Id: hidjoystick.cpp 70404 2012-01-19 15:06:22Z SC $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -566,7 +565,7 @@ void wxHIDJoystick::BuildCookies(CFArrayRef Array) // // I wasted two hours of my life on this line :( - // accidently removed it during some source cleaning... + // accidentally removed it during some source cleaning... // MakeCookies(Array); @@ -782,7 +781,7 @@ void* wxJoystickThread::Entry() // // This is where the REAL dirty work gets done. // -// 1) Loops through each event the queue has recieved +// 1) Loops through each event the queue has received // 2) First, checks if the thread that is running the loop for // the polling has ended - if so it breaks out // 3) Next, it checks if there was an error getting this event from diff --git a/Externals/wxWidgets3/src/osx/core/mimetype.cpp b/Externals/wxWidgets3/src/osx/core/mimetype.cpp index 83c7c54b22..7d5de4bba9 100644 --- a/Externals/wxWidgets3/src/osx/core/mimetype.cpp +++ b/Externals/wxWidgets3/src/osx/core/mimetype.cpp @@ -4,7 +4,6 @@ // Author: Neil Perkins // Modified by: // Created: 2010-05-15 -// RCS-ID: $Id: mimetype.cpp 68563 2011-08-05 19:02:26Z VZ $ // Copyright: (C) 2010 Neil Perkins // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -244,7 +243,7 @@ wxMimeTypesManagerImpl::~wxMimeTypesManagerImpl() // Init / shutdown functions // // The Launch Services / UTI API provides no helpful way of getting a list -// of all registered types. Instead the API is focused arround looking up +// of all registered types. Instead the API is focused around looking up // information for a particular file type once you already have some // identifying piece of information. In order to get a list of registered // types it would first be necessary to get a list of all bundles exporting diff --git a/Externals/wxWidgets3/src/osx/core/printmac.cpp b/Externals/wxWidgets3/src/osx/core/printmac.cpp index a0558ee26f..148d1b65af 100644 --- a/Externals/wxWidgets3/src/osx/core/printmac.cpp +++ b/Externals/wxWidgets3/src/osx/core/printmac.cpp @@ -4,7 +4,6 @@ // Author: Julian Smart, Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: printmac.cpp 70884 2012-03-12 17:47:18Z SC $ // Copyright: (c) Julian Smart, Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/core/sockosx.cpp b/Externals/wxWidgets3/src/osx/core/sockosx.cpp index 2b9bc131be..9a540058ce 100644 --- a/Externals/wxWidgets3/src/osx/core/sockosx.cpp +++ b/Externals/wxWidgets3/src/osx/core/sockosx.cpp @@ -3,7 +3,6 @@ // Purpose: wxSocketImpl implementation for OS X // Authors: Brian Victor, Vadim Zeitlin // Created: February 2002 -// RCS-ID: $Id: sockosx.cpp 67280 2011-03-22 14:17:38Z DS $ // Copyright: (c) 2002 Brian Victor // (c) 2008 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/src/osx/core/sound.cpp b/Externals/wxWidgets3/src/osx/core/sound.cpp index de50b6e587..815ba16420 100644 --- a/Externals/wxWidgets3/src/osx/core/sound.cpp +++ b/Externals/wxWidgets3/src/osx/core/sound.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Stefan Csomor // Created: 2009-01-01 -// RCS-ID: $Id: sound.cpp 69178 2011-09-21 15:08:02Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -51,7 +50,7 @@ protected: }; wxOSXAudioToolboxSoundData::wxOSXAudioToolboxSoundData(const wxString& fileName) : - m_soundID(NULL) + m_soundID(0) { m_sndname = fileName; } diff --git a/Externals/wxWidgets3/src/osx/core/stdpaths_cf.cpp b/Externals/wxWidgets3/src/osx/core/stdpaths_cf.cpp index aebb1d752c..86b34e646c 100644 --- a/Externals/wxWidgets3/src/osx/core/stdpaths_cf.cpp +++ b/Externals/wxWidgets3/src/osx/core/stdpaths_cf.cpp @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2004-10-27 -// RCS-ID: $Id: stdpaths_cf.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2004 David Elliott // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -83,7 +82,7 @@ static wxString BundleRelativeURLToPath(CFURLRef relativeURL) wxCHECK_MSG(absoluteURL, wxEmptyString, wxT("Failed to resolve relative URL to absolute URL")); CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kDefaultPathStyle); CFRelease(absoluteURL); - return wxCFStringRef(cfStrPath).AsString(wxLocale::GetSystemEncoding()); + return wxCFStringRef::AsStringWithNormalizationFormC(cfStrPath); } wxString wxStandardPathsCF::GetFromFunc(wxCFURLRef (*func)(wxCFBundleRef)) const diff --git a/Externals/wxWidgets3/src/osx/core/strconv_cf.cpp b/Externals/wxWidgets3/src/osx/core/strconv_cf.cpp index 0685ba2b45..a385e528b3 100644 --- a/Externals/wxWidgets3/src/osx/core/strconv_cf.cpp +++ b/Externals/wxWidgets3/src/osx/core/strconv_cf.cpp @@ -4,7 +4,6 @@ // Author: David Elliott // Modified by: // Created: 2007-07-06 -// RCS-ID: $Id: strconv_cf.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2007 David Elliott // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/core/timer.cpp b/Externals/wxWidgets3/src/osx/core/timer.cpp index 98cd9d05ea..b78d63c5e6 100644 --- a/Externals/wxWidgets3/src/osx/core/timer.cpp +++ b/Externals/wxWidgets3/src/osx/core/timer.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2008-07-01 -// RCS-ID: $Id: timer.cpp 65561 2010-09-17 11:17:55Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/core/utilsexc_base.cpp b/Externals/wxWidgets3/src/osx/core/utilsexc_base.cpp index 3476c5a28d..f510abc37a 100644 --- a/Externals/wxWidgets3/src/osx/core/utilsexc_base.cpp +++ b/Externals/wxWidgets3/src/osx/core/utilsexc_base.cpp @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 2005-06-21 -// RCS-ID: $Id: utilsexc_base.cpp 68506 2011-08-03 15:46:43Z JS $ // Copyright: (c) Ryan Norton // Licence: wxWindows licence // Notes: Source was originally in utilsexc_cf.cpp,1.6 then moved @@ -54,12 +53,6 @@ extern WXDLLIMPEXP_BASE wxSocketManager *wxOSXSocketManagerCF; wxSocketManager *wxOSXSocketManagerCF = NULL; #endif // wxUSE_SOCKETS -extern bool WXDLLEXPORT wxIsDebuggerRunning() -{ - // TODO : try to find out ... - return false; -} - #if ( !wxUSE_GUI && !wxOSX_USE_IPHONE ) || wxOSX_USE_COCOA_OR_CARBON // have a fast version for mac code that returns the version as a return value diff --git a/Externals/wxWidgets3/src/osx/core/utilsexc_cf.cpp b/Externals/wxWidgets3/src/osx/core/utilsexc_cf.cpp index 394d7fcd2d..2a8c436223 100644 --- a/Externals/wxWidgets3/src/osx/core/utilsexc_cf.cpp +++ b/Externals/wxWidgets3/src/osx/core/utilsexc_cf.cpp @@ -4,8 +4,8 @@ // Author: David Elliott, Ryan Norton (wxMacExecute) // Modified by: Stefan Csomor (added necessary wxT for unicode builds) // Created: 2004-11-04 -// RCS-ID: $Id: utilsexc_cf.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) David Elliott, Ryan Norton +// (c) 2013 Rob Bresalier // Licence: wxWindows licence // Notes: This code comes from src/osx/carbon/utilsexc.cpp,1.11 ///////////////////////////////////////////////////////////////////////////// @@ -15,103 +15,159 @@ #include "wx/log.h" #include "wx/utils.h" #endif //ndef WX_PRECOMP -#include "wx/unix/execute.h" #include "wx/stdpaths.h" #include "wx/app.h" #include "wx/apptrait.h" #include "wx/thread.h" #include "wx/process.h" +#include "wx/evtloop.h" +#include "wx/evtloopsrc.h" +#include "wx/private/eventloopsourcesmanager.h" + #include #include -/*! - Called due to source signal detected by the CFRunLoop. - This is nearly identical to the wxGTK equivalent. - */ -extern "C" void WXCF_EndProcessDetector(CFSocketRef s, - CFSocketCallBackType WXUNUSED(callbackType), - CFDataRef WXUNUSED(address), - void const *WXUNUSED(data), - void *info) -{ - /* - Either our pipe was closed or the process ended successfully. Either way, - we're done. It's not if waitpid is going to magically succeed when - we get fired again. CFSocketInvalidate closes the fd for us and also - invalidates the run loop source for us which should cause it to - release the CFSocket (thus causing it to be deallocated) and remove - itself from the runloop which should release it and cause it to also - be deallocated. Of course, it's possible the RunLoop hangs onto - one or both of them by retaining/releasing them within its stack - frame. However, that shouldn't be depended on. Assume that s is - deallocated due to the following call. - */ - CFSocketInvalidate(s); +#if wxUSE_EVENTLOOP_SOURCE - // Now tell wx that the process has ended. - wxHandleProcessTermination(static_cast(info)); +namespace +{ + +extern "C" +void +wx_socket_callback(CFSocketRef WXUNUSED(s), + CFSocketCallBackType callbackType, + CFDataRef WXUNUSED(address), + void const *WXUNUSED(data), + void *ctxData) +{ + wxLogTrace(wxTRACE_EVT_SOURCE, + "CFSocket callback, type=%d", static_cast(callbackType)); + + wxCFEventLoopSource * const + source = static_cast(ctxData); + + wxEventLoopSourceHandler * const + handler = source->GetHandler(); + + switch ( callbackType ) + { + case kCFSocketReadCallBack: + handler->OnReadWaiting(); + break; + + case kCFSocketWriteCallBack: + handler->OnWriteWaiting(); + break; + + default: + wxFAIL_MSG( "Unexpected callback type." ); + } } -/*! - Implements the GUI-specific AddProcessCallback() for both wxMac and - wxCocoa using the CFSocket/CFRunLoop API which is available to both. - Takes advantage of the fact that sockets on UNIX are just regular - file descriptors and thus even a non-socket file descriptor can - apparently be used with CFSocket so long as you only tell CFSocket - to do things with it that would be valid for a non-socket fd. - */ -int wxGUIAppTraits::AddProcessCallback(wxEndProcessData *proc_data, int fd) +} // anonymous namespace + +class wxCFEventLoopSourcesManager : public wxEventLoopSourcesManagerBase { - static int s_last_tag = 0; - CFSocketContext context = - { 0 - , static_cast(proc_data) - , NULL - , NULL - , NULL - }; - CFSocketRef cfSocket = CFSocketCreateWithNative(kCFAllocatorDefault,fd,kCFSocketReadCallBack,&WXCF_EndProcessDetector,&context); - if(cfSocket == NULL) +public: + wxEventLoopSource * + AddSourceForFD(int fd, wxEventLoopSourceHandler *handler, int flags) { - wxLogError(wxT("Failed to create socket for end process detection")); - return 0; - } - CFRunLoopSourceRef runLoopSource = CFSocketCreateRunLoopSource(kCFAllocatorDefault, cfSocket, /*highest priority:*/0); - if(runLoopSource == NULL) - { - wxLogError(wxT("Failed to create CFRunLoopSource from CFSocket for end process detection")); - // closes the fd.. we can't really stop it, nor do we necessarily want to. - CFSocketInvalidate(cfSocket); - CFRelease(cfSocket); - return 0; - } - // Now that the run loop source has the socket retained and we no longer - // need to refer to it within this method, we can release it. - CFRelease(cfSocket); + wxCHECK_MSG( fd != -1, NULL, "can't monitor invalid fd" ); - CFRunLoopAddSource(CFRunLoopGetCurrent(), runLoopSource, kCFRunLoopCommonModes); - // Now that the run loop has the source retained we can release it. - CFRelease(runLoopSource); + wxScopedPtr + source(new wxCFEventLoopSource(handler, flags)); - /* - Feed wx some bullshit.. we don't use it since CFSocket helpfully passes - itself into our callback and that's enough to be able to - CFSocketInvalidate it which is all we need to do to get everything we - just created to be deallocated. - */ - return ++s_last_tag; + CFSocketContext context = { 0, source.get(), NULL, NULL, NULL }; + + int callbackTypes = 0; + if ( flags & wxEVENT_SOURCE_INPUT ) + callbackTypes |= kCFSocketReadCallBack; + if ( flags & wxEVENT_SOURCE_OUTPUT ) + callbackTypes |= kCFSocketWriteCallBack; + + wxCFRef + cfSocket(CFSocketCreateWithNative + ( + kCFAllocatorDefault, + fd, + callbackTypes, + &wx_socket_callback, + &context + )); + + if ( !cfSocket ) + { + wxLogError(wxS("Failed to create event loop source socket.")); + return NULL; + } + + // Adjust the socket options to suit our needs: + CFOptionFlags sockopt = CFSocketGetSocketFlags(cfSocket); + + // First, by default, write callback is not called repeatedly when data + // can be written to the socket but we need this behaviour so request + // it explicitly. + if ( flags & wxEVENT_SOURCE_OUTPUT ) + sockopt |= kCFSocketAutomaticallyReenableWriteCallBack; + + // Second, we use the socket to monitor the FD but it doesn't own it, + // so prevent the FD from being closed when the socket is invalidated. + sockopt &= ~kCFSocketCloseOnInvalidate; + + CFSocketSetSocketFlags(cfSocket, sockopt); + + wxCFRef + runLoopSource(CFSocketCreateRunLoopSource + ( + kCFAllocatorDefault, + cfSocket, + 0 // Lowest index means highest priority + )); + if ( !runLoopSource ) + { + wxLogError(wxS("Failed to create low level event loop source.")); + CFSocketInvalidate(cfSocket); + return NULL; + } + + // Save the socket so that we can remove it later if asked to. + source->InitSourceSocket(cfSocket.release()); + + CFRunLoopAddSource(CFRunLoopGetCurrent(), runLoopSource, kCFRunLoopCommonModes); + + return source.release(); + } +}; + +wxEventLoopSourcesManagerBase* wxGUIAppTraits::GetEventLoopSourcesManager() +{ + static wxCFEventLoopSourcesManager s_eventLoopSourcesManager; + + return &s_eventLoopSourcesManager; } +#endif // wxUSE_EVENTLOOP_SOURCE + ///////////////////////////////////////////////////////////////////////////// // NOTE: This doesn't really belong here but this was a handy file to // put it in because it's already compiled for wxCocoa and wxMac GUI lib. #if wxUSE_STDPATHS -static wxStandardPathsCF gs_stdPaths; wxStandardPaths& wxGUIAppTraits::GetStandardPaths() { + // Derive a class just to be able to create it: wxStandardPaths ctor is + // protected to prevent its misuse, but it also means we can't create an + // object of this class directly. + class wxStandardPathsDefault : public wxStandardPathsCF + { + public: + wxStandardPathsDefault() { } + }; + + static wxStandardPathsDefault gs_stdPaths; + return gs_stdPaths; } #endif diff --git a/Externals/wxWidgets3/src/osx/dataview_osx.cpp b/Externals/wxWidgets3/src/osx/dataview_osx.cpp index 2e6c92c85f..799e752e15 100644 --- a/Externals/wxWidgets3/src/osx/dataview_osx.cpp +++ b/Externals/wxWidgets3/src/osx/dataview_osx.cpp @@ -2,7 +2,6 @@ // Name: src/osx/dataview_osx.cpp // Purpose: wxDataViewCtrl native mac implementation // Author: -// Id: $Id: dataview_osx.cpp 70377 2012-01-17 14:05:17Z VS $ // Copyright: (c) 2009 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -127,7 +126,7 @@ bool wxOSXDataViewModelNotifier::ItemChanged(wxDataViewItem const& item) if (m_DataViewCtrlPtr->GetDataViewPeer()->Update(GetOwner()->GetParent(item),item)) { // sent the equivalent wxWidget event: - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); dataViewEvent.SetEventObject(m_DataViewCtrlPtr); dataViewEvent.SetItem(item); @@ -147,7 +146,7 @@ bool wxOSXDataViewModelNotifier::ItemsChanged(wxDataViewItemArray const& items) { size_t const noOfItems = items.GetCount(); - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); dataViewEvent.SetEventObject(m_DataViewCtrlPtr); @@ -213,7 +212,7 @@ bool wxOSXDataViewModelNotifier::ValueChanged(wxDataViewItem const& item, unsign wxCHECK_MSG(GetOwner() != NULL,false,"Owner not initialized."); if (m_DataViewCtrlPtr->GetDataViewPeer()->Update(GetOwner()->GetParent(item),item)) { - wxDataViewEvent dataViewEvent(wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); + wxDataViewEvent dataViewEvent(wxEVT_DATAVIEW_ITEM_VALUE_CHANGED,m_DataViewCtrlPtr->GetId()); dataViewEvent.SetEventObject(m_DataViewCtrlPtr); dataViewEvent.SetColumn(col); @@ -348,6 +347,11 @@ void wxDataViewCustomRenderer::SetDC(wxDC* newDCPtr) wxDataViewCtrl::~wxDataViewCtrl() { ClearColumns(); + + // Ensure that the already destructed controls is not notified about changes + // in the model any more. + if (m_ModelNotifier != NULL) + m_ModelNotifier->GetOwner()->RemoveNotifier(m_ModelNotifier); } void wxDataViewCtrl::Init() @@ -355,6 +359,7 @@ void wxDataViewCtrl::Init() m_CustomRendererPtr = NULL; m_Deleting = false; m_cgContext = NULL; + m_ModelNotifier = NULL; } bool wxDataViewCtrl::Create(wxWindow *parent, @@ -381,10 +386,19 @@ bool wxDataViewCtrl::AssociateModel(wxDataViewModel* model) wxCHECK_MSG(dataViewWidgetPtr != NULL,false,"Pointer to native control must not be NULL."); + + // We could have been associated with another model previously, break the + // association in this case. + if ( m_ModelNotifier ) + m_ModelNotifier->GetOwner()->RemoveNotifier(m_ModelNotifier); + if (wxDataViewCtrlBase::AssociateModel(model) && dataViewWidgetPtr->AssociateModel(model)) { if (model != NULL) - model->AddNotifier(new wxOSXDataViewModelNotifier(this)); + { + m_ModelNotifier = new wxOSXDataViewModelNotifier(this); + model->AddNotifier(m_ModelNotifier); + } return true; } else diff --git a/Externals/wxWidgets3/src/osx/datectrl_osx.cpp b/Externals/wxWidgets3/src/osx/datectrl_osx.cpp index 9739977155..c10b778068 100644 --- a/Externals/wxWidgets3/src/osx/datectrl_osx.cpp +++ b/Externals/wxWidgets3/src/osx/datectrl_osx.cpp @@ -3,7 +3,6 @@ // Purpose: Implementation of wxDatePickerCtrl for OS X. // Author: Vadim Zeitlin // Created: 2011-12-18 -// RCS-ID: $Id: datectrl_osx.cpp 70071 2011-12-20 21:27:14Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/datetimectrl_osx.cpp b/Externals/wxWidgets3/src/osx/datetimectrl_osx.cpp index 45a65dd8ab..628fb8be5d 100644 --- a/Externals/wxWidgets3/src/osx/datetimectrl_osx.cpp +++ b/Externals/wxWidgets3/src/osx/datetimectrl_osx.cpp @@ -3,7 +3,6 @@ // Purpose: Implementation of wxDateTimePickerCtrl for OS X. // Author: Vadim Zeitlin // Created: 2011-12-18 -// RCS-ID: $Id: datetimectrl_osx.cpp 70071 2011-12-20 21:27:14Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -28,6 +27,7 @@ #ifndef WX_PRECOMP #endif // WX_PRECOMP +#include "wx/datectrl.h" #include "wx/datetimectrl.h" #include "wx/osx/core/private/datetimectrl.h" @@ -43,7 +43,19 @@ wxDateTimeWidgetImpl* wxDateTimePickerCtrl::GetDateTimePeer() const void wxDateTimePickerCtrl::SetValue(const wxDateTime& dt) { - GetDateTimePeer()->SetDateTime(dt); + if ( dt.IsValid() ) + { + GetDateTimePeer()->SetDateTime(dt); + } + else // invalid date + { + wxASSERT_MSG( HasFlag(wxDP_ALLOWNONE), + wxT("this control must have a valid date") ); + + // TODO setting to an invalid date is not natively supported + // so we must implement a UI for that ourselves + GetDateTimePeer()->SetDateTime(dt); + } } wxDateTime wxDateTimePickerCtrl::GetValue() const diff --git a/Externals/wxWidgets3/src/osx/dialog_osx.cpp b/Externals/wxWidgets3/src/osx/dialog_osx.cpp index 56a106f713..fe870deaed 100644 --- a/Externals/wxWidgets3/src/osx/dialog_osx.cpp +++ b/Externals/wxWidgets3/src/osx/dialog_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dialog_osx.cpp 68719 2011-08-16 12:00:52Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -13,6 +12,7 @@ #include "wx/dialog.h" #include "wx/evtloop.h" +#include "wx/modalhook.h" #ifndef WX_PRECOMP #include "wx/app.h" @@ -115,7 +115,12 @@ bool wxDialog::Show(bool show) if ( !show ) { - switch( m_modality ) + const int modalityOrig = m_modality; + + // complete the 'hiding' before we send the event + m_modality = wxDIALOG_MODALITY_NONE; + + switch ( modalityOrig ) { case wxDIALOG_MODALITY_WINDOW_MODAL: EndWindowModal(); // OS X implementation method for cleanup @@ -124,7 +129,6 @@ bool wxDialog::Show(bool show) default: break; } - m_modality = wxDIALOG_MODALITY_NONE; } return true; @@ -133,6 +137,8 @@ bool wxDialog::Show(bool show) // Replacement for Show(true) for modal dialogs - returns return code int wxDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + m_modality = wxDIALOG_MODALITY_APP_MODAL; Show(); diff --git a/Externals/wxWidgets3/src/osx/dnd_osx.cpp b/Externals/wxWidgets3/src/osx/dnd_osx.cpp index 1cafad2d4a..ab6f153b53 100644 --- a/Externals/wxWidgets3/src/osx/dnd_osx.cpp +++ b/Externals/wxWidgets3/src/osx/dnd_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dnd_osx.cpp 69677 2011-11-05 11:23:48Z VZ $ // Copyright: (c) 1998 Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/fontutil.cpp b/Externals/wxWidgets3/src/osx/fontutil.cpp index 600d4acd6c..35d9cdc62b 100644 --- a/Externals/wxWidgets3/src/osx/fontutil.cpp +++ b/Externals/wxWidgets3/src/osx/fontutil.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin, Stefan Csomor // Modified by: // Created: 05.11.99 -// RCS-ID: $Id: fontutil.cpp 54962 2008-08-03 17:34:59Z SC $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/gauge_osx.cpp b/Externals/wxWidgets3/src/osx/gauge_osx.cpp index ed9b22c4c7..40e4c71cd8 100644 --- a/Externals/wxWidgets3/src/osx/gauge_osx.cpp +++ b/Externals/wxWidgets3/src/osx/gauge_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: gauge_osx.cpp 67243 2011-03-19 08:36:23Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/glcanvas_osx.cpp b/Externals/wxWidgets3/src/osx/glcanvas_osx.cpp index 5e53aabfc4..3610ccff48 100644 --- a/Externals/wxWidgets3/src/osx/glcanvas_osx.cpp +++ b/Externals/wxWidgets3/src/osx/glcanvas_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: glcanvas_osx.cpp 65561 2010-09-17 11:17:55Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/imaglist.cpp b/Externals/wxWidgets3/src/osx/imaglist.cpp index 89f851940a..8dc07f1467 100644 --- a/Externals/wxWidgets3/src/osx/imaglist.cpp +++ b/Externals/wxWidgets3/src/osx/imaglist.cpp @@ -2,7 +2,6 @@ // Name: src/osx/imaglist.cpp // Purpose: // Author: Robert Roebling -// RCS_ID: $Id: imaglist.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/iphone/anybutton.mm b/Externals/wxWidgets3/src/osx/iphone/anybutton.mm index ffdf3262e4..f9182c3170 100644 --- a/Externals/wxWidgets3/src/osx/iphone/anybutton.mm +++ b/Externals/wxWidgets3/src/osx/iphone/anybutton.mm @@ -3,7 +3,6 @@ // Purpose: wxAnyButton // Author: Stefan Csomor // Created: 1998-01-01 (extracted from button.mm) -// RCS-ID: $Id: anybutton.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/iphone/button.mm b/Externals/wxWidgets3/src/osx/iphone/button.mm index f50d62946c..8ee98a3571 100644 --- a/Externals/wxWidgets3/src/osx/iphone/button.mm +++ b/Externals/wxWidgets3/src/osx/iphone/button.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: button.mm 67931 2011-06-14 13:00:42Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/iphone/checkbox.mm b/Externals/wxWidgets3/src/osx/iphone/checkbox.mm index 9f6acc292a..de9f8c0876 100644 --- a/Externals/wxWidgets3/src/osx/iphone/checkbox.mm +++ b/Externals/wxWidgets3/src/osx/iphone/checkbox.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2008-08-20 -// RCS-ID: $Id: checkbox.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/iphone/dialog.mm b/Externals/wxWidgets3/src/osx/iphone/dialog.mm index 3c29fd61af..88beac34c3 100644 --- a/Externals/wxWidgets3/src/osx/iphone/dialog.mm +++ b/Externals/wxWidgets3/src/osx/iphone/dialog.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: dialog.mm 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/iphone/evtloop.mm b/Externals/wxWidgets3/src/osx/iphone/evtloop.mm index 149ae67683..f928274e41 100644 --- a/Externals/wxWidgets3/src/osx/iphone/evtloop.mm +++ b/Externals/wxWidgets3/src/osx/iphone/evtloop.mm @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin, Stefan Csomor // Modified by: // Created: 2006-01-12 -// RCS-ID: $Id: evtloop.mm 69525 2011-10-25 11:51:36Z SC $ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -83,7 +82,7 @@ wxGUIEventLoop::wxGUIEventLoop() { } -void wxGUIEventLoop::DoRun() +void wxGUIEventLoop::OSXDoRun() { if ( IsMain() ) { @@ -93,7 +92,7 @@ void wxGUIEventLoop::DoRun() } else { - wxCFEventLoop::DoRun(); + wxCFEventLoop::OSXDoRun(); } } @@ -102,9 +101,9 @@ int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout) return wxCFEventLoop::DoDispatchTimeout(timeout); } -void wxGUIEventLoop::DoStop() +void wxGUIEventLoop::OSXDoStop() { - return wxCFEventLoop::DoStop(); + return wxCFEventLoop::OSXDoStop(); } CFRunLoopRef wxGUIEventLoop::CFGetCurrentRunLoop() const @@ -136,12 +135,12 @@ wxModalEventLoop::wxModalEventLoop(WXWindow modalNativeWindow) // END move into a evtloop_osx.cpp -void wxModalEventLoop::DoRun() +void wxModalEventLoop::OSXDoRun() { // presentModalViewController:animated: } -void wxModalEventLoop::DoStop() +void wxModalEventLoop::OSXDoStop() { // (void)dismissModalViewControllerAnimated:(BOOL)animated } diff --git a/Externals/wxWidgets3/src/osx/iphone/gauge.mm b/Externals/wxWidgets3/src/osx/iphone/gauge.mm index 347184145f..7ea73e294a 100644 --- a/Externals/wxWidgets3/src/osx/iphone/gauge.mm +++ b/Externals/wxWidgets3/src/osx/iphone/gauge.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: gauge.mm 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/iphone/glcanvas.mm b/Externals/wxWidgets3/src/osx/iphone/glcanvas.mm index 3c3609a62c..9883f9f0e3 100644 --- a/Externals/wxWidgets3/src/osx/iphone/glcanvas.mm +++ b/Externals/wxWidgets3/src/osx/iphone/glcanvas.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: glcanvas.mm 67243 2011-03-19 08:36:23Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -142,15 +141,13 @@ - (void) setContext:(EAGLContext*) ctx { context = ctx; [EAGLContext setCurrentContext:ctx]; -#if 0 - CGRect newRect = [self frame]; - if ( /* (CGRectEqualToRect(newRect, oldRect) == NO && ![self isHidden] && newRect.size.width > 0 && newRect.size.height > 0 ) - || */ viewFramebuffer == 0 ) + + if ( viewFramebuffer == 0 ) { [self destroyFramebuffer]; [self createFramebuffer]; } -#endif + glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer); } diff --git a/Externals/wxWidgets3/src/osx/iphone/msgdlg.mm b/Externals/wxWidgets3/src/osx/iphone/msgdlg.mm index cf9f31e98e..3431cb5a91 100644 --- a/Externals/wxWidgets3/src/osx/iphone/msgdlg.mm +++ b/Externals/wxWidgets3/src/osx/iphone/msgdlg.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: msgdlg.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -20,6 +19,7 @@ #include "wx/thread.h" #include "wx/osx/private.h" +#include "wx/modalhook.h" IMPLEMENT_CLASS(wxMessageDialog, wxDialog) @@ -36,6 +36,8 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, int wxMessageDialog::ShowModal() { + WX_HOOK_MODAL_DIALOG(); + int resultbutton = wxID_CANCEL; const long style = GetMessageDialogStyle(); diff --git a/Externals/wxWidgets3/src/osx/iphone/nonownedwnd.mm b/Externals/wxWidgets3/src/osx/iphone/nonownedwnd.mm index 6707e674ad..b7082f89c8 100644 --- a/Externals/wxWidgets3/src/osx/iphone/nonownedwnd.mm +++ b/Externals/wxWidgets3/src/osx/iphone/nonownedwnd.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2008-06-20 -// RCS-ID: $Id: nonownedwnd.mm 69526 2011-10-25 11:52:02Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -352,7 +351,15 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) wxWidgetIPhoneImpl* impl = new wxWidgetIPhoneImpl( now, contentview, true ); impl->InstallEventHandler(); - [toplevelwindow addSubview:contentview]; + + if ([toplevelwindow respondsToSelector:@selector(setRootViewController:)]) + { + toplevelwindow.rootViewController = controller; + } + else + { + [toplevelwindow addSubview:contentview]; + } return impl; } @@ -396,6 +403,21 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) return YES; } +// iOS 6 support, right now unconditionally supporting all orientations, TODO use a orientation mask + +-(BOOL)shouldAutorotate +{ + return YES; +} + + - (NSUInteger)supportedInterfaceOrientations +{ + return UIInterfaceOrientationMaskAll; +} + + + + - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( [self view] ); @@ -454,6 +476,7 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) footerView = frame->GetToolBar()->GetHandle(); } } + return footerView; } @end diff --git a/Externals/wxWidgets3/src/osx/iphone/scrolbar.mm b/Externals/wxWidgets3/src/osx/iphone/scrolbar.mm index 5b091a4fce..031feeb088 100644 --- a/Externals/wxWidgets3/src/osx/iphone/scrolbar.mm +++ b/Externals/wxWidgets3/src/osx/iphone/scrolbar.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: scrolbar.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/iphone/slider.mm b/Externals/wxWidgets3/src/osx/iphone/slider.mm index f91de107ea..eb22a66e6c 100644 --- a/Externals/wxWidgets3/src/osx/iphone/slider.mm +++ b/Externals/wxWidgets3/src/osx/iphone/slider.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: slider.mm 67232 2011-03-18 15:10:15Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/iphone/stattext.mm b/Externals/wxWidgets3/src/osx/iphone/stattext.mm index debf6b625e..b0994d0733 100644 --- a/Externals/wxWidgets3/src/osx/iphone/stattext.mm +++ b/Externals/wxWidgets3/src/osx/iphone/stattext.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: stattext.mm 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/iphone/textctrl.mm b/Externals/wxWidgets3/src/osx/iphone/textctrl.mm index 3f27e13848..8fa70b90ad 100644 --- a/Externals/wxWidgets3/src/osx/iphone/textctrl.mm +++ b/Externals/wxWidgets3/src/osx/iphone/textctrl.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Ryan Norton (MLTE GetLineLength and GetLineText) // Created: 1998-01-01 -// RCS-ID: $Id: textctrl.mm 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -189,7 +188,7 @@ protected : wxWindow* wxpeer = (wxWindow*) impl->GetWXPeer(); if ( wxpeer && wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, wxpeer->GetId()); + wxCommandEvent event(wxEVT_TEXT_ENTER, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetString( static_cast(wxpeer)->GetValue() ); wxpeer->HandleWindowEvent( event ); @@ -663,7 +662,7 @@ void wxUITextFieldControl::controlAction(WXWidget WXUNUSED(slf), wxWindow* wxpeer = (wxWindow*) GetWXPeer(); if ( wxpeer && (wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER) ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, wxpeer->GetId()); + wxCommandEvent event(wxEVT_TEXT_ENTER, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetString( static_cast(wxpeer)->GetValue() ); wxpeer->HandleWindowEvent( event ); @@ -674,6 +673,7 @@ bool wxUITextFieldControl::SetHint(const wxString& hint) { wxCFStringRef hintstring(hint); [m_textField setPlaceholder:hintstring.AsNSString()]; + return true; } #endif diff --git a/Externals/wxWidgets3/src/osx/iphone/toolbar.mm b/Externals/wxWidgets3/src/osx/iphone/toolbar.mm index 4308b3c9f5..589c3f7028 100644 --- a/Externals/wxWidgets3/src/osx/iphone/toolbar.mm +++ b/Externals/wxWidgets3/src/osx/iphone/toolbar.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: toolbar.mm 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -249,6 +248,7 @@ bool wxToolBar::Create( SetPeer(new wxWidgetIPhoneImpl( this, toolbar )); MacPostControlCreate(pos, size) ; + return true; } wxToolBar::~wxToolBar() diff --git a/Externals/wxWidgets3/src/osx/iphone/utils.mm b/Externals/wxWidgets3/src/osx/iphone/utils.mm index d2d0f55ac3..633c7b72ac 100644 --- a/Externals/wxWidgets3/src/osx/iphone/utils.mm +++ b/Externals/wxWidgets3/src/osx/iphone/utils.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: utils.mm 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -39,13 +38,6 @@ #if 1 // wxUSE_BASE -// Emit a beeeeeep -void wxBell() -{ - // would be kSystemSoundID_UserPreferredAlert but since the headers aren't correct, add it manually - AudioServicesPlayAlertSound(0x00001000 ); -} - // ---------------------------------------------------------------------------- // Common Event Support // ---------------------------------------------------------------------------- @@ -57,13 +49,21 @@ void wxBell() @implementation wxAppDelegate +- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + wxUnusedVar(application); + wxUnusedVar(launchOptions); + wxTheApp->OSXOnWillFinishLaunching(); + return YES; +} + - (void)applicationDidFinishLaunching:(UIApplication *)application { - wxTheApp->OnInit(); + wxTheApp->OSXOnDidFinishLaunching(); } - (void)applicationWillTerminate:(UIApplication *)application { - wxCloseEvent event; - wxTheApp->OnEndSession(event); + wxUnusedVar(application); + wxTheApp->OSXOnWillTerminate(); } - (void)dealloc { @@ -91,6 +91,13 @@ void wxApp::DoCleanUp() #if wxUSE_GUI +// Emit a beeeeeep +void wxBell() +{ + // would be kSystemSoundID_UserPreferredAlert but since the headers aren't correct, add it manually + AudioServicesPlayAlertSound(0x00001000 ); +} + // ---------------------------------------------------------------------------- // Launch default browser // ---------------------------------------------------------------------------- @@ -118,6 +125,11 @@ extern UIFont* CreateUIFont( const wxFont& font ) return [UIFont fontWithName:wxCFStringRef(font.GetFaceName() ).AsNSString() size:font.GetPointSize()]; } +CFArrayRef CopyAvailableFontFamilyNames() +{ + return (CFArrayRef) [[UIFont familyNames] retain]; +} + extern void DrawTextInContext( CGContextRef context, CGPoint where, UIFont *font, NSString* text ) { bool contextChanged = ( UIGraphicsGetCurrentContext() != context ); diff --git a/Externals/wxWidgets3/src/osx/iphone/window.mm b/Externals/wxWidgets3/src/osx/iphone/window.mm index 2a71b7fc23..b4b8c4ac36 100644 --- a/Externals/wxWidgets3/src/osx/iphone/window.mm +++ b/Externals/wxWidgets3/src/osx/iphone/window.mm @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2008-06-20 -// RCS-ID: $Id: window.mm 69754 2011-11-14 07:52:33Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -561,10 +560,22 @@ void wxWidgetIPhoneImpl::GetBestRect( wxRect *r ) const bool wxWidgetIPhoneImpl::IsEnabled() const { + UIView* targetView = m_osxView; + // TODO add support for documentViews + + if ( [targetView respondsToSelector:@selector(isEnabled) ] ) + return [targetView isEnabled]; + + return true; } void wxWidgetIPhoneImpl::Enable( bool enable ) { + UIView* targetView = m_osxView; + // TODO add support for documentViews + + if ( [targetView respondsToSelector:@selector(setEnabled:) ] ) + [targetView setEnabled:enable]; } void wxWidgetIPhoneImpl::SetMinimum( wxInt32 v ) @@ -577,10 +588,12 @@ void wxWidgetIPhoneImpl::SetMaximum( wxInt32 v ) wxInt32 wxWidgetIPhoneImpl::GetMinimum() const { + return 0; } wxInt32 wxWidgetIPhoneImpl::GetMaximum() const { + return 0; } void wxWidgetIPhoneImpl::PulseGauge() @@ -595,7 +608,7 @@ void wxWidgetIPhoneImpl::SetControlSize( wxWindowVariant variant ) { } -float wxWidgetIPhoneImpl::GetContentScaleFactor() const +double wxWidgetIPhoneImpl::GetContentScaleFactor() const { if ( [m_osxView respondsToSelector:@selector(contentScaleFactor) ]) return [m_osxView contentScaleFactor]; @@ -779,7 +792,7 @@ void wxWidgetIPhoneImpl::controlTextDidChange() wxTextCtrl* wxpeer = wxDynamicCast((wxWindow*)GetWXPeer(),wxTextCtrl); if ( wxpeer ) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, wxpeer->GetId()); + wxCommandEvent event(wxEVT_TEXT, wxpeer->GetId()); event.SetEventObject( wxpeer ); event.SetString( wxpeer->GetValue() ); wxpeer->HandleWindowEvent( event ); diff --git a/Externals/wxWidgets3/src/osx/listbox_osx.cpp b/Externals/wxWidgets3/src/osx/listbox_osx.cpp index 8d6182dd9b..c48607ea5a 100644 --- a/Externals/wxWidgets3/src/osx/listbox_osx.cpp +++ b/Externals/wxWidgets3/src/osx/listbox_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: listbox_osx.cpp 70685 2012-02-25 22:29:25Z JS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -133,6 +132,11 @@ void wxListBox::FreeData() void wxListBox::DoSetFirstItem(int n) { + // osx actually only has an implementation for ensuring the visibility of a row, it does so + // by scrolling the minimal amount necessary from the current scrolling position. + // in order to get the same behaviour I'd have to make sure first that the last line is visible, + // followed by a scrollRowToVisible for the desired line + GetListPeer()->ListScrollTo( GetCount()-1 ); GetListPeer()->ListScrollTo( n ); } @@ -388,8 +392,8 @@ void wxListBox::SetString(unsigned int n, const wxString& s) void wxListBox::HandleLineEvent( unsigned int n, bool doubleClick ) { - wxCommandEvent event( doubleClick ? wxEVT_COMMAND_LISTBOX_DOUBLECLICKED : - wxEVT_COMMAND_LISTBOX_SELECTED, GetId() ); + wxCommandEvent event( doubleClick ? wxEVT_LISTBOX_DCLICK : + wxEVT_LISTBOX, GetId() ); event.SetEventObject( this ); if ( HasClientObjectData() ) event.SetClientObject( GetClientObject(n) ); diff --git a/Externals/wxWidgets3/src/osx/menu_osx.cpp b/Externals/wxWidgets3/src/osx/menu_osx.cpp index ffd9f3c0e0..2bf5cede9e 100644 --- a/Externals/wxWidgets3/src/osx/menu_osx.cpp +++ b/Externals/wxWidgets3/src/osx/menu_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: menu_osx.cpp 70480 2012-01-30 16:25:22Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -57,7 +56,6 @@ static const int idMenuTitle = -3; void wxMenu::Init() { m_doBreak = false; - m_startRadioGroup = -1; m_allowRearrange = true; m_noEventsMode = false; @@ -89,13 +87,6 @@ void wxMenu::Break() // not available on the mac platform } -void wxMenu::Attach(wxMenuBarBase *menubar) -{ - wxMenuBase::Attach(menubar); - - EndRadioGroup(); -} - void wxMenu::SetAllowRearrange( bool allow ) { m_allowRearrange = allow; @@ -108,18 +99,20 @@ void wxMenu::SetNoEventsMode( bool noEvents ) // function appends a new item or submenu to the menu // append a new item or submenu to the menu -bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) +bool wxMenu::DoInsertOrAppend(wxMenuItem *item, size_t pos) { - wxASSERT_MSG( pItem != NULL, wxT("can't append NULL item to the menu") ); - GetPeer()->InsertOrAppend( pItem, pos ); + wxASSERT_MSG( item != NULL, wxT("can't append NULL item to the menu") ); + GetPeer()->InsertOrAppend( item, pos ); - if ( pItem->IsSeparator() ) + bool check = false; + + if ( item->IsSeparator() ) { // nothing to do here } else { - wxMenu *pSubMenu = pItem->GetSubMenu() ; + wxMenu *pSubMenu = item->GetSubMenu() ; if ( pSubMenu != NULL ) { wxASSERT_MSG( pSubMenu->GetHMenu() != NULL , wxT("invalid submenu added")); @@ -127,10 +120,112 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) pSubMenu->DoRearrange(); } + else if ( item->IsRadio() ) + { + // If a previous or next item is a radio button, add this radio + // button to the existing radio group. Otherwise start a new one + // for it. + wxMenuItemList& items = GetMenuItems(); + + size_t const + posItem = pos == (size_t)-1 ? items.GetCount() - 1 : pos; + + wxMenuItemList::compatibility_iterator node = items.Item(posItem); + wxCHECK_MSG( node, false, wxS("New item must have been inserted") ); + + bool foundGroup = false; + if ( node->GetPrevious() ) + { + wxMenuItem* const prev = node->GetPrevious()->GetData(); + + if ( prev->IsRadio() ) + { + // This item is in the same group as the preceding one so + // we should use the same starting item, but getting it is + // a bit difficult as we can't query the start radio group + // item for it. + const int groupStart = prev->IsRadioGroupStart() + ? posItem - 1 + : prev->GetRadioGroupStart(); + item->SetRadioGroupStart(groupStart); + + // We must also account for the new item by incrementing + // the index of the last item in this group. + wxMenuItem* const first = items.Item(groupStart)->GetData(); + first->SetRadioGroupEnd(first->GetRadioGroupEnd() + 1); + + foundGroup = true; + } + } + + if ( !foundGroup && node->GetNext() ) + { + wxMenuItem* const next = node->GetNext()->GetData(); + + if ( next->IsRadio() ) + { + // This item is the new starting item of this group as the + // previous item is not a radio item. + wxASSERT_MSG( next->IsRadioGroupStart(), + wxS("Where is the start of this group?") ); + + // The index of the last item of the radio group must be + // incremented to account for the new item. + item->SetAsRadioGroupStart(); + item->SetRadioGroupEnd(next->GetRadioGroupEnd() + 1); + + // And the previous start item is not one any longer. + next->SetAsRadioGroupStart(false); + + foundGroup = true; + } + } + + if ( !foundGroup ) + { + // start a new radio group + item->SetAsRadioGroupStart(); + item->SetRadioGroupEnd(posItem); + + // ensure that we have a checked item in the radio group + check = true; + } + } else { - if ( pItem->GetId() == idMenuTitle ) - pItem->GetMenu()->Enable( idMenuTitle, false ); + if ( item->GetId() == idMenuTitle ) + item->GetMenu()->Enable( idMenuTitle, false ); + } + } + + // We also need to update the indices of radio group start and end we store + // in any existing radio items after this item. + if ( pos < GetMenuItemCount() - 1 ) // takes into account pos == -1 case + { + for ( wxMenuItemList::compatibility_iterator + node = GetMenuItems().Item(pos + 1); + node; + node = node->GetNext() ) + { + wxMenuItem* const item = node->GetData(); + if ( item->IsRadio() ) + { + if ( item->IsRadioGroupStart() ) + { + // If the starting item is after the just inserted one, + // then the end one must be after it too and needs to be + // updated. + item->SetRadioGroupEnd(item->GetRadioGroupEnd() + 1); + } + else // Not the first radio group item. + { + // We need to update the start item index only if it is + // after the just inserted item. + const int groupStart = item->GetRadioGroupStart(); + if ( (size_t)groupStart > pos ) + item->SetRadioGroupStart(groupStart + 1); + } + } } } @@ -138,66 +233,18 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) if ( IsAttached() && GetMenuBar()->IsAttached() ) GetMenuBar()->Refresh(); - return true ; -} + if ( check ) + item->Check(true); -void wxMenu::EndRadioGroup() -{ - // we're not inside a radio group any longer - m_startRadioGroup = -1; + return true ; } wxMenuItem* wxMenu::DoAppend(wxMenuItem *item) { - wxCHECK_MSG( item, NULL, wxT("NULL item in wxMenu::DoAppend") ); + if (wxMenuBase::DoAppend(item) && DoInsertOrAppend(item) ) + return item; - bool check = false; - - if ( item->GetKind() == wxITEM_RADIO ) - { - int count = GetMenuItemCount(); - - if ( m_startRadioGroup == -1 ) - { - // start a new radio group - m_startRadioGroup = count; - - // for now it has just one element - item->SetAsRadioGroupStart(); - item->SetRadioGroupEnd(m_startRadioGroup); - - // ensure that we have a checked item in the radio group - check = true; - } - else // extend the current radio group - { - // we need to update its end item - item->SetRadioGroupStart(m_startRadioGroup); - wxMenuItemList::compatibility_iterator node = GetMenuItems().Item(m_startRadioGroup); - - if ( node ) - { - node->GetData()->SetRadioGroupEnd(count); - } - else - { - wxFAIL_MSG( wxT("where is the radio group start item?") ); - } - } - } - else // not a radio item - { - EndRadioGroup(); - } - - if ( !wxMenuBase::DoAppend(item) || !DoInsertOrAppend(item) ) - return NULL; - - if ( check ) - // check the item initially - item->Check(true); - - return item; + return NULL; } wxMenuItem* wxMenu::DoInsert(size_t pos, wxMenuItem *item) @@ -210,14 +257,33 @@ wxMenuItem* wxMenu::DoInsert(size_t pos, wxMenuItem *item) wxMenuItem *wxMenu::DoRemove(wxMenuItem *item) { - if ( m_startRadioGroup != -1 ) + if ( item->IsRadio() ) { // Check if we're removing the item starting the radio group - if ( GetMenuItems().Item(m_startRadioGroup)->GetData() == item ) + if ( item->IsRadioGroupStart() ) { - // Yes, we do, so reset its index as the next item added shouldn't - // count as part of the same radio group anyhow. - m_startRadioGroup = -1; + // Yes, we do, update the next radio group item, if any, to be the + // start one now. + const int endGroup = item->GetRadioGroupEnd(); + + wxMenuItemList::compatibility_iterator + node = GetMenuItems().Item(endGroup); + wxASSERT_MSG( node, wxS("Should have valid radio group end") ); + + while ( node->GetData() != item ) + { + const wxMenuItemList::compatibility_iterator + prevNode = node->GetPrevious(); + wxMenuItem* const prevItem = prevNode->GetData(); + if ( prevItem == item ) + { + prevItem->SetAsRadioGroupStart(); + prevItem->SetRadioGroupEnd(endGroup); + break; + } + + node = prevNode; + } } } @@ -428,7 +494,7 @@ bool wxMenu::HandleCommandProcess( wxMenuItem* item, wxWindow* senderWindow ) { if ( senderWindow != NULL ) { - wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED , menuid); + wxCommandEvent event(wxEVT_MENU , menuid); event.SetEventObject(this); event.SetInt(item->IsCheckable() ? item->IsChecked() : -1); @@ -517,10 +583,37 @@ wxMenuBar* wxMenuBar::s_macCommonMenuBar = NULL ; bool wxMenuBar::s_macAutoWindowMenu = true ; WXHMENU wxMenuBar::s_macWindowMenuHandle = NULL ; + +wxMenu* emptyMenuBar = NULL; + const int firstMenuPos = 1; // to account for the 0th application menu on mac void wxMenuBar::Init() { + if ( emptyMenuBar == NULL ) + { + emptyMenuBar = new wxMenu(); + + wxMenu* appleMenu = new wxMenu(); + appleMenu->SetAllowRearrange(false); +#if !wxOSX_USE_CARBON + // standard menu items, handled in wxMenu::HandleCommandProcess(), see above: + wxString hideLabel; + hideLabel = wxString::Format(_("Hide %s"), wxTheApp ? wxTheApp->GetAppDisplayName() : _("Application")); + appleMenu->Append( wxID_OSX_HIDE, hideLabel + "\tCtrl+H" ); + appleMenu->Append( wxID_OSX_HIDEOTHERS, _("Hide Others")+"\tAlt+Ctrl+H" ); + appleMenu->Append( wxID_OSX_SHOWALL, _("Show All") ); + appleMenu->AppendSeparator(); + + // Do always add "Quit" item unconditionally however, it can't be disabled. + wxString quitLabel; + quitLabel = wxString::Format(_("Quit %s"), wxTheApp ? wxTheApp->GetAppDisplayName() : _("Application")); + appleMenu->Append( wxApp::s_macExitMenuItemId, quitLabel + "\tCtrl+Q" ); +#endif // !wxOSX_USE_CARBON + + emptyMenuBar->AppendSubMenu(appleMenu, "\x14") ; + } + m_eventHandler = this; m_menuBarFrame = NULL; m_rootMenu = new wxMenu(); @@ -598,8 +691,16 @@ wxMenuBar::~wxMenuBar() if (s_macInstalledMenuBar == this) { + emptyMenuBar->GetPeer()->MakeRoot(); s_macInstalledMenuBar = NULL; } + wxDELETE( m_rootMenu ); + // apple menu is a submenu, therefore we don't have to delete it + m_appleMenu = NULL; + + // deleting the root menu also removes all its wxMenu* submenus, therefore + // we must avoid double deleting them in the superclass destructor + m_menus.clear(); } void wxMenuBar::Refresh(bool WXUNUSED(eraseBackground), const wxRect *WXUNUSED(rect)) @@ -616,11 +717,10 @@ void wxMenuBar::MacInstallMenuBar() // hide items in the apple menu that don't exist in the wx menubar - int menuid = 0; wxMenuItem* appleItem = NULL; wxMenuItem* wxItem = NULL; - menuid = wxApp::s_macAboutMenuItemId; + int menuid = wxApp::s_macAboutMenuItemId; appleItem = m_appleMenu->FindItem(menuid); wxItem = FindItem(menuid); if ( appleItem != NULL ) @@ -889,6 +989,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title) return false; m_rootMenu->Insert( pos+firstMenuPos, wxMenuItem::New( m_rootMenu, wxID_ANY, title, "", wxITEM_NORMAL, menu ) ); + menu->SetTitle(title); return true; } diff --git a/Externals/wxWidgets3/src/osx/menuitem_osx.cpp b/Externals/wxWidgets3/src/osx/menuitem_osx.cpp index bf1e4f7931..34a9996173 100644 --- a/Externals/wxWidgets3/src/osx/menuitem_osx.cpp +++ b/Externals/wxWidgets3/src/osx/menuitem_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: menuitem_osx.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -218,9 +217,9 @@ void wxMenuItem::UpdateItemText() // radio group stuff // ----------------- -void wxMenuItem::SetAsRadioGroupStart() +void wxMenuItem::SetAsRadioGroupStart(bool start) { - m_isRadioGroupStart = true; + m_isRadioGroupStart = start; } void wxMenuItem::SetRadioGroupStart(int start) @@ -239,6 +238,27 @@ void wxMenuItem::SetRadioGroupEnd(int end) m_radioGroup.end = end; } +bool wxMenuItem::IsRadioGroupStart() const +{ + return m_isRadioGroupStart; +} + +int wxMenuItem::GetRadioGroupStart() const +{ + wxASSERT_MSG( !m_isRadioGroupStart, + wxS("shouldn't be called for the first radio item") ); + + return m_radioGroup.start; +} + +int wxMenuItem::GetRadioGroupEnd() const +{ + wxASSERT_MSG( m_isRadioGroupStart, + wxS("shouldn't be called for the first radio item") ); + + return m_radioGroup.end; +} + // ---------------------------------------------------------------------------- // wxMenuItemBase // ---------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/src/osx/minifram.cpp b/Externals/wxWidgets3/src/osx/minifram.cpp index 56b0228822..0b5e463efd 100644 --- a/Externals/wxWidgets3/src/osx/minifram.cpp +++ b/Externals/wxWidgets3/src/osx/minifram.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: minifram.cpp 54962 2008-08-03 17:34:59Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/nonownedwnd_osx.cpp b/Externals/wxWidgets3/src/osx/nonownedwnd_osx.cpp index 95a0ba3a14..9e7f1e185c 100644 --- a/Externals/wxWidgets3/src/osx/nonownedwnd_osx.cpp +++ b/Externals/wxWidgets3/src/osx/nonownedwnd_osx.cpp @@ -3,7 +3,6 @@ // Purpose: implementation of wxNonOwnedWindow // Author: Stefan Csomor // Created: 2008-03-24 -// RCS-ID: $Id: nonownedwnd_osx.cpp 70765 2012-03-01 15:04:42Z JS $ // Copyright: (c) Stefan Csomor 2008 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -249,10 +248,7 @@ bool wxNonOwnedWindow::OSXShowWithEffect(bool show, { // as apps expect a size event to occur when the window is shown, // generate one when it is shown with effect too - MacOnInternalSize(); - wxSizeEvent event(GetSize(), m_windowId); - event.SetEventObject(this); - HandleWindowEvent(event); + SendSizeEvent(); } return true; @@ -310,13 +306,9 @@ void wxNonOwnedWindow::HandleActivated( double timestampsec, bool didActivate ) HandleWindowEvent(wxevent); } -void wxNonOwnedWindow::HandleResized( double timestampsec ) +void wxNonOwnedWindow::HandleResized( double WXUNUSED(timestampsec) ) { - MacOnInternalSize(); - wxSizeEvent wxevent( GetSize() , GetId()); - wxevent.SetTimestamp( (int) (timestampsec * 1000) ); - wxevent.SetEventObject( this ); - HandleWindowEvent(wxevent); + SendSizeEvent(); // we have to inform some controls that have to reset things // relative to the toplevel window (e.g. OpenGL buffers) wxWindowMac::MacSuperChangedPosition() ; // like this only children will be notified @@ -387,10 +379,7 @@ bool wxNonOwnedWindow::Show(bool show) if ( show ) { // because apps expect a size event to occur at this moment - MacOnInternalSize(); - wxSizeEvent event(GetSize() , m_windowId); - event.SetEventObject(this); - HandleWindowEvent(event); + SendSizeEvent(); } return true ; @@ -507,6 +496,11 @@ WXWindow wxNonOwnedWindow::GetWXWindow() const return m_nowpeer ? m_nowpeer->GetWXWindow() : NULL; } +void *wxNonOwnedWindow::OSXGetViewOrWindow() const +{ + return GetWXWindow(); +} + // --------------------------------------------------------------------------- // Shape implementation // --------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/src/osx/notebook_osx.cpp b/Externals/wxWidgets3/src/osx/notebook_osx.cpp index 218a984007..59a329d5e7 100644 --- a/Externals/wxWidgets3/src/osx/notebook_osx.cpp +++ b/Externals/wxWidgets3/src/osx/notebook_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: notebook_osx.cpp 70340 2012-01-14 17:57:08Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -173,11 +172,19 @@ wxNotebookPage* wxNotebook::DoRemovePage(size_t nPage) wxNotebookPage* page = m_pages[nPage] ; m_pages.RemoveAt(nPage); + m_images.RemoveAt(nPage); MacSetupTabs(); - if (m_selection >= (int)GetPageCount()) - m_selection = GetPageCount() - 1; + if ( m_selection >= (int)nPage ) + { + if ( GetPageCount() == 0 ) + m_selection = wxNOT_FOUND; + else + m_selection = m_selection ? m_selection - 1 : 0; + + GetPeer()->SetValue( m_selection + 1 ) ; + } if (m_selection >= 0) m_pages[m_selection]->Show(true); @@ -190,7 +197,8 @@ wxNotebookPage* wxNotebook::DoRemovePage(size_t nPage) // remove all pages bool wxNotebook::DeleteAllPages() { - WX_CLEAR_ARRAY(m_pages) ; + WX_CLEAR_ARRAY(m_pages); + m_images.clear(); MacSetupTabs(); m_selection = wxNOT_FOUND ; InvalidateBestSize(); @@ -247,64 +255,7 @@ bool wxNotebook::InsertPage(size_t nPage, int wxNotebook::HitTest(const wxPoint& pt, long *flags) const { - int resultV = wxNOT_FOUND; -#ifdef __WXOSX_CARBON__ - const int countPages = GetPageCount(); - - // we have to convert from Client to Window relative coordinates - wxPoint adjustedPt = pt + GetClientAreaOrigin(); - // and now to HIView native ones - adjustedPt.x -= MacGetLeftBorderSize() ; - adjustedPt.y -= MacGetTopBorderSize() ; - - HIPoint hipoint= { adjustedPt.x , adjustedPt.y } ; - HIViewPartCode outPart = 0 ; - OSStatus err = HIViewGetPartHit( GetPeer()->GetControlRef(), &hipoint, &outPart ); - - int max = GetPeer()->GetMaximum() ; - if ( outPart == 0 && max > 0 ) - { - // this is a hack, as unfortunately a hit on an already selected tab returns 0, - // so we have to go some extra miles to make sure we select something different - // and try again .. - int val = GetPeer()->GetValue() ; - int maxval = max ; - if ( max == 1 ) - { - GetPeer()->SetMaximum( 2 ) ; - maxval = 2 ; - } - - if ( val == 1 ) - GetPeer()->SetValue( maxval ) ; - else - GetPeer()->SetValue( 1 ) ; - - err = HIViewGetPartHit( GetPeer()->GetControlRef(), &hipoint, &outPart ); - - GetPeer()->SetValue( val ) ; - if ( max == 1 ) - GetPeer()->SetMaximum( 1 ) ; - } - - if ( outPart >= 1 && outPart <= countPages ) - resultV = outPart - 1 ; - - if (flags != NULL) - { - *flags = 0; - - // we cannot differentiate better - if (resultV >= 0) - *flags |= wxBK_HITTEST_ONLABEL; - else - *flags |= wxBK_HITTEST_NOWHERE; - } -#else - wxUnusedVar(pt); - wxUnusedVar(flags); -#endif - return resultV; + return GetPeer()->TabHitTest(pt,flags); } // Added by Mark Newsam @@ -342,6 +293,7 @@ void wxNotebook::OnSize(wxSizeEvent& event) pPage->SetSize(rect, wxSIZE_FORCE_EVENT); } +#if 0 // deactivate r65078 for the moment // If the selected page is hidden at this point, the notebook // has become visible for the first time after creation, and // we postponed showing the page in ChangePage(). @@ -355,6 +307,7 @@ void wxNotebook::OnSize(wxSizeEvent& event) pPage->SetFocus(); } } +#endif // Processing continues to next OnSize event.Skip(); @@ -480,6 +433,7 @@ void wxNotebook::ChangePage(int nOldSel, int nSel) if ( nSel != wxNOT_FOUND ) { wxNotebookPage *pPage = m_pages[nSel]; +#if 0 // deactivate r65078 for the moment if ( IsShownOnScreen() ) { pPage->Show( true ); @@ -494,6 +448,10 @@ void wxNotebook::ChangePage(int nOldSel, int nSel) // We Show() the selected page in our OnSize handler, // unless it already is shown. } +#else + pPage->Show( true ); + pPage->SetFocus(); +#endif } m_selection = nSel; @@ -508,7 +466,7 @@ bool wxNotebook::OSXHandleClicked( double WXUNUSED(timestampsec) ) if ( newSel != m_selection ) { wxBookCtrlEvent changing( - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId, + wxEVT_NOTEBOOK_PAGE_CHANGING, m_windowId, newSel , m_selection ); changing.SetEventObject( this ); HandleWindowEvent( changing ); @@ -516,7 +474,7 @@ bool wxNotebook::OSXHandleClicked( double WXUNUSED(timestampsec) ) if ( changing.IsAllowed() ) { wxBookCtrlEvent event( - wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, m_windowId, + wxEVT_NOTEBOOK_PAGE_CHANGED, m_windowId, newSel, m_selection ); event.SetEventObject( this ); HandleWindowEvent( event ); diff --git a/Externals/wxWidgets3/src/osx/palette.cpp b/Externals/wxWidgets3/src/osx/palette.cpp index e232a3241d..ecd9b2da3c 100644 --- a/Externals/wxWidgets3/src/osx/palette.cpp +++ b/Externals/wxWidgets3/src/osx/palette.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: palette.cpp 67216 2011-03-16 10:56:41Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/pen.cpp b/Externals/wxWidgets3/src/osx/pen.cpp index d49f596e70..8f95d03efa 100644 --- a/Externals/wxWidgets3/src/osx/pen.cpp +++ b/Externals/wxWidgets3/src/osx/pen.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: pen.cpp 67681 2011-05-03 16:29:04Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/printdlg_osx.cpp b/Externals/wxWidgets3/src/osx/printdlg_osx.cpp index ef7945fdbf..c84039c272 100644 --- a/Externals/wxWidgets3/src/osx/printdlg_osx.cpp +++ b/Externals/wxWidgets3/src/osx/printdlg_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: printdlg_osx.cpp 70636 2012-02-20 21:55:55Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/radiobox_osx.cpp b/Externals/wxWidgets3/src/osx/radiobox_osx.cpp index 2177d58ee7..d728bd821e 100644 --- a/Externals/wxWidgets3/src/osx/radiobox_osx.cpp +++ b/Externals/wxWidgets3/src/osx/radiobox_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: JS Lair (99/11/15) first implementation // Created: 1998-01-01 -// RCS-ID: $Id: radiobox_osx.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -38,7 +37,7 @@ void wxRadioBox::OnRadioButton( wxCommandEvent &outer ) { if ( outer.IsChecked() ) { - wxCommandEvent event( wxEVT_COMMAND_RADIOBOX_SELECTED, m_windowId ); + wxCommandEvent event( wxEVT_RADIOBOX, m_windowId ); int i = GetSelection() ; event.SetInt(i); event.SetString(GetString(i)); @@ -265,7 +264,7 @@ void wxRadioBox::SetString(unsigned int item,const wxString& label) } // Sets a button by passing the desired position. This does not cause -// wxEVT_COMMAND_RADIOBOX_SELECTED event to get emitted +// wxEVT_RADIOBOX event to get emitted // void wxRadioBox::SetSelection(int item) { diff --git a/Externals/wxWidgets3/src/osx/radiobut_osx.cpp b/Externals/wxWidgets3/src/osx/radiobut_osx.cpp index 96b5140d59..51a7655b7e 100644 --- a/Externals/wxWidgets3/src/osx/radiobut_osx.cpp +++ b/Externals/wxWidgets3/src/osx/radiobut_osx.cpp @@ -4,7 +4,6 @@ // Author: AUTHOR // Modified by: JS Lair (99/11/15) adding the cyclic group notion for radiobox // Created: ??/??/98 -// RCS-ID: $Id: radiobut_osx.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) AUTHOR // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -127,7 +126,7 @@ bool wxRadioButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) SetValue( true ); - wxCommandEvent event2( wxEVT_COMMAND_RADIOBUTTON_SELECTED, m_windowId ); + wxCommandEvent event2( wxEVT_RADIOBUTTON, m_windowId ); event2.SetEventObject( this ); event2.SetInt( true ); ProcessCommand( event2 ); diff --git a/Externals/wxWidgets3/src/osx/scrolbar_osx.cpp b/Externals/wxWidgets3/src/osx/scrolbar_osx.cpp index 495b10c2bd..3d6d8f2961 100644 --- a/Externals/wxWidgets3/src/osx/scrolbar_osx.cpp +++ b/Externals/wxWidgets3/src/osx/scrolbar_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: scrolbar_osx.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/slider_osx.cpp b/Externals/wxWidgets3/src/osx/slider_osx.cpp index 2482cce0fc..5d658fe181 100644 --- a/Externals/wxWidgets3/src/osx/slider_osx.cpp +++ b/Externals/wxWidgets3/src/osx/slider_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: slider_osx.cpp 67243 2011-03-19 08:36:23Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -105,6 +104,7 @@ bool wxSlider::Create(wxWindow *parent, SetPeer(wxWidgetImpl::CreateSlider( this, parent, id, value, minValue, maxValue, pos, size, style, GetExtraStyle() )); +#if 0 if (style & wxSL_VERTICAL) // Forces SetSize to use the proper width SetSizeHints(10, -1, 10, -1); @@ -115,7 +115,8 @@ bool wxSlider::Create(wxWindow *parent, // NB: SetSizeHints is overloaded by wxSlider and will substitute 10 with the // proper dimensions, it also means other people cannot bugger the slider with // other values - +#endif + if (style & wxSL_LABELS) { m_macMinimumStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString ); @@ -297,7 +298,7 @@ void wxSlider::TriggerScrollEvent( wxEventType scrollEvent) event.SetEventObject( this ); HandleWindowEvent( event ); - wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, m_windowId ); + wxCommandEvent cevent( wxEVT_SLIDER, m_windowId ); cevent.SetInt( value ); cevent.SetEventObject( this ); HandleWindowEvent( cevent ); @@ -476,6 +477,7 @@ void wxSlider::DoSetSize(int x, int y, int w, int h, int sizeFlags) // yet another hack since this is a composite control // when wxSlider has it's size hardcoded, we're not allowed to // change the size. But when the control has labels, we DO need + // to resize the internal Mac control to accommodate the text labels. // We need to trick the wxWidgets resize mechanism so that we can // resize the slider part of the control ONLY. @@ -486,7 +488,7 @@ void wxSlider::DoSetSize(int x, int y, int w, int h, int sizeFlags) if (GetWindowStyle() & wxSL_LABELS) { - // make sure we don't allow the entire control to be resized accidently + // make sure we don't allow the entire control to be resized accidentally if (width == GetSize().x) m_minWidth = -1; } diff --git a/Externals/wxWidgets3/src/osx/sound_osx.cpp b/Externals/wxWidgets3/src/osx/sound_osx.cpp index 19422e1a80..8543b2c06d 100644 --- a/Externals/wxWidgets3/src/osx/sound_osx.cpp +++ b/Externals/wxWidgets3/src/osx/sound_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 2009-09-01 -// RCS-ID: $Id: sound_osx.cpp 69178 2011-09-21 15:08:02Z VZ $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/spinbutt_osx.cpp b/Externals/wxWidgets3/src/osx/spinbutt_osx.cpp index c5fde47655..16732ab9a4 100644 --- a/Externals/wxWidgets3/src/osx/spinbutt_osx.cpp +++ b/Externals/wxWidgets3/src/osx/spinbutt_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: spinbutt_osx.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/srchctrl_osx.cpp b/Externals/wxWidgets3/src/osx/srchctrl_osx.cpp index 520bb209e5..00d96f1585 100644 --- a/Externals/wxWidgets3/src/osx/srchctrl_osx.cpp +++ b/Externals/wxWidgets3/src/osx/srchctrl_osx.cpp @@ -3,7 +3,6 @@ // Purpose: implements mac carbon wxSearchCtrl // Author: Vince Harron // Created: 2006-02-19 -// RCS-ID: $Id: srchctrl_osx.cpp 67243 2011-03-19 08:36:23Z SC $ // Copyright: Vince Harron // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -203,7 +202,7 @@ bool wxSearchCtrl::Create(wxWindow *parent, wxWindowID id, bool wxSearchCtrl::HandleSearchFieldSearchHit() { - wxCommandEvent event(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, m_windowId ); + wxCommandEvent event(wxEVT_SEARCHCTRL_SEARCH_BTN, m_windowId ); event.SetEventObject(this); // provide the string to search for directly in the event, this is more @@ -215,7 +214,7 @@ bool wxSearchCtrl::HandleSearchFieldSearchHit() bool wxSearchCtrl::HandleSearchFieldCancelHit() { - wxCommandEvent event(wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, m_windowId ); + wxCommandEvent event(wxEVT_SEARCHCTRL_CANCEL_BTN, m_windowId ); event.SetEventObject(this); return ProcessCommand(event); } diff --git a/Externals/wxWidgets3/src/osx/statbox_osx.cpp b/Externals/wxWidgets3/src/osx/statbox_osx.cpp index b1cbd5f47d..bfdcb53bbf 100644 --- a/Externals/wxWidgets3/src/osx/statbox_osx.cpp +++ b/Externals/wxWidgets3/src/osx/statbox_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: statbox_osx.cpp 67243 2011-03-19 08:36:23Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -40,29 +39,18 @@ bool wxStaticBox::Create( wxWindow *parent, void wxStaticBox::GetBordersForSizer(int *borderTop, int *borderOther) const { - static int extraTop = -1; // Uninitted - static int other = 5; - - if ( extraTop == -1 ) - { - // The minimal border used for the top. - // Later on, the staticbox's font height is added to this. - extraTop = 0; - - // As indicated by the HIG, Panther needs an extra border of 11 - // pixels (otherwise overlapping occurs at the top). The "other" - // border has to be 11. - extraTop = 11; -#if wxOSX_USE_COCOA - other = 17; -#else - other = 11; -#endif - } + static int extraTop = 11; + static int other = 11; *borderTop = extraTop; if ( !m_label.empty() ) + { +#if wxOSX_USE_COCOA + *borderTop += 11; +#else *borderTop += GetCharHeight(); +#endif + } *borderOther = other; } diff --git a/Externals/wxWidgets3/src/osx/statline_osx.cpp b/Externals/wxWidgets3/src/osx/statline_osx.cpp index af4f20ad3c..81b8a9a885 100644 --- a/Externals/wxWidgets3/src/osx/statline_osx.cpp +++ b/Externals/wxWidgets3/src/osx/statline_osx.cpp @@ -3,7 +3,6 @@ // Purpose: a generic wxStaticLine class // Author: Vadim Zeitlin // Created: 28.06.99 -// Version: $Id: statline_osx.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/stattext_osx.cpp b/Externals/wxWidgets3/src/osx/stattext_osx.cpp index e1a033ab2e..a9de6772c1 100644 --- a/Externals/wxWidgets3/src/osx/stattext_osx.cpp +++ b/Externals/wxWidgets3/src/osx/stattext_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: stattext_osx.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -46,6 +45,14 @@ bool wxStaticText::Create( wxWindow *parent, MacPostControlCreate( pos, size ); SetLabel(label); + if ( HasFlag(wxST_NO_AUTORESIZE) ) + { + // Normally this is done in SetLabel() below but we avoid doing it when + // this style is used, so we need to explicitly do it in the ctor in + // this case or otherwise the control would retain its initial tiny size. + InvalidateBestSize(); + SetInitialSize(size); + } return true; } diff --git a/Externals/wxWidgets3/src/osx/textctrl_osx.cpp b/Externals/wxWidgets3/src/osx/textctrl_osx.cpp index cddfdbcdef..dcfc0e15b4 100644 --- a/Externals/wxWidgets3/src/osx/textctrl_osx.cpp +++ b/Externals/wxWidgets3/src/osx/textctrl_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Ryan Norton (MLTE GetLineLength and GetLineText) // Created: 1998-01-01 -// RCS-ID: $Id: textctrl_osx.cpp 70355 2012-01-15 15:54:53Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -285,7 +284,7 @@ void wxTextCtrl::Copy() { if (CanCopy()) { - wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_COPY, GetId()); + wxClipboardTextEvent evt(wxEVT_TEXT_COPY, GetId()); evt.SetEventObject(this); if (!GetEventHandler()->ProcessEvent(evt)) { @@ -298,7 +297,7 @@ void wxTextCtrl::Cut() { if (CanCut()) { - wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_CUT, GetId()); + wxClipboardTextEvent evt(wxEVT_TEXT_CUT, GetId()); evt.SetEventObject(this); if (!GetEventHandler()->ProcessEvent(evt)) { @@ -313,7 +312,7 @@ void wxTextCtrl::Paste() { if (CanPaste()) { - wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_PASTE, GetId()); + wxClipboardTextEvent evt(wxEVT_TEXT_PASTE, GetId()); evt.SetEventObject(this); if (!GetEventHandler()->ProcessEvent(evt)) { @@ -401,7 +400,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) case WXK_RETURN: if (m_windowStyle & wxTE_PROCESS_ENTER) { - wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId); + wxCommandEvent event(wxEVT_TEXT_ENTER, m_windowId); event.SetEventObject( this ); event.SetString( GetValue() ); if ( HandleWindowEvent(event) ) @@ -416,7 +415,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) wxButton *def = wxDynamicCast(tlw->GetDefaultItem(), wxButton); if ( def && def->IsEnabled() ) { - wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, def->GetId() ); + wxCommandEvent event(wxEVT_BUTTON, def->GetId() ); event.SetEventObject(def); def->Command(event); @@ -469,7 +468,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) key == WXK_DELETE || key == WXK_BACK) { - wxCommandEvent event1(wxEVT_COMMAND_TEXT_UPDATED, m_windowId); + wxCommandEvent event1(wxEVT_TEXT, m_windowId); event1.SetEventObject( this ); wxPostEvent( GetEventHandler(), event1 ); } diff --git a/Externals/wxWidgets3/src/osx/textentry_osx.cpp b/Externals/wxWidgets3/src/osx/textentry_osx.cpp index 889e6f6e34..67a858ea8f 100644 --- a/Externals/wxWidgets3/src/osx/textentry_osx.cpp +++ b/Externals/wxWidgets3/src/osx/textentry_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: Kevin Ollivier // Created: 1998-01-01 -// RCS-ID: $Id: textentry_osx.cpp 70379 2012-01-17 21:54:02Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -224,6 +223,23 @@ bool wxTextEntry::IsEditable() const return m_editable ; } +bool wxTextEntry::SendMaxLenEvent() +{ + wxWindow *win = GetEditableWindow(); + wxCHECK_MSG( win, false, "can't send an event without a window" ); + + wxCommandEvent event(wxEVT_TEXT_MAXLEN, win->GetId()); + + // do not do this as it could be very inefficient if the text control + // contains a lot of text and we're not using ref-counted wxString + // implementation -- instead, event.GetString() will query the control for + // its current text if needed + //event.SetString(win->GetValue()); + + event.SetEventObject(win); + return win->HandleWindowEvent(event); +} + // ---------------------------------------------------------------------------- // Undo/redo // ---------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/src/osx/tglbtn_osx.cpp b/Externals/wxWidgets3/src/osx/tglbtn_osx.cpp index 4ccee37f7a..f1ba9cd00e 100644 --- a/Externals/wxWidgets3/src/osx/tglbtn_osx.cpp +++ b/Externals/wxWidgets3/src/osx/tglbtn_osx.cpp @@ -5,7 +5,6 @@ // Author: Stefan Csomor // Modified by: // Created: 08.02.01 -// RCS-ID: $Id: tglbtn_osx.cpp 67949 2011-06-16 00:43:22Z RD $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -31,7 +30,7 @@ // ---------------------------------------------------------------------------- IMPLEMENT_DYNAMIC_CLASS(wxToggleButton, wxControl) -wxDEFINE_EVENT( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEvent ); +wxDEFINE_EVENT( wxEVT_TOGGLEBUTTON, wxCommandEvent ); // ============================================================================ // implementation @@ -94,7 +93,7 @@ void wxToggleButton::Command(wxCommandEvent & event) bool wxToggleButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) { - wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, m_windowId); + wxCommandEvent event(wxEVT_TOGGLEBUTTON, m_windowId); event.SetInt(GetValue()); event.SetEventObject(this); ProcessCommand(event); diff --git a/Externals/wxWidgets3/src/osx/timectrl_osx.cpp b/Externals/wxWidgets3/src/osx/timectrl_osx.cpp index 87a143d043..2ed85d3c20 100644 --- a/Externals/wxWidgets3/src/osx/timectrl_osx.cpp +++ b/Externals/wxWidgets3/src/osx/timectrl_osx.cpp @@ -3,7 +3,6 @@ // Purpose: Implementation of wxTimePickerCtrl for OS X. // Author: Vadim Zeitlin // Created: 2011-12-18 -// RCS-ID: $Id: timectrl_osx.cpp 70071 2011-12-20 21:27:14Z VZ $ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/toolbar_osx.cpp b/Externals/wxWidgets3/src/osx/toolbar_osx.cpp index 59f0720a34..502e1f4573 100644 --- a/Externals/wxWidgets3/src/osx/toolbar_osx.cpp +++ b/Externals/wxWidgets3/src/osx/toolbar_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 04/01/98 -// RCS-ID: $Id: toolbar_osx.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/osx/toplevel_osx.cpp b/Externals/wxWidgets3/src/osx/toplevel_osx.cpp index f0ee0b15b7..b0dc820904 100644 --- a/Externals/wxWidgets3/src/osx/toplevel_osx.cpp +++ b/Externals/wxWidgets3/src/osx/toplevel_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 24.09.01 -// RCS-ID: $Id: toplevel_osx.cpp 70295 2012-01-08 14:52:47Z VZ $ // Copyright: (c) 2001-2004 Stefan Csomor // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -106,7 +105,13 @@ bool wxTopLevelWindowMac::Destroy() if (m_nowpeer && m_nowpeer->GetWXWindow()) ClearKeyboardFocus( (WindowRef)m_nowpeer->GetWXWindow() ); #endif - return wxTopLevelWindowBase::Destroy(); + // delayed destruction: the tlw will be deleted during the next idle + // loop iteration + if ( !wxPendingDelete.Member(this) ) + wxPendingDelete.Append(this); + + Hide(); + return true; } @@ -181,7 +186,8 @@ void wxTopLevelWindowMac::ShowWithoutActivating() m_nowpeer->ShowWithoutActivating(); - // TODO: Should we call EVT_SIZE here? + // because apps expect a size event to occur at this moment + SendSizeEvent(); } bool wxTopLevelWindowMac::ShowFullScreen(bool show, long style) diff --git a/Externals/wxWidgets3/src/osx/uiaction_osx.cpp b/Externals/wxWidgets3/src/osx/uiaction_osx.cpp index 05d858f34b..c916923a3f 100644 --- a/Externals/wxWidgets3/src/osx/uiaction_osx.cpp +++ b/Externals/wxWidgets3/src/osx/uiaction_osx.cpp @@ -4,7 +4,6 @@ // Author: Kevin Ollivier, Steven Lamerton, Vadim Zeitlin // Modified by: // Created: 2010-03-06 -// RCS-ID: $Id: uiaction_osx.cpp 70402 2012-01-19 15:01:01Z SC $ // Copyright: (c) Kevin Ollivier // (c) 2010 Steven Lamerton // (c) 2010 Vadim Zeitlin @@ -26,6 +25,8 @@ #include "wx/osx/private.h" #include "wx/osx/core/cfref.h" +#include "wx/evtloop.h" + namespace { @@ -51,7 +52,53 @@ CGEventType CGEventTypeForMouseButton(int button, bool isDown) return isDown ? kCGEventOtherMouseDown : kCGEventOtherMouseUp; } } + +CGEventType CGEventTypeForMouseDrag(int button) +{ + switch ( button ) + { + case wxMOUSE_BTN_LEFT: + return kCGEventLeftMouseDragged; + break; + + case wxMOUSE_BTN_RIGHT: + return kCGEventRightMouseDragged; + break; + + // All the other buttons use the constant OtherMouseDown but we still + // want to check for invalid parameters so assert first + default: + wxFAIL_MSG("Unsupported button passed in."); + // fall back to the only known remaining case + + case wxMOUSE_BTN_MIDDLE: + return kCGEventOtherMouseDragged; + break; + } +} + +CGMouseButton CGButtonForMouseButton(int button) +{ + switch ( button ) + { + case wxMOUSE_BTN_LEFT: + return kCGMouseButtonLeft; + + case wxMOUSE_BTN_RIGHT: + return kCGMouseButtonRight; + + // All the other buttons use the constant OtherMouseDown but we still + // want to check for invalid parameters so assert first + default: + wxFAIL_MSG("Unsupported button passed in."); + // fall back to the only known remaining case + + case wxMOUSE_BTN_MIDDLE: + return kCGMouseButtonCenter; + } +} + CGPoint GetMousePosition() { int x, y; @@ -70,14 +117,17 @@ bool wxUIActionSimulator::MouseDown(int button) { CGEventType type = CGEventTypeForMouseButton(button, true); wxCFRef event( - CGEventCreateMouseEvent(NULL, type, GetMousePosition(), button)); + CGEventCreateMouseEvent(NULL, type, GetMousePosition(), CGButtonForMouseButton(button))); if ( !event ) return false; CGEventSetType(event, type); CGEventPost(tap, event); - + wxCFEventLoop* loop = dynamic_cast(wxEventLoop::GetActive()); + if (loop) + loop->SetShouldWaitForEvent(true); + return true; } @@ -97,6 +147,10 @@ bool wxUIActionSimulator::MouseMove(long x, long y) CGEventSetType(event, type); CGEventPost(tap, event); + wxCFEventLoop* loop = dynamic_cast(wxEventLoop::GetActive()); + if (loop) + loop->SetShouldWaitForEvent(true); + return true; } @@ -104,14 +158,85 @@ bool wxUIActionSimulator::MouseUp(int button) { CGEventType type = CGEventTypeForMouseButton(button, false); wxCFRef event( - CGEventCreateMouseEvent(NULL, type, GetMousePosition(), button)); + CGEventCreateMouseEvent(NULL, type, GetMousePosition(), CGButtonForMouseButton(button))); if ( !event ) return false; CGEventSetType(event, type); CGEventPost(tap, event); + wxCFEventLoop* loop = dynamic_cast(wxEventLoop::GetActive()); + if (loop) + loop->SetShouldWaitForEvent(true); + + return true; +} +bool wxUIActionSimulator::MouseDblClick(int button) +{ + CGEventType downtype = CGEventTypeForMouseButton(button, true); + CGEventType uptype = CGEventTypeForMouseButton(button, false); + wxCFRef event( + CGEventCreateMouseEvent(NULL, downtype, GetMousePosition(), CGButtonForMouseButton(button))); + + if ( !event ) + return false; + + CGEventSetType(event,downtype); + CGEventPost(tap, event); + + CGEventSetType(event, uptype); + CGEventPost(tap, event); + + CGEventSetIntegerValueField(event, kCGMouseEventClickState, 2); + CGEventSetType(event, downtype); + CGEventPost(tap, event); + + CGEventSetType(event, uptype); + CGEventPost(tap, event); + wxCFEventLoop* loop = dynamic_cast(wxEventLoop::GetActive()); + if (loop) + loop->SetShouldWaitForEvent(true); + + return true; +} + +bool wxUIActionSimulator::MouseDragDrop(long x1, long y1, long x2, long y2, + int button) +{ + CGPoint pos1,pos2; + pos1.x = x1; + pos1.y = y1; + pos2.x = x2; + pos2.y = y2; + + CGEventType downtype = CGEventTypeForMouseButton(button, true); + CGEventType uptype = CGEventTypeForMouseButton(button, false); + CGEventType dragtype = CGEventTypeForMouseDrag(button) ; + + wxCFRef event( + CGEventCreateMouseEvent(NULL, kCGEventMouseMoved, pos1, CGButtonForMouseButton(button))); + + if ( !event ) + return false; + + CGEventSetType(event,kCGEventMouseMoved); + CGEventPost(tap, event); + + CGEventSetType(event,downtype); + CGEventPost(tap, event); + + + CGEventSetType(event, dragtype); + CGEventSetLocation(event,pos2); + CGEventPost(tap, event); + + CGEventSetType(event, uptype); + CGEventPost(tap, event); + wxCFEventLoop* loop = dynamic_cast(wxEventLoop::GetActive()); + if (loop) + loop->SetShouldWaitForEvent(true); + return true; } @@ -126,6 +251,10 @@ wxUIActionSimulator::DoKey(int keycode, int WXUNUSED(modifiers), bool isDown) return false; CGEventPost(kCGHIDEventTap, event); + wxCFEventLoop* loop = dynamic_cast(wxEventLoop::GetActive()); + if (loop) + loop->SetShouldWaitForEvent(true); + return true; } diff --git a/Externals/wxWidgets3/src/osx/utils_osx.cpp b/Externals/wxWidgets3/src/osx/utils_osx.cpp index df16891635..bfcf65f57c 100644 --- a/Externals/wxWidgets3/src/osx/utils_osx.cpp +++ b/Externals/wxWidgets3/src/osx/utils_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: utils_osx.cpp 69543 2011-10-26 05:38:24Z SC $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -35,21 +34,13 @@ // #include "MoreFilesX.h" -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 - #include -#endif +#include #include "wx/osx/private.h" #include "wx/osx/private/timer.h" #include "wx/evtloop.h" -#if defined(__MWERKS__) && wxUSE_UNICODE -#if __MWERKS__ < 0x4100 - #include -#endif -#endif - // Check whether this window wants to process messages, e.g. Stop button // in long calculations. bool wxCheckForInterrupt(wxWindow *WXUNUSED(wnd)) @@ -96,6 +87,7 @@ int wxDisplayDepth() theDepth = 32; // some reasonable default CFRelease(encoding); + CGDisplayModeRelease(currentMode); } else #endif @@ -253,9 +245,26 @@ CGColorSpaceRef wxMacGetGenericRGBColorSpace() CGColorRef wxMacCreateCGColorFromHITheme( ThemeBrush brush ) { - CGColorRef color ; - HIThemeBrushCreateCGColor( brush, &color ); - return color; + const int maxcachedbrush = 58+5; // negative indices are for metabrushes, cache down to -5) + int brushindex = brush+5; + if ( brushindex < 0 || brushindex > maxcachedbrush ) + { + CGColorRef color ; + HIThemeBrushCreateCGColor( brush, &color ); + return color; + } + else + { + static bool inited = false; + static CGColorRef themecolors[maxcachedbrush+1]; + if ( !inited ) + { + for ( int i = 0 ; i <= maxcachedbrush ; ++i ) + HIThemeBrushCreateCGColor( i-5, &themecolors[i] ); + inited = true; + } + return CGColorRetain(themecolors[brushindex ]); + } } //--------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/src/osx/webview_webkit.mm b/Externals/wxWidgets3/src/osx/webview_webkit.mm index 20eee17382..a311bb3d34 100644 --- a/Externals/wxWidgets3/src/osx/webview_webkit.mm +++ b/Externals/wxWidgets3/src/osx/webview_webkit.mm @@ -5,7 +5,6 @@ // Author: Jethro Grassie / Kevin Ollivier / Marianne Gagnon // Modified by: // Created: 2004-4-16 -// RCS-ID: $Id: webview_webkit.mm 69074 2011-09-12 18:35:39Z SJL $ // Copyright: (c) Jethro Grassie / Kevin Ollivier / Marianne Gagnon // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -103,7 +102,6 @@ static pascal OSStatus wxWebKitKeyEventHandler(EventHandlerCallRef handler, UInt32 keyCode ; UInt32 modifiers ; - Point point ; UInt32 when = EventTimeToTicks( GetEventTime( event ) ) ; #if wxUSE_UNICODE @@ -135,13 +133,11 @@ static pascal OSStatus wxWebKitKeyEventHandler(EventHandlerCallRef handler, #endif GetEventParameter(event, kEventParamKeyMacCharCodes, typeChar, NULL, - sizeof(char), NULL, &charCode ); + 1, NULL, &charCode ); GetEventParameter(event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode ); GetEventParameter(event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers ); - GetEventParameter(event, kEventParamMouseLocation, typeQDPoint, NULL, - sizeof(Point), NULL, &point ); UInt32 message = (keyCode << 8) + charCode; switch ( GetEventKind( event ) ) @@ -155,7 +151,7 @@ static pascal OSStatus wxWebKitKeyEventHandler(EventHandlerCallRef handler, wxTheApp->MacSetCurrentEvent( event , handler ) ; if ( /* focus && */ wxTheApp->MacSendKeyDownEvent( - focus, message, modifiers, when, point.h, point.v, uniChar[0])) + focus, message, modifiers, when, uniChar[0])) { result = noErr ; } @@ -165,7 +161,7 @@ static pascal OSStatus wxWebKitKeyEventHandler(EventHandlerCallRef handler, case kEventRawKeyUp : if ( /* focus && */ wxTheApp->MacSendKeyUpEvent( - focus , message , modifiers , when , point.h , point.v , uniChar[0] ) ) + focus , message , modifiers , when , uniChar[0] ) ) { result = noErr ; } @@ -179,8 +175,6 @@ static pascal OSStatus wxWebKitKeyEventHandler(EventHandlerCallRef handler, event.m_controlDown = modifiers & controlKey; event.m_altDown = modifiers & optionKey; event.m_metaDown = modifiers & cmdKey; - event.m_x = point.h; - event.m_y = point.v; #if wxUSE_UNICODE event.m_uniChar = uniChar[0] ; @@ -315,6 +309,15 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxWebViewWebKitEventHandler ) @end +@interface WebViewUIDelegate : NSObject +{ + wxWebViewWebKit* webKitWindow; +} + +- initWithWxWindow: (wxWebViewWebKit*)inWindow; + +@end + //We use a hash to map scheme names to wxWebViewHandler WX_DECLARE_STRING_HASH_MAP(wxSharedPtr, wxStringToWebHandlerMap); @@ -386,6 +389,11 @@ bool wxWebViewWebKit::Create(wxWindow *parent, [m_webView setPolicyDelegate:policyDelegate]; + WebViewUIDelegate* uiDelegate = + [[WebViewUIDelegate alloc] initWithWxWindow: this]; + + [m_webView setUIDelegate:uiDelegate]; + //Register our own class for custom scheme handling [NSURLProtocol registerClass:[WebViewCustomProtocol class]]; @@ -397,14 +405,19 @@ wxWebViewWebKit::~wxWebViewWebKit() { WebViewLoadDelegate* loadDelegate = [m_webView frameLoadDelegate]; WebViewPolicyDelegate* policyDelegate = [m_webView policyDelegate]; + WebViewUIDelegate* uiDelegate = [m_webView UIDelegate]; [m_webView setFrameLoadDelegate: nil]; [m_webView setPolicyDelegate: nil]; + [m_webView setUIDelegate: nil]; if (loadDelegate) [loadDelegate release]; if (policyDelegate) [policyDelegate release]; + + if (uiDelegate) + [uiDelegate release]; } // ---------------------------------------------------------------------------- @@ -448,7 +461,7 @@ void wxWebViewWebKit::Reload(wxWebViewReloadFlags flags) if ( !m_webView ) return; - if (flags & wxWEB_VIEW_RELOAD_NO_CACHE) + if (flags & wxWEBVIEW_RELOAD_NO_CACHE) { // TODO: test this indeed bypasses the cache [[m_webView preferences] setUsesPageCache:NO]; @@ -557,7 +570,7 @@ void wxWebViewWebKit::Print() { [op setShowsPrintPanel: showPrompt]; // in my tests, the progress bar always freezes and it stops the whole - // print operation. do not turn this to true unless there is a + // print operation. do not turn this to true unless there is a // workaround for the bug. [op setShowsProgressPanel: false]; } @@ -585,7 +598,7 @@ void wxWebViewWebKit::SetZoomType(wxWebViewZoomType zoomType) { // there is only one supported zoom type at the moment so this setter // does nothing beyond checking sanity - wxASSERT(zoomType == wxWEB_VIEW_ZOOM_TYPE_TEXT); + wxASSERT(zoomType == wxWEBVIEW_ZOOM_TYPE_TEXT); } wxWebViewZoomType wxWebViewWebKit::GetZoomType() const @@ -593,7 +606,7 @@ wxWebViewZoomType wxWebViewWebKit::GetZoomType() const // for now that's the only one that is supported // FIXME: does the default zoom type change depending on webkit versions? :S // Then this will be wrong - return wxWEB_VIEW_ZOOM_TYPE_TEXT; + return wxWEBVIEW_ZOOM_TYPE_TEXT; } bool wxWebViewWebKit::CanSetZoomType(wxWebViewZoomType type) const @@ -603,7 +616,7 @@ bool wxWebViewWebKit::CanSetZoomType(wxWebViewZoomType type) const // for now that's the only one that is supported // TODO: I know recent versions of webkit support layout zoom too, // check if we can support it - case wxWEB_VIEW_ZOOM_TYPE_TEXT: + case wxWEBVIEW_ZOOM_TYPE_TEXT: return true; default: @@ -631,10 +644,11 @@ void wxWebViewWebKit::SetScrollPos(int pos) wxString wxWebViewWebKit::GetSelectedText() const { - NSString* selection = [[m_webView selectedDOMRange] markupString]; - if (!selection) return wxEmptyString; + DOMRange* dr = [m_webView selectedDOMRange]; + if ( !dr ) + return wxString(); - return wxStringWithNSString(selection); + return wxStringWithNSString([dr toString]); } void wxWebViewWebKit::RunScript(const wxString& javascript) @@ -648,7 +662,7 @@ void wxWebViewWebKit::RunScript(const wxString& javascript) void wxWebViewWebKit::OnSize(wxSizeEvent &event) { -#if defined(__WXMAC_) && wxOSX_USE_CARBON +#if defined(__WXMAC__) && wxOSX_USE_CARBON // This is a nasty hack because WebKit seems to lose its position when it is // embedded in a control that is not itself the content view for a TLW. // I put it in OnSize because these calcs are not perfect, and in fact are @@ -694,7 +708,7 @@ void wxWebViewWebKit::OnSize(wxSizeEvent &event) // we want is the root view, because we need to make the y origin relative // to the very top of the window, not its contents, since we later flip // the y coordinate for Cocoa. - HIViewConvertRect (&rect, m_peer->GetControlRef(), + HIViewConvertRect (&rect, GetPeer()->GetControlRef(), HIViewGetRoot( (WindowRef) MacGetTopLevelWindowRef() )); @@ -768,28 +782,28 @@ wxWebViewZoom wxWebViewWebKit::GetZoom() const // arbitrary way to map float zoom to our common zoom enum if (zoom <= 0.55) { - return wxWEB_VIEW_ZOOM_TINY; + return wxWEBVIEW_ZOOM_TINY; } else if (zoom > 0.55 && zoom <= 0.85) { - return wxWEB_VIEW_ZOOM_SMALL; + return wxWEBVIEW_ZOOM_SMALL; } else if (zoom > 0.85 && zoom <= 1.15) { - return wxWEB_VIEW_ZOOM_MEDIUM; + return wxWEBVIEW_ZOOM_MEDIUM; } else if (zoom > 1.15 && zoom <= 1.45) { - return wxWEB_VIEW_ZOOM_LARGE; + return wxWEBVIEW_ZOOM_LARGE; } else if (zoom > 1.45) { - return wxWEB_VIEW_ZOOM_LARGEST; + return wxWEBVIEW_ZOOM_LARGEST; } // to shut up compilers, this can never be reached logically wxASSERT(false); - return wxWEB_VIEW_ZOOM_MEDIUM; + return wxWEBVIEW_ZOOM_MEDIUM; } void wxWebViewWebKit::SetZoom(wxWebViewZoom zoom) @@ -797,23 +811,23 @@ void wxWebViewWebKit::SetZoom(wxWebViewZoom zoom) // arbitrary way to map our common zoom enum to float zoom switch (zoom) { - case wxWEB_VIEW_ZOOM_TINY: + case wxWEBVIEW_ZOOM_TINY: SetWebkitZoom(0.4f); break; - case wxWEB_VIEW_ZOOM_SMALL: + case wxWEBVIEW_ZOOM_SMALL: SetWebkitZoom(0.7f); break; - case wxWEB_VIEW_ZOOM_MEDIUM: + case wxWEBVIEW_ZOOM_MEDIUM: SetWebkitZoom(1.0f); break; - case wxWEB_VIEW_ZOOM_LARGE: + case wxWEBVIEW_ZOOM_LARGE: SetWebkitZoom(1.3); break; - case wxWEB_VIEW_ZOOM_LARGEST: + case wxWEBVIEW_ZOOM_LARGEST: SetWebkitZoom(1.6); break; @@ -823,7 +837,7 @@ void wxWebViewWebKit::SetZoom(wxWebViewZoom zoom) } -void wxWebViewWebKit::SetPage(const wxString& src, const wxString& baseUrl) +void wxWebViewWebKit::DoSetPage(const wxString& src, const wxString& baseUrl) { if ( !m_webView ) return; @@ -891,20 +905,18 @@ void wxWebViewWebKit::SelectAll() wxString wxWebViewWebKit::GetSelectedSource() const { - wxString script = ("var range = window.getSelection().getRangeAt(0);" - "var element = document.createElement('div');" - "element.appendChild(range.cloneContents());" - "return element.innerHTML;"); - id result = [[m_webView windowScriptObject] - evaluateWebScript:wxNSStringWithWxString(script)]; - return wxStringWithNSString([result stringValue]); + DOMRange* dr = [m_webView selectedDOMRange]; + if ( !dr ) + return wxString(); + + return wxStringWithNSString([dr markupString]); } wxString wxWebViewWebKit::GetPageText() const { - id result = [[m_webView windowScriptObject] - evaluateWebScript:@"document.body.textContent"]; - return wxStringWithNSString([result stringValue]); + NSString *result = [m_webView stringByEvaluatingJavaScriptFromString: + @"document.body.textContent"]; + return wxStringWithNSString(result); } void wxWebViewWebKit::EnableHistory(bool enable) @@ -1018,7 +1030,7 @@ void wxWebViewWebKit::RegisterHandler(wxSharedPtr handler) if (webKitWindow && frame == [sender mainFrame]){ NSString *url = [[[[frame dataSource] request] URL] absoluteString]; wxString target = wxStringWithNSString([frame name]); - wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NAVIGATED, + wxWebViewEvent event(wxEVT_WEBVIEW_NAVIGATED, webKitWindow->GetId(), wxStringWithNSString( url ), target); @@ -1036,7 +1048,7 @@ void wxWebViewWebKit::RegisterHandler(wxSharedPtr handler) NSString *url = [[[[frame dataSource] request] URL] absoluteString]; wxString target = wxStringWithNSString([frame name]); - wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_LOADED, + wxWebViewEvent event(wxEVT_WEBVIEW_LOADED, webKitWindow->GetId(), wxStringWithNSString( url ), target); @@ -1048,7 +1060,7 @@ void wxWebViewWebKit::RegisterHandler(wxSharedPtr handler) wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) { - *out = wxWEB_NAV_ERR_OTHER; + *out = wxWEBVIEW_NAV_ERR_OTHER; if ([[error domain] isEqualToString:NSURLErrorDomain]) { @@ -1057,7 +1069,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) case NSURLErrorCannotFindHost: case NSURLErrorFileDoesNotExist: case NSURLErrorRedirectToNonExistentLocation: - *out = wxWEB_NAV_ERR_NOT_FOUND; + *out = wxWEBVIEW_NAV_ERR_NOT_FOUND; break; case NSURLErrorResourceUnavailable: @@ -1067,7 +1079,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) #endif case NSURLErrorBadURL: case NSURLErrorFileIsDirectory: - *out = wxWEB_NAV_ERR_REQUEST; + *out = wxWEBVIEW_NAV_ERR_REQUEST; break; case NSURLErrorTimedOut: @@ -1078,21 +1090,21 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) //case NSURLErrorInternationalRoamingOff: //case NSURLErrorCallIsActive: //case NSURLErrorDataNotAllowed: - *out = wxWEB_NAV_ERR_CONNECTION; + *out = wxWEBVIEW_NAV_ERR_CONNECTION; break; case NSURLErrorCancelled: case NSURLErrorUserCancelledAuthentication: - *out = wxWEB_NAV_ERR_USER_CANCELLED; + *out = wxWEBVIEW_NAV_ERR_USER_CANCELLED; break; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 case NSURLErrorCannotDecodeRawData: case NSURLErrorCannotDecodeContentData: case NSURLErrorCannotParseResponse: #endif case NSURLErrorBadServerResponse: - *out = wxWEB_NAV_ERR_REQUEST; + *out = wxWEBVIEW_NAV_ERR_REQUEST; break; case NSURLErrorUserAuthenticationRequired: @@ -1100,11 +1112,11 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 case NSURLErrorClientCertificateRequired: #endif - *out = wxWEB_NAV_ERR_AUTH; + *out = wxWEBVIEW_NAV_ERR_AUTH; break; case NSURLErrorNoPermissionsToReadFile: - *out = wxWEB_NAV_ERR_SECURITY; + *out = wxWEBVIEW_NAV_ERR_SECURITY; break; case NSURLErrorServerCertificateHasBadDate: @@ -1112,7 +1124,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) case NSURLErrorServerCertificateHasUnknownRoot: case NSURLErrorServerCertificateNotYetValid: case NSURLErrorClientCertificateRejected: - *out = wxWEB_NAV_ERR_CERTIFICATE; + *out = wxWEBVIEW_NAV_ERR_CERTIFICATE; break; } } @@ -1136,7 +1148,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) wxWebViewNavigationError type; wxString description = nsErrorToWxHtmlError(error, &type); - wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_ERROR, + wxWebViewEvent event(wxEVT_WEBVIEW_ERROR, webKitWindow->GetId(), wxStringWithNSString( url ), wxEmptyString); @@ -1162,7 +1174,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) wxWebViewNavigationError type; wxString description = nsErrorToWxHtmlError(error, &type); - wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_ERROR, + wxWebViewEvent event(wxEVT_WEBVIEW_ERROR, webKitWindow->GetId(), wxStringWithNSString( url ), wxEmptyString); @@ -1178,11 +1190,11 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) forFrame:(WebFrame *)frame { wxString target = wxStringWithNSString([frame name]); - wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_TITLE_CHANGED, + wxWebViewEvent event(wxEVT_WEBVIEW_TITLE_CHANGED, webKitWindow->GetId(), webKitWindow->GetCurrentURL(), target); - + event.SetString(wxStringWithNSString(title)); if (webKitWindow && webKitWindow->GetEventHandler()) @@ -1210,7 +1222,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) webKitWindow->m_busy = true; NSString *url = [[request URL] absoluteString]; wxString target = wxStringWithNSString([frame name]); - wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NAVIGATING, + wxWebViewEvent event(wxEVT_WEBVIEW_NAVIGATING, webKitWindow->GetId(), wxStringWithNSString( url ), target); @@ -1228,7 +1240,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) } } -- (void)webView:(WebView *)sender +- (void)webView:(WebView *)sender decidePolicyForNewWindowAction:(NSDictionary *)actionInformation request:(NSURLRequest *)request newFrameName:(NSString *)frameName @@ -1237,7 +1249,7 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) wxUnusedVar(actionInformation); NSString *url = [[request URL] absoluteString]; - wxWebViewEvent event(wxEVT_COMMAND_WEB_VIEW_NEWWINDOW, + wxWebViewEvent event(wxEVT_WEBVIEW_NEWWINDOW, webKitWindow->GetId(), wxStringWithNSString( url ), ""); @@ -1277,26 +1289,38 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) NSURLRequest *request = [self request]; NSString* path = [[request URL] absoluteString]; + id client = [self client]; + wxString wxpath = wxStringWithNSString(path); wxString scheme = wxStringWithNSString([[request URL] scheme]); wxFSFile* file = g_stringHandlerMap[scheme]->GetFile(wxpath); + + if (!file) + { + NSError *error = [[NSError alloc] initWithDomain:NSURLErrorDomain + code:NSURLErrorFileDoesNotExist + userInfo:nil]; + + [client URLProtocol:self didFailWithError:error]; + + return; + } + size_t length = file->GetStream()->GetLength(); NSURLResponse *response = [[NSURLResponse alloc] initWithURL:[request URL] MIMEType:wxNSStringWithWxString(file->GetMimeType()) - expectedContentLength:length + expectedContentLength:length textEncodingName:nil]; - + //Load the data, we malloc it so it is tidied up properly void* buffer = malloc(length); file->GetStream()->Read(buffer, length); NSData *data = [[NSData alloc] initWithBytesNoCopy:buffer length:length]; - - id client = [self client]; //We do not support caching anything yet - [client URLProtocol:self didReceiveResponse:response + [client URLProtocol:self didReceiveResponse:response cacheStoragePolicy:NSURLCacheStorageNotAllowed]; //Set the data @@ -1315,4 +1339,32 @@ wxString nsErrorToWxHtmlError(NSError* error, wxWebViewNavigationError* out) @end + +@implementation WebViewUIDelegate + +- initWithWxWindow: (wxWebViewWebKit*)inWindow +{ + [super init]; + webKitWindow = inWindow; // non retained + return self; +} + +- (void)webView:(WebView *)sender printFrameView:(WebFrameView *)frameView +{ + wxUnusedVar(sender); + wxUnusedVar(frameView); + + webKitWindow->Print(); +} + +- (NSArray *)webView:(WebView *)sender contextMenuItemsForElement:(NSDictionary *)element + defaultMenuItems:(NSArray *) defaultMenuItems +{ + if(webKitWindow->IsContextMenuEnabled()) + return defaultMenuItems; + else + return nil; +} +@end + #endif //wxUSE_WEBVIEW && wxUSE_WEBVIEW_WEBKIT diff --git a/Externals/wxWidgets3/src/osx/window_osx.cpp b/Externals/wxWidgets3/src/osx/window_osx.cpp index 5021bebb0d..afbf5a0a32 100644 --- a/Externals/wxWidgets3/src/osx/window_osx.cpp +++ b/Externals/wxWidgets3/src/osx/window_osx.cpp @@ -4,7 +4,6 @@ // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 -// RCS-ID: $Id: window_osx.cpp 70765 2012-03-01 15:04:42Z JS $ // Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -301,6 +300,11 @@ wxOSXWidgetImpl* wxWindowMac::GetPeer() const return m_peer == kOSXNoWidgetImpl ? NULL : m_peer ; } +bool wxWindowMac::ShouldCreatePeer() const +{ + return m_peer != kOSXNoWidgetImpl; +} + void wxWindowMac::DontCreatePeer() { m_peer = kOSXNoWidgetImpl; @@ -345,7 +349,11 @@ void wxWindowMac::SetPeer(wxOSXWidgetImpl* peer) GetParent()->MacChildAdded() ; // adjust font, controlsize etc - DoSetWindowVariant( m_windowVariant ) ; + GetPeer()->SetControlSize( m_windowVariant ); + InheritAttributes(); + // in case nothing has been set, use the variant default fonts + if ( !m_hasFont ) + DoSetWindowVariant( m_windowVariant ); GetPeer()->SetLabel( wxStripMenuCodes(m_label, wxStrip_Mnemonics), GetFont().GetEncoding() ) ; @@ -378,7 +386,7 @@ bool wxWindowMac::MacIsUserPane() const /* * Right now we have the following setup : * a border that is not part of the native control is always outside the - * control's border (otherwise we loose all native intelligence, future ways + * control's border (otherwise we lose all native intelligence, future ways * may be to have a second embedding control responsible for drawing borders * and backgrounds eventually) * so all this border calculations have to be taken into account when calling @@ -407,6 +415,9 @@ bool wxWindowMac::Create(wxWindowMac *parent, m_windowVariant = parent->GetWindowVariant() ; + m_hScrollBarAlwaysShown = + m_vScrollBarAlwaysShown = HasFlag(wxALWAYS_SHOW_SB); + if ( m_peer != kOSXNoWidgetImpl ) { SetPeer(wxWidgetImpl::CreateUserPane( this, parent, id, pos, size , style, GetExtraStyle() )); @@ -484,39 +495,6 @@ void wxWindowMac::DoSetWindowVariant( wxWindowVariant variant ) return; GetPeer()->SetControlSize( variant ); -#if wxOSX_USE_CARBON - ControlSize size ; - - // we will get that from the settings later - // and make this NORMAL later, but first - // we have a few calculations that we must fix - - switch ( variant ) - { - case wxWINDOW_VARIANT_NORMAL : - size = kControlSizeNormal; - break ; - - case wxWINDOW_VARIANT_SMALL : - size = kControlSizeSmall; - break ; - - case wxWINDOW_VARIANT_MINI : - // not always defined in the headers - size = 3 ; - break ; - - case wxWINDOW_VARIANT_LARGE : - size = kControlSizeLarge; - break ; - - default: - wxFAIL_MSG(wxT("unexpected window variant")); - break ; - } - GetPeer()->SetData(kControlEntireControl, kControlSizeTag, &size ) ; -#endif - switch ( variant ) { @@ -630,6 +608,27 @@ void wxWindowMac::SetFocus() GetPeer()->SetFocus() ; } +void wxWindowMac::OSXSimulateFocusEvents() +{ + wxWindow* former = FindFocus() ; + if ( former != NULL && former != this ) + { + { + wxFocusEvent event( wxEVT_KILL_FOCUS, former->GetId()); + event.SetEventObject(former); + event.SetWindow(this); + former->HandleWindowEvent(event) ; + } + + { + wxFocusEvent event(wxEVT_SET_FOCUS, former->GetId()); + event.SetEventObject(former); + event.SetWindow(this); + former->HandleWindowEvent(event); + } + } +} + void wxWindowMac::DoCaptureMouse() { wxApp::s_captureWindow = (wxWindow*) this ; @@ -655,10 +654,8 @@ void wxWindowMac::SetDropTarget(wxDropTarget *pDropTarget) delete m_dropTarget; m_dropTarget = pDropTarget; - if ( m_dropTarget != NULL ) - { - // TODO: - } + + GetPeer()->SetDropTarget(m_dropTarget) ; } #endif @@ -877,9 +874,22 @@ void wxWindowMac::DoGetClientSize( int *x, int *y ) const #endif if (x) - *x = ww; + { + // we shouldn't return invalid width + if ( ww < 0 ) + ww = 0; + + *x = ww; + } + if (y) - *y = hh; + { + // we shouldn't return invalid height + if ( hh < 0 ) + hh = 0; + + *y = hh; + } } bool wxWindowMac::SetCursor(const wxCursor& cursor) @@ -1065,11 +1075,7 @@ void wxWindowMac::DoMoveWindow(int x, int y, int width, int height) if ( doResize ) { MacRepositionScrollBars() ; - MacOnInternalSize(); - wxSize size(actualWidth, actualHeight); - wxSizeEvent event(size, m_windowId); - event.SetEventObject(this); - HandleWindowEvent(event); + SendSizeEvent(); } } } @@ -1123,6 +1129,12 @@ wxSize wxWindowMac::DoGetBestSize() const } } +void wxWindowMac::SendSizeEvent(int flags) +{ + MacOnInternalSize(); + wxWindowBase::SendSizeEvent(flags); +} + // set the size of the window: if the dimensions are positive, just use them, // but if any of them is equal to -1, it means that we must find the value for // it ourselves (unless sizeFlags contains wxSIZE_ALLOW_MINUS_ONE flag, in @@ -1149,10 +1161,7 @@ void wxWindowMac::DoSetSize(int x, int y, int width, int height, int sizeFlags) if (sizeFlags & wxSIZE_FORCE_EVENT) { - MacOnInternalSize(); - wxSizeEvent event( wxSize(width,height), GetId() ); - event.SetEventObject( this ); - HandleWindowEvent( event ); + SendSizeEvent(); } return; @@ -1225,7 +1234,7 @@ void wxWindowMac::DoSetClientSize(int clientwidth, int clientheight) } } -float wxWindowMac::GetContentScaleFactor() const +double wxWindowMac::GetContentScaleFactor() const { return GetPeer()->GetContentScaleFactor(); } @@ -1311,7 +1320,6 @@ void wxWindowMac::MacHiliteChanged() void wxWindowMac::MacEnabledStateChanged() { - OnEnabled( GetPeer()->IsEnabled() ); } // @@ -1392,27 +1400,23 @@ void wxWindowMac::Refresh(bool WXUNUSED(eraseBack), const wxRect *rect) if ( !IsShownOnScreen() ) return ; + + if ( IsFrozen() ) + return; GetPeer()->SetNeedsDisplay( rect ) ; } void wxWindowMac::DoFreeze() { -#if wxOSX_USE_CARBON if ( GetPeer() && GetPeer()->IsOk() ) GetPeer()->SetDrawingEnabled( false ) ; -#endif } void wxWindowMac::DoThaw() { -#if wxOSX_USE_CARBON if ( GetPeer() && GetPeer()->IsOk() ) - { GetPeer()->SetDrawingEnabled( true ) ; - GetPeer()->InvalidateWithChildren() ; - } -#endif } wxWindow *wxGetActiveWindow() @@ -1688,10 +1692,7 @@ void wxWindowMac::DoUpdateScrollbarVisibility() MacRepositionScrollBars() ; if ( triggerSizeEvent ) { - MacOnInternalSize(); - wxSizeEvent event(GetSize(), m_windowId); - event.SetEventObject(this); - HandleWindowEvent(event); + SendSizeEvent(); } #endif } @@ -1825,6 +1826,8 @@ bool wxWindowMac::MacSetupCursor( const wxPoint& pt ) if ( wxRect2DInt( clientorigin.x , clientorigin.y , clientsize.x , clientsize.y ).Contains( wxPoint2DInt( pt ) ) ) { wxSetCursorEvent event( pt.x , pt.y ); + event.SetId(GetId()); + event.SetEventObject(this); bool processedEvtSetCursor = HandleWindowEvent(event); if ( processedEvtSetCursor && event.HasCursor() ) @@ -2200,7 +2203,8 @@ bool wxWindowMac::MacHasScrollBarCorner() const const wxFrame *frame = wxDynamicCast( win, wxFrame ) ; if ( frame ) { - if ( frame->GetWindowStyleFlag() & wxRESIZE_BORDER ) + // starting from 10.7 there are no resize indicators anymore + if ( (frame->GetWindowStyleFlag() & wxRESIZE_BORDER) && UMAGetSystemVersion() < 0x1070) { // Parent frame has resize handle wxPoint frameBottomRight = frame->GetScreenRect().GetBottomRight(); @@ -2531,7 +2535,7 @@ Rect wxMacGetBoundsForControl( wxWindowMac* window , const wxPoint& pos , const int x, y, w, h ; window->MacGetBoundsForControl( pos , size , x , y, w, h , adjustForOrigin ) ; - Rect bounds = { y, x, y + h, x + w }; + Rect bounds = { static_cast(y), static_cast(x), static_cast(y + h), static_cast(x + w) }; return bounds ; } @@ -2541,6 +2545,11 @@ bool wxWindowMac::OSXHandleClicked( double WXUNUSED(timestampsec) ) return false; } +void *wxWindowMac::OSXGetViewOrWindow() const +{ + return GetHandle(); +} + wxInt32 wxWindowMac::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF event ) { #if wxOSX_USE_COCOA_OR_CARBON @@ -2630,20 +2639,18 @@ wxHotKeyHandler(EventHandlerCallRef WXUNUSED(nextHandler), unsigned char charCode ; UInt32 keyCode ; UInt32 modifiers ; - Point where ; UInt32 when = EventTimeToTicks( GetEventTime( event ) ) ; - GetEventParameter( event, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &charCode ); + GetEventParameter( event, kEventParamKeyMacCharCodes, typeChar, NULL, 1, NULL, &charCode ); GetEventParameter( event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode ); GetEventParameter( event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &modifiers ); - GetEventParameter( event, kEventParamMouseLocation, typeQDPoint, NULL, sizeof(Point), NULL, &where ); UInt32 keymessage = (keyCode << 8) + charCode; wxKeyEvent wxevent(wxEVT_HOTKEY); wxevent.SetId(hotKeyId.id); wxTheApp->MacCreateKeyEvent( wxevent, s_hotkeys[i].window , keymessage , - modifiers , when , where.h , where.v , 0 ) ; + modifiers , when , 0 ) ; s_hotkeys[i].window->HandleWindowEvent(wxevent); } @@ -2713,7 +2720,7 @@ bool wxWindowMac::RegisterHotKey(int hotkeyId, int modifiers, int keycode) bool wxWindowMac::UnregisterHotKey(int hotkeyId) { - for ( unsigned i = s_hotkeys.size()-1; i>=0; -- i ) + for ( int i = ((int)s_hotkeys.size())-1; i>=0; -- i ) { if ( s_hotkeys[i].keyId == hotkeyId ) { @@ -2752,13 +2759,13 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event ) { wxEvtHandler * const handler = ancestor->GetEventHandler(); - wxCommandEvent command_event( wxEVT_COMMAND_MENU_SELECTED, command ); + wxCommandEvent command_event( wxEVT_MENU, command ); handled = handler->ProcessEvent( command_event ); if ( !handled ) { // accelerators can also be used with buttons, try them too - command_event.SetEventType(wxEVT_COMMAND_BUTTON_CLICKED); + command_event.SetEventType(wxEVT_BUTTON); handled = handler->ProcessEvent( command_event ); } @@ -2787,6 +2794,10 @@ bool wxWindowMac::OSXHandleKeyEvent( wxKeyEvent& event ) // wxWidgetImpl // +// we are maintaining a n:1 map from native controls (ControlRef / NSView*) to their wxWidgetImpl +// n:1 because we might have an embedded view eg within a scrollview, both being part of the same impl +// the impl is calling Associate with its newly created native control(s), e.g. in InstallHandler + WX_DECLARE_HASH_MAP(WXWidget, wxWidgetImpl*, wxPointerHash, wxPointerEqual, MacControlMap); static MacControlMap wxWinMacControlList; @@ -2886,3 +2897,7 @@ bool wxWidgetImpl::NeedsFrame() const { return m_needsFrame; } + +void wxWidgetImpl::SetDrawingEnabled(bool WXUNUSED(enabled)) +{ +} diff --git a/Externals/wxWidgets3/src/unix/apptraits.cpp b/Externals/wxWidgets3/src/unix/apptraits.cpp index e4f7098042..d29f9acdbb 100644 --- a/Externals/wxWidgets3/src/unix/apptraits.cpp +++ b/Externals/wxWidgets3/src/unix/apptraits.cpp @@ -3,7 +3,6 @@ // Purpose: implementation of wxGUIAppTraits for Unix systems // Author: Vadim Zeitlin // Created: 2008-03-22 -// RCS-ID: $Id: apptraits.cpp 52742 2008-03-23 18:24:27Z PC $ // Copyright: (c) 2008 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -30,6 +29,7 @@ #endif // WX_PRECOMP #include "wx/unix/execute.h" +#include "wx/evtloop.h" // ============================================================================ // implementation @@ -37,47 +37,15 @@ int wxGUIAppTraits::WaitForChild(wxExecuteData& execData) { - const int flags = execData.flags; - if ( !(flags & wxEXEC_SYNC) || (flags & wxEXEC_NOEVENTS) ) - { - // async or blocking sync cases are already handled by the base class - // just fine, no need to duplicate its code here - return wxAppTraits::WaitForChild(execData); - } - - // here we're dealing with the case of synchronous execution when we want - // to process the GUI events while waiting for the child termination - - wxEndProcessData endProcData; - endProcData.pid = execData.pid; - endProcData.tag = AddProcessCallback - ( - &endProcData, - execData.GetEndProcReadFD() - ); - endProcData.async = false; - - // prepare to wait for the child termination: show to the user that we're // busy and refuse all input unless explicitly told otherwise wxBusyCursor bc; - wxWindowDisabler wd(!(flags & wxEXEC_NODISABLE)); + wxWindowDisabler wd(!(execData.flags & wxEXEC_NODISABLE)); - // endProcData.pid will be set to 0 from wxHandleProcessTermination() when - // the process terminates - while ( endProcData.pid != 0 ) - { - // don't consume 100% of the CPU while we're sitting in this - // loop - if ( !CheckForRedirectedIO(execData) ) - wxMilliSleep(1); - - // give the toolkit a chance to call wxHandleProcessTermination() here - // and also repaint the GUI and handle other accumulated events - wxYield(); - } - - return endProcData.exitcode; + // Allocate an event loop that will be used to wait for the process + // to terminate, will handle stdout, stderr, and any other events and pass + // it to the common (to console and GUI) code which will run it. + wxGUIEventLoop loop; + return RunLoopUntilChildExit(execData, loop); } - diff --git a/Externals/wxWidgets3/src/unix/appunix.cpp b/Externals/wxWidgets3/src/unix/appunix.cpp index 5c6f8e5e00..62f0c79ec9 100644 --- a/Externals/wxWidgets3/src/unix/appunix.cpp +++ b/Externals/wxWidgets3/src/unix/appunix.cpp @@ -3,7 +3,6 @@ // Purpose: wxAppConsole with wxMainLoop implementation // Author: Lukasz Michalski // Created: 28/01/2005 -// RCS-ID: $Id: appunix.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Lukasz Michalski // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -20,6 +19,10 @@ #endif #include "wx/evtloop.h" +#include "wx/scopedptr.h" +#include "wx/unix/private/wakeuppipe.h" +#include "wx/private/fdiodispatcher.h" +#include "wx/private/fdioeventloopsourcehandler.h" #include #include @@ -29,6 +32,58 @@ #define SA_RESTART 0 #endif +// ---------------------------------------------------------------------------- +// Helper class calling CheckSignal() on wake up +// ---------------------------------------------------------------------------- + +namespace +{ + +class SignalsWakeUpPipe : public wxWakeUpPipe +{ +public: + // Ctor automatically registers this pipe with the event loop. + SignalsWakeUpPipe() + { + m_source = wxEventLoopBase::AddSourceForFD + ( + GetReadFd(), + this, + wxEVENT_SOURCE_INPUT + ); + } + + virtual void OnReadWaiting() + { + // The base class wxWakeUpPipe::OnReadWaiting() needs to be called in order + // to read the data out of the wake up pipe and clear it for next time. + wxWakeUpPipe::OnReadWaiting(); + + if ( wxTheApp ) + wxTheApp->CheckSignal(); + } + + virtual ~SignalsWakeUpPipe() + { + delete m_source; + } + +private: + wxEventLoopSource* m_source; +}; + +} // anonymous namespace + +wxAppConsole::wxAppConsole() +{ + m_signalWakeUpPipe = NULL; +} + +wxAppConsole::~wxAppConsole() +{ + delete m_signalWakeUpPipe; +} + // use unusual names for arg[cv] to avoid clashes with wxApp members with the // same names bool wxAppConsole::Initialize(int& argc_, wxChar** argv_) @@ -41,14 +96,23 @@ bool wxAppConsole::Initialize(int& argc_, wxChar** argv_) return true; } +// The actual signal handler. It does as little as possible (because very few +// things are safe to do from inside a signal handler) and just ensures that +// CheckSignal() will be called later from SignalsWakeUpPipe::OnReadWaiting(). void wxAppConsole::HandleSignal(int signal) { wxAppConsole * const app = wxTheApp; if ( !app ) return; + // Register the signal that is caught. sigaddset(&(app->m_signalsCaught), signal); - app->WakeUpIdle(); + + // Wake up the application for handling the signal. + // + // Notice that we must have a valid wake up pipe here as we only install + // our signal handlers after allocating it. + app->m_signalWakeUpPipe->WakeUpNoLock(); } void wxAppConsole::CheckSignal() @@ -66,6 +130,27 @@ void wxAppConsole::CheckSignal() } } +wxFDIOHandler* wxAppConsole::RegisterSignalWakeUpPipe(wxFDIODispatcher& dispatcher) +{ + wxCHECK_MSG( m_signalWakeUpPipe, NULL, "Should be allocated" ); + + // we need a bridge to wxFDIODispatcher + // + // TODO: refactor the code so that only wxEventLoopSourceHandler is used + wxScopedPtr + fdioHandler(new wxFDIOEventLoopSourceHandler(m_signalWakeUpPipe)); + + if ( !dispatcher.RegisterFD + ( + m_signalWakeUpPipe->GetReadFd(), + fdioHandler.get(), + wxFDIO_INPUT + ) ) + return NULL; + + return fdioHandler.release(); +} + // the type of the signal handlers we use is "void(*)(int)" while the real // signal handlers are extern "C" and so have incompatible type and at least // Sun CC warns about it, so use explicit casts to suppress these warnings as @@ -80,6 +165,13 @@ bool wxAppConsole::SetSignalHandler(int signal, SignalHandler handler) const bool install = (SignalHandler_t)handler != SIG_DFL && (SignalHandler_t)handler != SIG_IGN; + if ( !m_signalWakeUpPipe ) + { + // Create the pipe that the signal handler will use to cause the event + // loop to call wxAppConsole::CheckSignal(). + m_signalWakeUpPipe = new SignalsWakeUpPipe(); + } + struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_handler = (SignalHandler_t)&wxAppConsole::HandleSignal; diff --git a/Externals/wxWidgets3/src/unix/descrip.mms b/Externals/wxWidgets3/src/unix/descrip.mms index 21d2bf97bf..5ca84694c0 100644 --- a/Externals/wxWidgets3/src/unix/descrip.mms +++ b/Externals/wxWidgets3/src/unix/descrip.mms @@ -2,7 +2,7 @@ # * # Make file for VMS * # Author : J.Jansen (joukj@hrem.nano.tudelft.nl) * -# Date : 7 January 2011 * +# Date : 20 August 2013 * # * #***************************************************************************** .first @@ -62,7 +62,7 @@ OBJECTS = appunix.obj,apptraits.obj,\ stdpaths.obj,\ taskbarx11.obj,\ timerunx.obj,evtloopunix.obj,fdiounix.obj,uiactionx11.obj,\ - mediactrl.obj + mediactrl.obj,wakeuppipe.obj SOURCES = appunix.cpp,apptraits.cpp,\ dialup.cpp,\ @@ -83,7 +83,7 @@ SOURCES = appunix.cpp,apptraits.cpp,\ stdpaths.cpp,\ taskbarx11.cpp,\ timerunx.cpp,evtloopunix.cpp,fdiounix.cpp,uiactionx11.cpp,\ - mediactrl.cpp + mediactrl.cpp,wakeuppipe.cpp all : $(SOURCES) $(MMS)$(MMSQUALIFIERS) $(OBJECTS) @@ -132,3 +132,4 @@ evtloopunix.obj : evtloopunix.cpp fdiounix.obj : fdiounix.cpp uiactionx11.obj : uiactionx11.cpp mediactrl.obj : mediactrl.cpp +wakeuppipe.obj : wakeuppipe.cpp diff --git a/Externals/wxWidgets3/src/unix/dialup.cpp b/Externals/wxWidgets3/src/unix/dialup.cpp index aa3193f0b7..95d37b22ef 100644 --- a/Externals/wxWidgets3/src/unix/dialup.cpp +++ b/Externals/wxWidgets3/src/unix/dialup.cpp @@ -4,7 +4,6 @@ // Author: Karsten Ballüder // Modified by: // Created: 03.10.99 -// RCS-ID: $Id: dialup.cpp 69910 2011-12-02 12:04:42Z VZ $ // Copyright: (c) Karsten Ballüder // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -36,7 +35,6 @@ #include #include #include -#define __STRICT_ANSI__ #include #include #include diff --git a/Externals/wxWidgets3/src/unix/dir.cpp b/Externals/wxWidgets3/src/unix/dir.cpp index 27d2765f68..f88a594935 100644 --- a/Externals/wxWidgets3/src/unix/dir.cpp +++ b/Externals/wxWidgets3/src/unix/dir.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 08.12.99 -// RCS-ID: $Id: dir.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 1999 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -31,6 +30,7 @@ #include "wx/dir.h" #include "wx/filefn.h" // for wxMatchWild +#include "wx/filename.h" #include #include @@ -149,13 +149,20 @@ bool wxDirData::Read(wxString *filename) break; } - // check the type now - if ( !(m_flags & wxDIR_FILES) && !wxDir::Exists(path + de_d_name) ) + // check the type now: notice that we may want to check the type of + // the path itself and not whatever it points to in case of a symlink + wxFileName fn = wxFileName::DirName(path + de_d_name); + if ( m_flags & wxDIR_NO_FOLLOW ) + { + fn.DontFollowLink(); + } + + if ( !(m_flags & wxDIR_FILES) && !fn.DirExists() ) { // it's a file, but we don't want them continue; } - else if ( !(m_flags & wxDIR_DIRS) && wxDir::Exists(path + de_d_name) ) + else if ( !(m_flags & wxDIR_DIRS) && fn.DirExists() ) { // it's a dir, and we don't want it continue; @@ -235,19 +242,26 @@ wxString wxDir::GetName() const if ( m_data ) { name = M_DIR->GetName(); - if ( !name.empty() && (name.Last() == wxT('/')) ) + + // Notice that we need to check for length > 1 as we shouldn't remove + // the last slash from the root directory! + if ( name.length() > 1 && (name.Last() == wxT('/')) ) { - // chop off the last (back)slash - name.Truncate(name.length() - 1); + // chop off the last slash + name.RemoveLast(); } } return name; } -wxDir::~wxDir() +void wxDir::Close() { - delete M_DIR; + if ( m_data ) + { + delete m_data; + m_data = NULL; + } } // ---------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/src/unix/displayx11.cpp b/Externals/wxWidgets3/src/unix/displayx11.cpp index b2826775ed..87dedfc530 100644 --- a/Externals/wxWidgets3/src/unix/displayx11.cpp +++ b/Externals/wxWidgets3/src/unix/displayx11.cpp @@ -4,7 +4,6 @@ // Author: Brian Victor, Vadim Zeitlin // Modified by: // Created: 12/05/02 -// RCS-ID: $Id: displayx11.cpp 64388 2010-05-23 16:31:33Z PC $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -382,7 +381,7 @@ bool wxDisplayImplX11::ChangeMode(const wxVideoMode& WXUNUSED(mode)) #include "wx/utils.h" -#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 +#if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 || !defined(GDK_WINDOWING_X11) void wxClientDisplayRect(int *x, int *y, int *width, int *height) { @@ -424,6 +423,8 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height) Display * const dpy = wxGetX11Display(); wxCHECK_RET( dpy, wxT("can't be called before initializing the GUI") ); + wxRect rectClient; + const Atom atomWorkArea = XInternAtom(dpy, "_NET_WORKAREA", True); if ( atomWorkArea ) { @@ -459,29 +460,46 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height) numItems != 4 ) { wxLogDebug(wxT("XGetWindowProperty(\"_NET_WORKAREA\") failed")); - return; } - - if ( x ) - *x = workareas[0]; - if ( y ) - *y = workareas[1]; - if ( width ) - *width = workareas[2]; - if ( height ) - *height = workareas[3]; - - return; + else + { + rectClient = wxRect(workareas[0], workareas[1], + workareas[2], workareas[3]); + } } } - // if we get here, _NET_WORKAREA is not supported so return the entire - // screen size as fall back - if (x) - *x = 0; - if (y) - *y = 0; - wxDisplaySize(width, height); + // Although _NET_WORKAREA is supposed to return the client size of the + // screen, not all implementations are conforming, apparently, see #14419, + // so make sure we return a subset of the primary display. + wxRect rectFull; +#if wxUSE_DISPLAY + ScreensInfo screens; + const ScreenInfo& info = screens[0]; + rectFull = wxRect(info.x_org, info.y_org, info.width, info.height); +#else + wxDisplaySize(&rectFull.width, &rectFull.height); +#endif + + if ( !rectClient.width || !rectClient.height ) + { + // _NET_WORKAREA not available or didn't work, fall back to the total + // display size. + rectClient = rectFull; + } + else + { + rectClient = rectClient.Intersect(rectFull); + } + + if ( x ) + *x = rectClient.x; + if ( y ) + *y = rectClient.y; + if ( width ) + *width = rectClient.width; + if ( height ) + *height = rectClient.height; } #endif // wxUSE_LIBHILDON/!wxUSE_LIBHILDON diff --git a/Externals/wxWidgets3/src/unix/dlunix.cpp b/Externals/wxWidgets3/src/unix/dlunix.cpp index cb4e6737ab..881ea77687 100644 --- a/Externals/wxWidgets3/src/unix/dlunix.cpp +++ b/Externals/wxWidgets3/src/unix/dlunix.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-16 (extracted from common/dynlib.cpp) -// RCS-ID: $Id: dlunix.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2000-2005 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -65,15 +64,6 @@ // constants // ---------------------------------------------------------------------------- -// standard shared libraries extensions for different Unix versions -#if defined(__HPUX__) - const wxString wxDynamicLibrary::ms_dllext(".sl"); -#elif defined(__DARWIN__) - const wxString wxDynamicLibrary::ms_dllext(".bundle"); -#else - const wxString wxDynamicLibrary::ms_dllext(".so"); -#endif - // ============================================================================ // wxDynamicLibrary implementation // ============================================================================ diff --git a/Externals/wxWidgets3/src/unix/epolldispatcher.cpp b/Externals/wxWidgets3/src/unix/epolldispatcher.cpp index 15aaf8a2df..1efc707d00 100644 --- a/Externals/wxWidgets3/src/unix/epolldispatcher.cpp +++ b/Externals/wxWidgets3/src/unix/epolldispatcher.cpp @@ -3,7 +3,6 @@ // Purpose: implements dispatcher for epoll_wait() call // Author: Lukasz Michalski // Created: April 2007 -// RCS-ID: $Id: epolldispatcher.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2007 Lukasz Michalski // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/unix/evtloopunix.cpp b/Externals/wxWidgets3/src/unix/evtloopunix.cpp index dc76b3c418..daeac691d1 100644 --- a/Externals/wxWidgets3/src/unix/evtloopunix.cpp +++ b/Externals/wxWidgets3/src/unix/evtloopunix.cpp @@ -3,8 +3,9 @@ // Purpose: wxEventLoop implementation // Author: Lukasz Michalski (lm@zork.pl) // Created: 2007-05-07 -// RCS-ID: $Id: evtloopunix.cpp 65992 2010-11-02 11:57:19Z VZ $ // Copyright: (c) 2006 Zork Lukasz Michalski +// (c) 2009, 2013 Vadim Zeitlin +// (c) 2013 Rob Bresalier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -28,124 +29,22 @@ #include "wx/log.h" #endif -#include #include "wx/apptrait.h" #include "wx/scopedptr.h" #include "wx/thread.h" #include "wx/module.h" -#include "wx/unix/pipe.h" #include "wx/unix/private/timer.h" #include "wx/unix/private/epolldispatcher.h" +#include "wx/unix/private/wakeuppipe.h" #include "wx/private/selectdispatcher.h" +#include "wx/private/eventloopsourcesmanager.h" +#include "wx/private/fdioeventloopsourcehandler.h" +#include "wx/private/eventloopsourcesmanager.h" #if wxUSE_EVENTLOOP_SOURCE #include "wx/evtloopsrc.h" #endif // wxUSE_EVENTLOOP_SOURCE -#define TRACE_EVENTS wxT("events") - -// =========================================================================== -// wxEventLoop::PipeIOHandler implementation -// =========================================================================== - -namespace wxPrivate -{ - -// pipe used for wake up messages: when a child thread wants to wake up -// the event loop in the main thread it writes to this pipe -class PipeIOHandler : public wxFDIOHandler -{ -public: - // default ctor does nothing, call Create() to really initialize the - // object - PipeIOHandler() { } - - bool Create(); - - // this method can be, and normally is, called from another thread - void WakeUp(); - - int GetReadFd() { return m_pipe[wxPipe::Read]; } - - // implement wxFDIOHandler pure virtual methods - virtual void OnReadWaiting(); - virtual void OnWriteWaiting() { } - virtual void OnExceptionWaiting() { } - -private: - wxPipe m_pipe; -}; - -// ---------------------------------------------------------------------------- -// initialization -// ---------------------------------------------------------------------------- - -bool PipeIOHandler::Create() -{ - if ( !m_pipe.Create() ) - { - wxLogError(_("Failed to create wake up pipe used by event loop.")); - return false; - } - - if ( !m_pipe.MakeNonBlocking(wxPipe::Read) ) - { - wxLogSysError(_("Failed to switch wake up pipe to non-blocking mode")); - return false; - } - - wxLogTrace(TRACE_EVENTS, wxT("Wake up pipe (%d, %d) created"), - m_pipe[wxPipe::Read], m_pipe[wxPipe::Write]); - - return true; -} - -// ---------------------------------------------------------------------------- -// wakeup handling -// ---------------------------------------------------------------------------- - -void PipeIOHandler::WakeUp() -{ - if ( write(m_pipe[wxPipe::Write], "s", 1) != 1 ) - { - // don't use wxLog here, we can be in another thread and this could - // result in dead locks - perror("write(wake up pipe)"); - } -} - -void PipeIOHandler::OnReadWaiting() -{ - // got wakeup from child thread: read all data available in pipe just to - // make it empty (even though we write one byte at a time from WakeUp(), - // it could have been called several times) - char buf[4]; - for ( ;; ) - { - const int size = read(GetReadFd(), buf, WXSIZEOF(buf)); - - if ( size == 0 || (size == -1 && (errno == EAGAIN || errno == EINTR)) ) - { - // nothing left in the pipe (EAGAIN is expected for an FD with - // O_NONBLOCK) - break; - } - - if ( size == -1 ) - { - wxLogSysError(_("Failed to read from wake-up pipe")); - - break; - } - } - - // writing to the wake up pipe will make wxConsoleEventLoop return from - // wxFDIODispatcher::Dispatch() it might be currently blocking in, nothing - // else needs to be done -} - -} // namespace wxPrivate - // =========================================================================== // wxEventLoop implementation // =========================================================================== @@ -156,34 +55,44 @@ void PipeIOHandler::OnReadWaiting() wxConsoleEventLoop::wxConsoleEventLoop() { - m_wakeupPipe = new wxPrivate::PipeIOHandler(); - if ( !m_wakeupPipe->Create() ) - { - wxDELETE(m_wakeupPipe); - m_dispatcher = NULL; - return; - } + // Be pessimistic initially and assume that we failed to initialize. + m_dispatcher = NULL; + m_wakeupPipe = NULL; + m_wakeupSource = NULL; + // Create the pipe. + wxScopedPtr wakeupPipe(new wxWakeUpPipeMT); + const int pipeFD = wakeupPipe->GetReadFd(); + if ( pipeFD == wxPipe::INVALID_FD ) + return; + + // And start monitoring it in our event loop. + m_wakeupSource = wxEventLoopBase::AddSourceForFD + ( + pipeFD, + wakeupPipe.get(), + wxFDIO_INPUT + ); + + if ( !m_wakeupSource ) + return; + + // This is a bit ugly but we know that AddSourceForFD() used the currently + // active dispatcher to register this source, so use the same one for our + // other operations. Of course, currently the dispatcher returned by + // wxFDIODispatcher::Get() is always the same one anyhow so it doesn't + // really matter, but if we started returning different things later, it + // would. m_dispatcher = wxFDIODispatcher::Get(); - if ( !m_dispatcher ) - return; - m_dispatcher->RegisterFD - ( - m_wakeupPipe->GetReadFd(), - m_wakeupPipe, - wxFDIO_INPUT - ); + m_wakeupPipe = wakeupPipe.release(); } wxConsoleEventLoop::~wxConsoleEventLoop() { if ( m_wakeupPipe ) { - if ( m_dispatcher ) - { - m_dispatcher->UnregisterFD(m_wakeupPipe->GetReadFd()); - } + delete m_wakeupSource; delete m_wakeupPipe; } @@ -195,54 +104,37 @@ wxConsoleEventLoop::~wxConsoleEventLoop() #if wxUSE_EVENTLOOP_SOURCE -// This class is a temporary bridge between event loop sources and -// FDIODispatcher. It is going to be removed soon, when all subject interfaces -// are modified -class wxFDIOEventLoopSourceHandler : public wxFDIOHandler +class wxConsoleEventLoopSourcesManager : public wxEventLoopSourcesManagerBase { public: - wxFDIOEventLoopSourceHandler(wxEventLoopSourceHandler* handler) : - m_impl(handler) { } - - virtual void OnReadWaiting() + wxEventLoopSource* AddSourceForFD( int fd, + wxEventLoopSourceHandler *handler, + int flags) { - m_impl->OnReadWaiting(); - } - virtual void OnWriteWaiting() - { - m_impl->OnWriteWaiting(); - } + wxCHECK_MSG( fd != -1, NULL, "can't monitor invalid fd" ); - virtual void OnExceptionWaiting() - { - m_impl->OnExceptionWaiting(); - } + wxLogTrace(wxTRACE_EVT_SOURCE, + "Adding event loop source for fd=%d", fd); -protected: - wxEventLoopSourceHandler* m_impl; + // we need a bridge to wxFDIODispatcher + // + // TODO: refactor the code so that only wxEventLoopSourceHandler is used + wxScopedPtr + fdioHandler(new wxFDIOEventLoopSourceHandler(handler)); + + if ( !wxFDIODispatcher::Get()->RegisterFD(fd, fdioHandler.get(), flags) ) + return NULL; + + return new wxUnixEventLoopSource(wxFDIODispatcher::Get(), fdioHandler.release(), + fd, handler, flags); + } }; -wxEventLoopSource * -wxConsoleEventLoop::AddSourceForFD(int fd, - wxEventLoopSourceHandler *handler, - int flags) +wxEventLoopSourcesManagerBase* wxAppTraits::GetEventLoopSourcesManager() { - wxCHECK_MSG( fd != -1, NULL, "can't monitor invalid fd" ); + static wxConsoleEventLoopSourcesManager s_eventLoopSourcesManager; - wxLogTrace(wxTRACE_EVT_SOURCE, - "Adding event loop source for fd=%d", fd); - - // we need a bridge to wxFDIODispatcher - // - // TODO: refactor the code so that only wxEventLoopSourceHandler is used - wxScopedPtr - fdioHandler(new wxFDIOEventLoopSourceHandler(handler)); - - if ( !m_dispatcher->RegisterFD(fd, fdioHandler.get(), flags) ) - return NULL; - - return new wxUnixEventLoopSource(m_dispatcher, fdioHandler.release(), - fd, handler, flags); + return &s_eventLoopSourcesManager; } wxUnixEventLoopSource::~wxUnixEventLoopSource() diff --git a/Externals/wxWidgets3/src/unix/fdiounix.cpp b/Externals/wxWidgets3/src/unix/fdiounix.cpp index d149105f49..766316d6fe 100644 --- a/Externals/wxWidgets3/src/unix/fdiounix.cpp +++ b/Externals/wxWidgets3/src/unix/fdiounix.cpp @@ -3,7 +3,6 @@ // Purpose: wxFDIOManager implementation for console Unix applications // Author: Vadim Zeitlin // Created: 2009-08-17 -// RCS-ID: $Id: fdiounix.cpp 62187 2009-09-28 15:35:48Z PC $ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/unix/fontenum.cpp b/Externals/wxWidgets3/src/unix/fontenum.cpp index 07abe2b9a8..cc7ee1dad4 100644 --- a/Externals/wxWidgets3/src/unix/fontenum.cpp +++ b/Externals/wxWidgets3/src/unix/fontenum.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 01.10.99 -// RCS-ID: $Id: fontenum.cpp 58909 2009-02-15 12:48:31Z FM $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/unix/fontutil.cpp b/Externals/wxWidgets3/src/unix/fontutil.cpp index 140a07e92b..4eecb5009a 100644 --- a/Externals/wxWidgets3/src/unix/fontutil.cpp +++ b/Externals/wxWidgets3/src/unix/fontutil.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 05.11.99 -// RCS-ID: $Id: fontutil.cpp 70740 2012-02-28 18:06:22Z PC $ // Copyright: (c) Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -29,12 +28,12 @@ #ifndef WX_PRECOMP #include "wx/app.h" #include "wx/font.h" // wxFont enums - #include "wx/encinfo.h" #include "wx/hash.h" #include "wx/utils.h" // for wxGetDisplay() #include "wx/module.h" #endif // PCH +#include "wx/encinfo.h" #include "wx/fontmap.h" #include "wx/tokenzr.h" #include "wx/fontenum.h" @@ -64,14 +63,24 @@ void wxNativeFontInfo::Init() { description = NULL; + m_underlined = false; + m_strikethrough = false; } void wxNativeFontInfo::Init(const wxNativeFontInfo& info) { if (info.description) + { description = pango_font_description_copy(info.description); + m_underlined = info.GetUnderlined(); + m_strikethrough = info.GetStrikethrough(); + } else + { description = NULL; + m_underlined = false; + m_strikethrough = false; + } } void wxNativeFontInfo::Free() @@ -130,12 +139,12 @@ wxFontWeight wxNativeFontInfo::GetWeight() const bool wxNativeFontInfo::GetUnderlined() const { - return false; + return m_underlined; } bool wxNativeFontInfo::GetStrikethrough() const { - return false; + return m_strikethrough; } wxString wxNativeFontInfo::GetFaceName() const @@ -262,16 +271,18 @@ void wxNativeFontInfo::SetWeight(wxFontWeight weight) } } -void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined)) +void wxNativeFontInfo::SetUnderlined(bool underlined) { - // wxWindowDCImpl::DoDrawText will take care of rendering font with - // the underline attribute! - wxFAIL_MSG( "not implemented" ); + // Pango doesn't have the underlined attribute so we store it separately + // (and handle it specially in wxWindowDCImpl::DoDrawText()). + m_underlined = underlined; } -void wxNativeFontInfo::SetStrikethrough(bool WXUNUSED(strikethrough)) +void wxNativeFontInfo::SetStrikethrough(bool strikethrough) { - wxFAIL_MSG( "not implemented" ); + // As with the underlined attribute above, we handle this one separately as + // Pango doesn't support it as part of the font description. + m_strikethrough = strikethrough; } bool wxNativeFontInfo::SetFaceName(const wxString& facename) @@ -306,25 +317,34 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family) case wxFONTFAMILY_ROMAN: // corresponds to the serif font family in the page linked above + facename.Add(wxS("Serif")); + facename.Add(wxS("DejaVu Serif")); + facename.Add(wxS("DejaVu LGC Serif")); + facename.Add(wxS("Bitstream Vera Serif")); + facename.Add(wxS("Liberation Serif")); + facename.Add(wxS("FreeSerif")); + facename.Add(wxS("Luxi Serif")); + facename.Add(wxS("Times New Roman")); facename.Add(wxS("Century Schoolbook L")); facename.Add(wxS("URW Bookman L")); facename.Add(wxS("URW Palladio L")); - facename.Add(wxS("DejaVu Serif")); - facename.Add(wxS("FreeSerif")); - facename.Add(wxS("Times New Roman")); facename.Add(wxS("Times")); break; case wxFONTFAMILY_TELETYPE: case wxFONTFAMILY_MODERN: // corresponds to the monospace font family in the page linked above + facename.Add(wxS("Monospace")); facename.Add(wxS("DejaVu Sans Mono")); - facename.Add(wxS("Nimbus Mono L")); + facename.Add(wxS("DejaVu LGC Sans Mono")); facename.Add(wxS("Bitstream Vera Sans Mono")); - facename.Add(wxS("Andale Mono")); - facename.Add(wxS("Lucida Sans Typewriter")); + facename.Add(wxS("Liberation Mono")); facename.Add(wxS("FreeMono")); + facename.Add(wxS("Luxi Mono")); facename.Add(wxS("Courier New")); + facename.Add(wxS("Lucida Sans Typewriter")); + facename.Add(wxS("Nimbus Mono L")); + facename.Add(wxS("Andale Mono")); facename.Add(wxS("Courier")); break; @@ -332,13 +352,17 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family) case wxFONTFAMILY_DEFAULT: default: // corresponds to the sans-serif font family in the page linked above + facename.Add(wxS("Sans")); facename.Add(wxS("DejaVu Sans")); - facename.Add(wxS("URW Gothic L")); - facename.Add(wxS("Nimbus Sans L")); + facename.Add(wxS("DejaVu LGC Sans")); facename.Add(wxS("Bitstream Vera Sans")); - facename.Add(wxS("Lucida Sans")); - facename.Add(wxS("Arial")); + facename.Add(wxS("Liberation Sans")); facename.Add(wxS("FreeSans")); + facename.Add(wxS("Luxi Sans")); + facename.Add(wxS("Arial")); + facename.Add(wxS("Lucida Sans")); + facename.Add(wxS("Nimbus Sans L")); + facename.Add(wxS("URW Gothic L")); break; } @@ -352,6 +376,14 @@ void wxNativeFontInfo::SetEncoding(wxFontEncoding WXUNUSED(encoding)) bool wxNativeFontInfo::FromString(const wxString& s) { + wxString str(s); + + // Pango font description doesn't have 'underlined' or 'strikethrough' + // attributes, so we handle them specially by extracting them from the + // string before passing it to Pango. + m_underlined = str.StartsWith(wxS("underlined "), &str); + m_strikethrough = str.StartsWith(wxS("strikethrough "), &str); + if (description) pango_font_description_free( description ); @@ -362,7 +394,6 @@ bool wxNativeFontInfo::FromString(const wxString& s) // we do the check on the size here using same (arbitrary) limits used by // pango > 1.13. Note that the segfault could happen also for pointsize // smaller than this limit !! - wxString str(s); const size_t pos = str.find_last_of(wxS(" ")); double size; if ( pos != wxString::npos && wxString(str, pos + 1).ToDouble(&size) ) @@ -394,8 +425,18 @@ bool wxNativeFontInfo::FromString(const wxString& s) wxString wxNativeFontInfo::ToString() const { wxGtkString str(pango_font_description_to_string( description )); + wxString desc = wxPANGO_CONV_BACK(str); - return wxPANGO_CONV_BACK(str); + // Augment the string with the attributes not handled by Pango. + // + // Notice that we must add them in the same order they are extracted in + // FromString() above. + if (m_strikethrough) + desc.insert(0, wxS("strikethrough ")); + if (m_underlined) + desc.insert(0, wxS("underlined ")); + + return desc; } bool wxNativeFontInfo::FromUserString(const wxString& s) @@ -947,9 +988,9 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info) { wxString fontspec; fontspec.Printf(wxT("-*-%s-*-*-*-*-*-*-*-*-*-*-%s-%s"), - !info.facename ? wxT("*") : info.facename.c_str(), - info.xregistry.c_str(), - info.xencoding.c_str()); + info.facename.empty() ? wxString("*") : info.facename, + info.xregistry, + info.xencoding); return wxTestFontSpec(fontspec); } diff --git a/Externals/wxWidgets3/src/unix/fswatcher_inotify.cpp b/Externals/wxWidgets3/src/unix/fswatcher_inotify.cpp index d5c05f177e..117a036d4e 100644 --- a/Externals/wxWidgets3/src/unix/fswatcher_inotify.cpp +++ b/Externals/wxWidgets3/src/unix/fswatcher_inotify.cpp @@ -3,7 +3,6 @@ // Purpose: inotify-based wxFileSystemWatcher implementation // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id: fswatcher_inotify.cpp 64656 2010-06-20 18:18:23Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -139,6 +138,9 @@ public: wxFAIL_MSG( wxString::Format("Path %s is not watched", watch->GetPath()) ); } + // Cache the wd in case any events arrive late + m_staleDescriptors.Add(watch->GetWatchDescriptor()); + watch->SetWatchDescriptor(-1); return true; } @@ -217,24 +219,98 @@ protected: // will be already removed from our list at that time if (inevt.mask & IN_IGNORED) { + // It is now safe to remove it from the stale descriptors too, we + // won't get any more events for it. + // However if we're here because a dir that we're still watching + // has just been deleted, its wd won't be on this list + const int pos = m_staleDescriptors.Index(inevt.wd); + if ( pos != wxNOT_FOUND ) + { + m_staleDescriptors.RemoveAt(static_cast(pos)); + wxLogTrace(wxTRACE_FSWATCHER, + "Removed wd %i from the stale-wd cache", inevt.wd); + } return; } // get watch entry for this event wxFSWatchEntryDescriptors::iterator it = m_watchMap.find(inevt.wd); - wxCHECK_RET(it != m_watchMap.end(), - "Watch descriptor not present in the watch map!"); - wxFSWatchEntry& watch = *(it->second); + // wd will be -1 for IN_Q_OVERFLOW, which would trigger the wxFAIL_MSG + if (inevt.wd != -1) + { + if (it == m_watchMap.end()) + { + // It's not in the map; check if was recently removed from it. + if (m_staleDescriptors.Index(inevt.wd) != wxNOT_FOUND) + { + wxLogTrace(wxTRACE_FSWATCHER, + "Got an event for stale wd %i", inevt.wd); + } + else + { + // In theory we shouldn't reach here. In practice, some + // events, e.g. IN_MODIFY, arrive just after the IN_IGNORED + // so their wd has already been discarded. Warn about them. + wxFileSystemWatcherEvent + event + ( + wxFSW_EVENT_WARNING, + wxString::Format + ( + _("Unexpected event for \"%s\": no " + "matching watch descriptor."), + inevt.len ? inevt.name : "" + ) + ); + SendEvent(event); + + } + + // In any case, don't process this event: it's either for an + // already removed entry, or for an unknown one. + return; + } + } + int nativeFlags = inevt.mask; int flags = Native2WatcherFlags(nativeFlags); // check out for error/warning condition if (flags & wxFSW_EVENT_WARNING || flags & wxFSW_EVENT_ERROR) { - wxString errMsg = GetErrorDescription(Watcher2NativeFlags(flags)); + wxString errMsg = GetErrorDescription(nativeFlags); wxFileSystemWatcherEvent event(flags, errMsg); SendEvent(event); + return; + } + + if (inevt.wd == -1) + { + // Although this is not supposed to happen, we seem to be getting + // occasional IN_ACCESS/IN_MODIFY events without valid watch value. + wxFileSystemWatcherEvent + event + ( + wxFSW_EVENT_WARNING, + wxString::Format + ( + _("Invalid inotify event for \"%s\""), + inevt.len ? inevt.name : "" + ) + ); + SendEvent(event); + return; + } + + wxFSWatchEntry& watch = *(it->second); + + // Now IN_UNMOUNT. We must do so here, as it's not in the watch flags + if (nativeFlags & IN_UNMOUNT) + { + wxFileName path = GetEventPath(watch, inevt); + wxFileSystemWatcherEvent event(wxFSW_EVENT_UNMOUNT, path, path); + SendEvent(event); } // filter out ignored events and those not asked for. // we never filter out warnings or exceptions @@ -242,11 +318,92 @@ protected: { return; } + + // Creation + // We need do something here only if the original watch was recursive; + // we don't watch a child dir itself inside a non-tree watch. + // We watch only dirs explicitly, so we don't want file IN_CREATEs. + // Distinguish by whether nativeFlags contain IN_ISDIR + else if ((nativeFlags & IN_CREATE) && + (watch.GetType() == wxFSWPath_Tree) && (inevt.mask & IN_ISDIR)) + { + wxFileName fn = GetEventPath(watch, inevt); + // Though it's a dir, fn treats it as a file. So: + fn.AssignDir(fn.GetFullPath()); + + if (m_watcher->AddAny(fn, wxFSW_EVENT_ALL, + wxFSWPath_Tree, watch.GetFilespec())) + { + // Tell the owner, in case it's interested + // If there's a filespec, assume he's not + if (watch.GetFilespec().empty()) + { + wxFileSystemWatcherEvent event(flags, fn, fn); + SendEvent(event); + } + } + } + + // Deletion + // We watch only dirs explicitly, so we don't want file IN_DELETEs. + // We obviously can't check using DirExists() as the object has been + // deleted; and nativeFlags here doesn't contain IN_ISDIR, even for + // a dir. Fortunately IN_DELETE_SELF doesn't happen for files. We need + // to do something here only inside a tree watch, or if it's the parent + // dir that's deleted. Otherwise let the parent dir cope + else if ((nativeFlags & IN_DELETE_SELF) && + ((watch.GetType() == wxFSWPath_Dir) || + (watch.GetType() == wxFSWPath_Tree))) + { + // We must remove the deleted directory from the map, so that + // DoRemoveInotify() isn't called on it in the future. Don't assert + // if the wd isn't found: repeated IN_DELETE_SELFs can occur + wxFileName fn = GetEventPath(watch, inevt); + wxString path(fn.GetPathWithSep()); + + if (m_watchMap.erase(inevt.wd) == 1) + { + // Delete from wxFileSystemWatcher + wxDynamicCast(m_watcher, wxInotifyFileSystemWatcher)-> + OnDirDeleted(path); + + // Now remove from our local list of watched items + wxFSWatchEntries::iterator wit = + m_watches.find(path); + if (wit != m_watches.end()) + { + m_watches.erase(wit); + } + + // Cache the wd in case any events arrive late + m_staleDescriptors.Add(inevt.wd); + } + + // Tell the owner, in case it's interested + // If there's a filespec, assume he's not + if (watch.GetFilespec().empty()) + { + wxFileSystemWatcherEvent event(flags, fn, fn); + SendEvent(event); + } + } + // renames else if (nativeFlags & IN_MOVE) { - wxInotifyCookies::iterator it = m_cookies.find(inevt.cookie); - if ( it == m_cookies.end() ) + // IN_MOVE events are produced in the following circumstances: + // * A move within a dir (what the user sees as a rename) gives an + // IN_MOVED_FROM and IN_MOVED_TO pair, each with the same path. + // * A move within watched dir foo/ e.g. from foo/bar1/ to foo/bar2/ + // will also produce such a pair, but with different paths. + // * A move to baz/ will give only an IN_MOVED_FROM for foo/bar1; + // if baz/ is inside a different watch, that gets the IN_MOVED_TO. + + // The first event to arrive, usually the IN_MOVED_FROM, is + // cached to await a matching IN_MOVED_TO; should none arrive, the + // unpaired event will be processed later in ProcessRenames(). + wxInotifyCookies::iterator it2 = m_cookies.find(inevt.cookie); + if ( it2 == m_cookies.end() ) { int size = sizeof(inevt) + inevt.len; inotify_event* e = (inotify_event*) operator new (size); @@ -257,22 +414,47 @@ protected: } else { - inotify_event& oldinevt = *(it->second); + inotify_event& oldinevt = *(it2->second); - wxFileSystemWatcherEvent event(flags); - if ( inevt.mask & IN_MOVED_FROM ) + // Tell the owner, in case it's interested + // If there's a filespec, assume he's not + if ( watch.GetFilespec().empty() ) { - event.SetPath(GetEventPath(watch, inevt)); - event.SetNewPath(GetEventPath(watch, oldinevt)); - } - else - { - event.SetPath(GetEventPath(watch, oldinevt)); - event.SetNewPath(GetEventPath(watch, inevt)); - } - SendEvent(event); + // The the only way to know the path for the first event, + // normally the IN_MOVED_FROM, is to retrieve the watch + // corresponding to oldinevt. This is needed for a move + // within a watch. + wxFSWatchEntry* oldwatch; + wxFSWatchEntryDescriptors::iterator oldwatch_it = + m_watchMap.find(oldinevt.wd); + if (oldwatch_it != m_watchMap.end()) + { + oldwatch = oldwatch_it->second; + } + else + { + wxLogTrace(wxTRACE_FSWATCHER, + "oldinevt's watch descriptor not in the watch map"); + // For want of a better alternative, use 'watch'. That + // will work fine for renames, though not for moves + oldwatch = &watch; + } - m_cookies.erase(it); + wxFileSystemWatcherEvent event(flags); + if ( inevt.mask & IN_MOVED_FROM ) + { + event.SetPath(GetEventPath(watch, inevt)); + event.SetNewPath(GetEventPath(*oldwatch, oldinevt)); + } + else + { + event.SetPath(GetEventPath(*oldwatch, oldinevt)); + event.SetNewPath(GetEventPath(watch, inevt)); + } + SendEvent(event); + } + + m_cookies.erase(it2); delete &oldinevt; } } @@ -280,13 +462,19 @@ protected: else { wxFileName path = GetEventPath(watch, inevt); - wxFileSystemWatcherEvent event(flags, path, path); - SendEvent(event); + // For files, check that it matches any filespec + if ( MatchesFilespec(path, watch.GetFilespec()) ) + { + wxFileSystemWatcherEvent event(flags, path, path); + SendEvent(event); + } } } void ProcessRenames() { + // After all of a batch of events has been processed, this deals with + // any still-unpaired IN_MOVED_FROM or IN_MOVED_TO events. wxInotifyCookies::iterator it = m_cookies.begin(); while ( it != m_cookies.end() ) { @@ -297,14 +485,26 @@ protected: // get watch entry for this event wxFSWatchEntryDescriptors::iterator wit = m_watchMap.find(inevt.wd); - wxCHECK_RET(wit != m_watchMap.end(), - "Watch descriptor not present in the watch map!"); - - wxFSWatchEntry& watch = *(wit->second); - int flags = Native2WatcherFlags(inevt.mask); - wxFileName path = GetEventPath(watch, inevt); - wxFileSystemWatcherEvent event(flags, path, path); - SendEvent(event); + if (wit == m_watchMap.end()) + { + wxLogTrace(wxTRACE_FSWATCHER, + "Watch descriptor not present in the watch map!"); + } + else + { + // Tell the owner, in case it's interested + // If there's a filespec, assume he's not + wxFSWatchEntry& watch = *(wit->second); + if ( watch.GetFilespec().empty() ) + { + int flags = Native2WatcherFlags(inevt.mask); + wxFileName path = GetEventPath(watch, inevt); + { + wxFileSystemWatcherEvent event(flags, path, path); + SendEvent(event); + } + } + } m_cookies.erase(it); delete &inevt; @@ -344,9 +544,12 @@ protected: wxString mask = (inevt.mask & IN_ISDIR) ? wxString::Format("IS_DIR | %u", inevt.mask & ~IN_ISDIR) : wxString::Format("%u", inevt.mask); + const char* name = ""; + if (inevt.len) + name = inevt.name; return wxString::Format("Event: wd=%d, mask=%s, cookie=%u, len=%u, " "name=%s", inevt.wd, mask, inevt.cookie, - inevt.len, inevt.name); + inevt.len, name); } static wxFileName GetEventPath(const wxFSWatchEntry& watch, @@ -354,17 +557,40 @@ protected: { // only when dir is watched, we have non-empty e.name wxFileName path = watch.GetPath(); - if (path.IsDir()) + if (path.IsDir() && inevt.len) { path = wxFileName(path.GetPath(), inevt.name); } return path; } - static int Watcher2NativeFlags(int WXUNUSED(flags)) + static int Watcher2NativeFlags(int flags) { - // TODO: it would be nice to subscribe only to the events we really need - return IN_ALL_EVENTS; + // Start with the standard case of wanting all events + if (flags == wxFSW_EVENT_ALL) + { + return IN_ALL_EVENTS; + } + + static const int flag_mapping[][2] = { + { wxFSW_EVENT_ACCESS, IN_ACCESS }, + { wxFSW_EVENT_MODIFY, IN_MODIFY }, + { wxFSW_EVENT_ATTRIB, IN_ATTRIB }, + { wxFSW_EVENT_RENAME, IN_MOVE }, + { wxFSW_EVENT_CREATE, IN_CREATE }, + { wxFSW_EVENT_DELETE, IN_DELETE|IN_DELETE_SELF|IN_MOVE_SELF }, + { wxFSW_EVENT_UNMOUNT, IN_UNMOUNT } + // wxFSW_EVENT_ERROR/WARNING make no sense here + }; + + int native_flags = 0; + for ( unsigned int i=0; i < WXSIZEOF(flag_mapping); ++i) + { + if (flags & flag_mapping[i][0]) + native_flags |= flag_mapping[i][1]; + } + + return native_flags; } static int Native2WatcherFlags(int flags) @@ -372,7 +598,7 @@ protected: static const int flag_mapping[][2] = { { IN_ACCESS, wxFSW_EVENT_ACCESS }, // generated during read! { IN_MODIFY, wxFSW_EVENT_MODIFY }, - { IN_ATTRIB, 0 }, + { IN_ATTRIB, wxFSW_EVENT_ATTRIB }, { IN_CLOSE_WRITE, 0 }, { IN_CLOSE_NOWRITE, 0 }, { IN_OPEN, 0 }, @@ -383,10 +609,10 @@ protected: { IN_DELETE_SELF, wxFSW_EVENT_DELETE }, { IN_MOVE_SELF, wxFSW_EVENT_DELETE }, - { IN_UNMOUNT, wxFSW_EVENT_ERROR }, + { IN_UNMOUNT, wxFSW_EVENT_UNMOUNT}, { IN_Q_OVERFLOW, wxFSW_EVENT_WARNING}, - // ignored, because this is genereted mainly by watcher::Remove() + // ignored, because this is generated mainly by watcher::Remove() { IN_IGNORED, 0 } }; @@ -409,8 +635,6 @@ protected: { switch ( flag ) { - case IN_UNMOUNT: - return _("File system containing watched object was unmounted"); case IN_Q_OVERFLOW: return _("Event queue overflowed"); } @@ -422,6 +646,7 @@ protected: wxFSWSourceHandler* m_handler; // handler for inotify event source wxFSWatchEntryDescriptors m_watchMap; // inotify wd=>wxFSWatchEntry* map + wxArrayInt m_staleDescriptors; // stores recently-removed watches wxInotifyCookies m_cookies; // map to track renames wxEventLoopSource* m_source; // our event loop source @@ -486,6 +711,19 @@ bool wxInotifyFileSystemWatcher::Init() return m_service->Init(); } +void wxInotifyFileSystemWatcher::OnDirDeleted(const wxString& path) +{ + if (!path.empty()) + { + wxFSWatchInfoMap::iterator it = m_watches.find(path); + wxCHECK_RET(it != m_watches.end(), + wxString::Format("Path '%s' is not watched", path)); + + // path has been deleted, so we must forget it whatever its refcount + m_watches.erase(it); + } +} + #endif // wxHAS_INOTIFY #endif // wxUSE_FSWATCHER diff --git a/Externals/wxWidgets3/src/unix/fswatcher_kqueue.cpp b/Externals/wxWidgets3/src/unix/fswatcher_kqueue.cpp index 0068a095ac..2bc1634dfc 100644 --- a/Externals/wxWidgets3/src/unix/fswatcher_kqueue.cpp +++ b/Externals/wxWidgets3/src/unix/fswatcher_kqueue.cpp @@ -3,7 +3,6 @@ // Purpose: kqueue-based wxFileSystemWatcher implementation // Author: Bartosz Bekier // Created: 2009-05-26 -// RCS-ID: $Id: fswatcher_kqueue.cpp 67677 2011-05-03 10:40:28Z VZ $ // Copyright: (c) 2009 Bartosz Bekier // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -149,8 +148,7 @@ public: // TODO more error conditions according to man // XXX closing file descriptor removes the watch. The logic resides in // the watch which is not nice, but effective and simple - bool ret = watch->Close(); - if (ret == -1) + if ( !watch->Close() ) { wxLogSysError(_("Unable to remove kqueue watch")); return false; diff --git a/Externals/wxWidgets3/src/unix/glx11.cpp b/Externals/wxWidgets3/src/unix/glx11.cpp index 7bfb310c93..ec2bd5b098 100644 --- a/Externals/wxWidgets3/src/unix/glx11.cpp +++ b/Externals/wxWidgets3/src/unix/glx11.cpp @@ -3,7 +3,6 @@ // Purpose: code common to all X11-based wxGLCanvas implementations // Author: Vadim Zeitlin // Created: 2007-04-15 -// RCS-ID: $Id: glx11.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2007 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/unix/joystick.cpp b/Externals/wxWidgets3/src/unix/joystick.cpp index f87698d17e..cf9cc33b3e 100644 --- a/Externals/wxWidgets3/src/unix/joystick.cpp +++ b/Externals/wxWidgets3/src/unix/joystick.cpp @@ -4,7 +4,6 @@ // Author: Ported to Linux by Guilhem Lavaux // Modified by: // Created: 05/23/98 -// RCS-ID: $Id: joystick.cpp 58381 2009-01-25 11:58:39Z FM $ // Copyright: (c) Guilhem Lavaux // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -19,6 +18,7 @@ #ifndef WX_PRECOMP #include "wx/event.h" #include "wx/window.h" + #include "wx/log.h" #endif //WX_PRECOMP #include "wx/thread.h" @@ -136,6 +136,14 @@ void* wxJoystickThread::Entry() if ((j_evt.type & JS_EVENT_AXIS) && (j_evt.number < wxJS_MAX_AXES)) { + // Ignore invalid axis. + if ( j_evt.number >= wxJS_MAX_AXES ) + { + wxLogDebug(wxS("Invalid axis index %d in joystick message."), + j_evt.number); + continue; + } + if ( (m_axe[j_evt.number] + m_threshold < j_evt.value) || (m_axe[j_evt.number] - m_threshold > j_evt.value) ) { diff --git a/Externals/wxWidgets3/src/unix/mediactrl.cpp b/Externals/wxWidgets3/src/unix/mediactrl.cpp index 5e299ba297..f01b1f15fd 100644 --- a/Externals/wxWidgets3/src/unix/mediactrl.cpp +++ b/Externals/wxWidgets3/src/unix/mediactrl.cpp @@ -4,7 +4,6 @@ // Author: Ryan Norton // Modified by: // Created: 02/04/05 -// RCS-ID: $Id: mediactrl.cpp 70622 2012-02-18 19:43:03Z SN $ // Copyright: (c) 2004-2005 Ryan Norton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -34,7 +33,9 @@ #include "wx/timer.h" // wxTimer #endif +#include "wx/filesys.h" // FileNameToURL() #include "wx/thread.h" // wxMutex/wxMutexLocker +#include "wx/vector.h" // wxVector #ifdef __WXGTK__ #include @@ -185,6 +186,7 @@ public: virtual double GetVolume(); //------------implementation from now on----------------------------------- + bool CheckForErrors(); bool DoLoad(const wxString& locstring); wxMediaCtrl* GetControl() { return m_ctrl; } // for C Callbacks void HandleStateChange(GstElementState oldstate, GstElementState newstate); @@ -205,6 +207,23 @@ public: wxMutex m_asynclock; // See "discussion of internals" class wxGStreamerMediaEventHandler* m_eventHandler; // see below + // Mutex protecting just the variables below which are set from + // gst_error_callback() called from a different thread. + wxMutex m_mutexErr; + struct Error + { + Error(const gchar* message, const gchar* debug) + : m_message(message, wxConvUTF8), + m_debug(debug, wxConvUTF8) + { + } + + wxString m_message, + m_debug; + }; + + wxVector m_errors; + friend class wxGStreamerMediaEventHandler; friend class wxGStreamerLoadWaitTimer; DECLARE_DYNAMIC_CLASS(wxGStreamerMediaBackend) @@ -256,15 +275,13 @@ IMPLEMENT_DYNAMIC_CLASS(wxGStreamerMediaBackend, wxMediaBackend) //----------------------------------------------------------------------------- #ifdef __WXGTK__ extern "C" { -static gboolean gtk_window_expose_callback(GtkWidget *widget, - GdkEventExpose *event, - wxGStreamerMediaBackend *be) +static gboolean +#ifdef __WXGTK3__ +draw(GtkWidget* widget, cairo_t* cr, wxGStreamerMediaBackend* be) +#else +expose_event(GtkWidget* widget, GdkEventExpose* event, wxGStreamerMediaBackend* be) +#endif { - if(event->count > 0) - return FALSE; - - GdkWindow* window = gtk_widget_get_window(widget); - // I've seen this recommended somewhere... // TODO: Is this needed? Maybe it is just cruft... // gst_x_overlay_set_xwindow_id( GST_X_OVERLAY(be->m_xoverlay), @@ -282,9 +299,17 @@ static gboolean gtk_window_expose_callback(GtkWidget *widget, else { // draw a black background like some other backends do.... - gdk_draw_rectangle (window, widget->style->black_gc, TRUE, 0, 0, +#ifdef __WXGTK3__ + GtkAllocation a; + gtk_widget_get_allocation(widget, &a); + cairo_rectangle(cr, 0, 0, a.width, a.height); + cairo_set_source_rgb(cr, 0, 0, 0); + cairo_fill(cr); +#else + gdk_draw_rectangle (event->window, widget->style->black_gc, TRUE, 0, 0, widget->allocation.width, widget->allocation.height); +#endif } return FALSE; @@ -310,11 +335,15 @@ static gint gtk_window_realize_callback(GtkWidget* widget, wxASSERT(window); gst_x_overlay_set_xwindow_id( GST_X_OVERLAY(be->m_xoverlay), - GDK_WINDOW_XWINDOW( window ) + GDK_WINDOW_XID(window) ); g_signal_connect (be->GetControl()->m_wxwindow, - "expose_event", - G_CALLBACK(gtk_window_expose_callback), be); +#ifdef __WXGTK3__ + "draw", G_CALLBACK(draw), +#else + "expose_event", G_CALLBACK(expose_event), +#endif + be); return 0; } } @@ -371,15 +400,10 @@ static void gst_error_callback(GstElement *WXUNUSED(play), GstElement *WXUNUSED(src), GError *err, gchar *debug, - wxGStreamerMediaBackend* WXUNUSED(be)) + wxGStreamerMediaBackend* be) { - wxString sError; - sError.Printf(wxT("gst_error_callback\n") - wxT("Error Message:%s\nDebug:%s\n"), - (const wxChar*)wxConvUTF8.cMB2WX(err->message), - (const wxChar*)wxConvUTF8.cMB2WX(debug)); - wxLogTrace(wxTRACE_GStreamer, sError); - wxLogSysError(sError); + wxMutexLocker lock(be->m_mutexErr); + be->m_errors.push_back(wxGStreamerMediaBackend::Error(err->message, debug)); } } @@ -470,6 +494,15 @@ static gboolean gst_bus_async_callback(GstBus* WXUNUSED(bus), GstMessage* message, wxGStreamerMediaBackend* be) { + if ( GST_MESSAGE_TYPE(message) == GST_MESSAGE_ERROR ) + { + GError* error; + gchar* debug; + gst_message_parse_error(message, &error, &debug); + gst_error_callback(NULL, NULL, error, debug, be); + return FALSE; + } + if(((GstElement*)GST_MESSAGE_SRC(message)) != be->m_playbin) return TRUE; if(be->m_asynclock.TryLock() != wxMUTEX_NO_ERROR) @@ -490,14 +523,7 @@ static gboolean gst_bus_async_callback(GstBus* WXUNUSED(bus), gst_finish_callback(NULL, be); break; } - case GST_MESSAGE_ERROR: - { - GError* error; - gchar* debug; - gst_message_parse_error(message, &error, &debug); - gst_error_callback(NULL, NULL, error, debug, be); - break; - } + default: break; } @@ -716,16 +742,19 @@ void wxGStreamerMediaBackend::SetupXOverlay() #endif gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(m_xoverlay), #ifdef __WXGTK__ - GDK_WINDOW_XWINDOW( window ) + GDK_WINDOW_XID(window) #else ctrl->GetHandle() #endif ); #ifdef __WXGTK__ g_signal_connect(m_ctrl->m_wxwindow, - // m_ctrl->m_wxwindow/*m_ctrl->m_widget*/, - "expose_event", - G_CALLBACK(gtk_window_expose_callback), this); +#ifdef __WXGTK3__ + "draw", G_CALLBACK(draw), +#else + "expose_event", G_CALLBACK(expose_event), +#endif + this); } // end if GtkPizza realized #endif } @@ -956,6 +985,32 @@ wxGStreamerMediaBackend::~wxGStreamerMediaBackend() } } +//----------------------------------------------------------------------------- +// wxGStreamerMediaBackend::CheckForErrors +// +// Reports any errors received from gstreamer. Should be called after any +// failure. +//----------------------------------------------------------------------------- +bool wxGStreamerMediaBackend::CheckForErrors() +{ + wxMutexLocker lock(m_mutexErr); + if ( m_errors.empty() ) + return false; + + for ( unsigned n = 0; n < m_errors.size(); n++ ) + { + const Error& err = m_errors[n]; + + wxLogTrace(wxTRACE_GStreamer, + "gst_error_callback: %s", err.m_debug); + wxLogError(_("Media playback error: %s"), err.m_message); + } + + m_errors.clear(); + + return true; +} + //----------------------------------------------------------------------------- // wxGStreamerMediaBackend::CreateControl // @@ -979,11 +1034,7 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, char **argvGST = new char*[wxTheApp->argc + 1]; for ( i = 0; i < wxTheApp->argc; i++ ) { -#if wxUSE_UNICODE_WCHAR - argvGST[i] = wxStrdupA(wxConvUTF8.cWX2MB(wxTheApp->argv[i])); -#else argvGST[i] = wxStrdupA(wxTheApp->argv[i].utf8_str()); -#endif } argvGST[wxTheApp->argc] = NULL; @@ -1159,7 +1210,7 @@ bool wxGStreamerMediaBackend::CreateControl(wxControl* ctrl, wxWindow* parent, //----------------------------------------------------------------------------- bool wxGStreamerMediaBackend::Load(const wxString& fileName) { - return DoLoad(wxString( wxT("file://") ) + fileName); + return DoLoad(wxFileSystem::FileNameToURL(fileName)); } //----------------------------------------------------------------------------- @@ -1212,9 +1263,10 @@ bool wxGStreamerMediaBackend::DoLoad(const wxString& locstring) GST_STATE_READY) == GST_STATE_FAILURE || !SyncStateChange(m_playbin, GST_STATE_READY)) { - wxLogSysError(wxT("wxGStreamerMediaBackend::Load - ") - wxT("Could not set initial state to ready")); - return false; + CheckForErrors(); + + wxLogError(_("Failed to prepare playing \"%s\"."), locstring); + return false; } // free current media resources @@ -1234,11 +1286,18 @@ bool wxGStreamerMediaBackend::DoLoad(const wxString& locstring) GST_STATE_PAUSED) == GST_STATE_FAILURE || !SyncStateChange(m_playbin, GST_STATE_PAUSED)) { + CheckForErrors(); return false; // no real error message needed here as this is // generic failure 99% of the time (i.e. no // source etc.) and has an error message } + // It may happen that both calls above succeed but we actually had some + // errors during the pipeline setup and it doesn't play. E.g. this happens + // if XVideo extension is unavailable but xvimagesink is still used. + if ( CheckForErrors() ) + return false; + NotifyMovieLoaded(); // Notify the user - all we can do for now return true; @@ -1256,7 +1315,11 @@ bool wxGStreamerMediaBackend::Play() { if (gst_element_set_state (m_playbin, GST_STATE_PLAYING) == GST_STATE_FAILURE) + { + CheckForErrors(); return false; + } + return true; } @@ -1272,7 +1335,10 @@ bool wxGStreamerMediaBackend::Pause() m_llPausedPos = wxGStreamerMediaBackend::GetPosition(); if (gst_element_set_state (m_playbin, GST_STATE_PAUSED) == GST_STATE_FAILURE) + { + CheckForErrors(); return false; + } return true; } @@ -1292,6 +1358,7 @@ bool wxGStreamerMediaBackend::Stop() GST_STATE_PAUSED) == GST_STATE_FAILURE || !SyncStateChange(m_playbin, GST_STATE_PAUSED)) { + CheckForErrors(); wxLogSysError(wxT("Could not set state to paused for Stop()")); return false; } diff --git a/Externals/wxWidgets3/src/unix/mimetype.cpp b/Externals/wxWidgets3/src/unix/mimetype.cpp index ec2a0b9605..265f86aae0 100644 --- a/Externals/wxWidgets3/src/unix/mimetype.cpp +++ b/Externals/wxWidgets3/src/unix/mimetype.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 23.09.98 -// RCS-ID: $Id: mimetype.cpp 70622 2012-02-18 19:43:03Z SN $ // Copyright: (c) 1998 Vadim Zeitlin // Licence: wxWindows licence (part of wxExtra library) ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/unix/net.cpp b/Externals/wxWidgets3/src/unix/net.cpp index b703530415..3125aadc2c 100644 --- a/Externals/wxWidgets3/src/unix/net.cpp +++ b/Externals/wxWidgets3/src/unix/net.cpp @@ -4,7 +4,6 @@ // Author: Karsten Ballüder // Modified by: // Created: 03.10.99 -// RCS-ID: $Id: net.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) Karsten Ballüder // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/unix/snglinst.cpp b/Externals/wxWidgets3/src/unix/snglinst.cpp index f3f7627ec4..f8f1c3b4e0 100644 --- a/Externals/wxWidgets3/src/unix/snglinst.cpp +++ b/Externals/wxWidgets3/src/unix/snglinst.cpp @@ -5,7 +5,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 09.06.01 -// RCS-ID: $Id: snglinst.cpp 64940 2010-07-13 13:29:13Z VZ $ // Copyright: (c) 2001 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/unix/sockunix.cpp b/Externals/wxWidgets3/src/unix/sockunix.cpp index 88b8ea06ca..7d47f18e95 100644 --- a/Externals/wxWidgets3/src/unix/sockunix.cpp +++ b/Externals/wxWidgets3/src/unix/sockunix.cpp @@ -4,7 +4,6 @@ // Authors: Guilhem Lavaux, Guillermo Rodriguez Garcia, David Elliott, // Vadim Zeitlin // Created: April 1997 -// RCS-ID: $Id: sockunix.cpp 61813 2009-09-03 00:24:21Z VZ $ // Copyright: (c) 1997 Guilhem Lavaux // (c) 2008 Vadim Zeitlin // Licence: wxWindows licence diff --git a/Externals/wxWidgets3/src/unix/sound.cpp b/Externals/wxWidgets3/src/unix/sound.cpp index 4adc31d6fa..c6ff1bd420 100644 --- a/Externals/wxWidgets3/src/unix/sound.cpp +++ b/Externals/wxWidgets3/src/unix/sound.cpp @@ -4,7 +4,6 @@ // Author: Marcel Rasche, Vaclav Slavik // Modified by: // Created: 25/10/98 -// RCS-ID: $Id: sound.cpp 69178 2011-09-21 15:08:02Z VZ $ // Copyright: (c) Julian Smart, Open Source Applications Foundation // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/unix/sound_sdl.cpp b/Externals/wxWidgets3/src/unix/sound_sdl.cpp index cdafcc4c4c..0fc4ebf3ff 100644 --- a/Externals/wxWidgets3/src/unix/sound_sdl.cpp +++ b/Externals/wxWidgets3/src/unix/sound_sdl.cpp @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 2004/01/31 -// RCS-ID: $Id: sound_sdl.cpp 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) 2004, Open Source Applications Foundation // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -213,7 +212,11 @@ bool wxSoundBackendSDL::OpenAudio() { #if wxUSE_LOG_DEBUG char driver[256]; +#if SDL_MAJOR_VERSION == 1 SDL_AudioDriverName(driver, 256); +#elif SDL_MAJOR_VERSION > 1 + strncpy(driver, SDL_GetCurrentAudioDriver(), 256); +#endif wxLogTrace(wxT("sound"), wxT("opened audio, driver '%s'"), wxString(driver, wxConvLocal).c_str()); #endif diff --git a/Externals/wxWidgets3/src/unix/stackwalk.cpp b/Externals/wxWidgets3/src/unix/stackwalk.cpp index 3f8141a91a..e8cf6edff3 100644 --- a/Externals/wxWidgets3/src/unix/stackwalk.cpp +++ b/Externals/wxWidgets3/src/unix/stackwalk.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2005-01-18 -// RCS-ID: $Id: stackwalk.cpp 67254 2011-03-20 00:14:35Z DS $ // Copyright: (c) 2005 Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -130,10 +129,12 @@ void wxStackFrame::OnGetName() m_module.assign(syminfo, posOpen); } +#ifndef __WXOSX__ else // not in "module(funcname+offset)" format { m_module = syminfo; } +#endif // !__WXOSX__ } @@ -180,17 +181,18 @@ void wxStackWalker::ProcessFrames(size_t skip) if (!ms_symbols || !m_depth) return; - // we have 3 more "intermediate" frames which the calling code doesn't know - // about, account for them - skip += 3; + // we are another level down from Walk(), so adjust the number of stack + // frames to skip accordingly + skip += 1; // call addr2line only once since this call may be very slow // (it has to load in memory the entire EXE of this app which may be quite // big, especially if it contains debug info and is compiled statically!) - int towalk = InitFrames(frames, m_depth - skip, &ms_addresses[skip], &ms_symbols[skip]); + int numFrames = InitFrames(frames, m_depth - skip, + &ms_addresses[skip], &ms_symbols[skip]); // now do user-defined operations on each frame - for ( int n = 0; n < towalk - (int)skip; n++ ) + for ( int n = 0; n < numFrames; n++ ) OnStackFrame(frames[n]); } @@ -204,6 +206,28 @@ void wxStackWalker::FreeStack() m_depth = 0; } +namespace +{ + +// Helper function to read a line from the file and return it without the +// trailing newline. Line number is only used for error reporting. +bool ReadLine(FILE* fp, unsigned long num, wxString* line) +{ + if ( !fgets(g_buf, WXSIZEOF(g_buf), fp) ) + { + wxLogDebug(wxS("cannot read address information for stack frame #%lu"), + num); + return false; + } + + *line = wxString::FromAscii(g_buf); + line->RemoveLast(); + + return true; +} + +} // anonymous namespace + int wxStackWalker::InitFrames(wxStackFrame *arr, size_t n, void **addresses, char **syminfo) { // we need to launch addr2line tool to get this information and we need to @@ -220,9 +244,13 @@ int wxStackWalker::InitFrames(wxStackFrame *arr, size_t n, void **addresses, cha } } - // build the (long) command line for executing addr2line in an optimized way - // (e.g. use always chars, even in Unicode build: popen() always takes chars) + // build the command line for executing addr2line or atos under OS X using + // char* directly to avoid the conversions from Unicode +#ifdef __WXOSX__ + int len = snprintf(g_buf, BUFSIZE, "atos -p %d", (int)getpid()); +#else int len = snprintf(g_buf, BUFSIZE, "addr2line -C -f -e \"%s\"", (const char*) exepath.mb_str()); +#endif len = (len <= 0) ? strlen(g_buf) : len; // in case snprintf() is broken for (size_t i=0; i // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -122,7 +121,7 @@ wxString wxStandardPaths::GetExecutablePath() const wxString exeStr; char buf[4096]; - int result = readlink("/proc/self/exe", buf, WXSIZEOF(buf) - sizeof(char)); + int result = readlink("/proc/self/exe", buf, WXSIZEOF(buf) - 1); if ( result != -1 ) { buf[result] = '\0'; // readlink() doesn't NUL-terminate the buffer diff --git a/Externals/wxWidgets3/src/unix/taskbarx11.cpp b/Externals/wxWidgets3/src/unix/taskbarx11.cpp index 6ff97ff6e2..146d2ccd9c 100644 --- a/Externals/wxWidgets3/src/unix/taskbarx11.cpp +++ b/Externals/wxWidgets3/src/unix/taskbarx11.cpp @@ -4,7 +4,6 @@ // Author: Vaclav Slavik // Modified by: // Created: 04/04/2003 -// RCS-ID: $Id: taskbarx11.cpp 61508 2009-07-23 20:30:22Z VZ $ // Copyright: (c) Vaclav Slavik, 2003 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/unix/threadpsx.cpp b/Externals/wxWidgets3/src/unix/threadpsx.cpp index 95e235a05f..4efe5d56f1 100644 --- a/Externals/wxWidgets3/src/unix/threadpsx.cpp +++ b/Externals/wxWidgets3/src/unix/threadpsx.cpp @@ -4,7 +4,6 @@ // Author: Original from Wolfram Gloger/Guilhem Lavaux // Modified by: K. S. Sreeram (2002): POSIXified wxCondition, added wxSemaphore // Created: 04/22/98 -// RCS-ID: $Id: threadpsx.cpp 69881 2011-12-01 14:22:07Z VZ $ // Copyright: (c) Wolfram Gloger (1996, 1997) // Guilhem Lavaux (1998) // Vadim Zeitlin (1999-2002) @@ -54,10 +53,17 @@ #include #endif +#ifdef HAVE_ABI_FORCEDUNWIND + #include +#endif + +#ifdef HAVE_SETPRIORITY + #include // for setpriority() +#endif + // we use wxFFile under Linux in GetCPUCount() #ifdef __LINUX__ #include "wx/ffile.h" - #include // for setpriority() #endif #define THR_ID_CAST(id) (reinterpret_cast(id)) @@ -703,6 +709,8 @@ public: static void *PthreadStart(wxThread *thread); // thread actions + // create the thread + wxThreadError Create(wxThread *thread, unsigned int stackSize); // start the thread wxThreadError Run(); // unblock the thread allowing it to run @@ -740,6 +748,8 @@ public: // id pthread_t GetId() const { return m_threadId; } pthread_t *GetIdPtr() { return &m_threadId; } + // "created" flag + bool WasCreated() const { return m_created; } // "cancelled" flag void SetCancelFlag() { m_cancelled = true; } bool WasCancelled() const { return m_cancelled; } @@ -770,6 +780,9 @@ private: wxThreadState m_state; // see wxThreadState enum int m_prio; // in wxWidgets units: from 0 to 100 + // this flag is set when the thread was successfully created + bool m_created; + // this flag is set when the thread should terminate bool m_cancelled; @@ -851,12 +864,24 @@ void *wxThreadInternal::PthreadStart(wxThread *thread) wxTRY { - pthread->m_exitcode = thread->Entry(); + pthread->m_exitcode = thread->CallEntry(); wxLogTrace(TRACE_THREADS, wxT("Thread %p Entry() returned %lu."), THR_ID(pthread), wxPtrToUInt(pthread->m_exitcode)); } +#ifdef HAVE_ABI_FORCEDUNWIND + // When using common C++ ABI under Linux we must always rethrow this + // special exception used to unwind the stack when the thread was + // cancelled, otherwise the thread library would simply terminate the + // program, see http://udrepper.livejournal.com/21541.html + catch ( abi::__forced_unwind& ) + { + wxCriticalSectionLocker lock(thread->m_critsect); + pthread->SetState(STATE_EXITED); + throw; + } +#endif // HAVE_ABI_FORCEDUNWIND wxCATCH_ALL( wxTheApp->OnUnhandledException(); ) { @@ -937,8 +962,9 @@ void wxThreadInternal::Cleanup(wxThread *thread) wxThreadInternal::wxThreadInternal() { m_state = STATE_NEW; + m_created = false; m_cancelled = false; - m_prio = WXTHREAD_DEFAULT_PRIORITY; + m_prio = wxPRIORITY_DEFAULT; m_threadId = 0; m_exitcode = 0; @@ -954,6 +980,132 @@ wxThreadInternal::~wxThreadInternal() { } +#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE + #define WXUNUSED_STACKSIZE(identifier) identifier +#else + #define WXUNUSED_STACKSIZE(identifier) WXUNUSED(identifier) +#endif + +wxThreadError wxThreadInternal::Create(wxThread *thread, + unsigned int WXUNUSED_STACKSIZE(stackSize)) +{ + if ( GetState() != STATE_NEW ) + { + // don't recreate thread + 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_PTHREAD_ATTR_SETSTACKSIZE + if (stackSize) + pthread_attr_setstacksize(&attr, stackSize); +#endif + +#ifdef HAVE_THREAD_PRIORITY_FUNCTIONS + int policy; + if ( pthread_attr_getschedpolicy(&attr, &policy) != 0 ) + { + wxLogError(_("Cannot retrieve thread scheduling policy.")); + } + +#ifdef __VMS__ + /* the pthread.h contains too many spaces. This is a work-around */ +# undef sched_get_priority_max +#undef sched_get_priority_min +#define sched_get_priority_max(_pol_) \ + (_pol_ == SCHED_OTHER ? PRI_FG_MAX_NP : PRI_FIFO_MAX) +#define sched_get_priority_min(_pol_) \ + (_pol_ == SCHED_OTHER ? PRI_FG_MIN_NP : PRI_FIFO_MIN) +#endif + + int max_prio = sched_get_priority_max(policy), + min_prio = sched_get_priority_min(policy), + prio = GetPriority(); + + if ( min_prio == -1 || max_prio == -1 ) + { + wxLogError(_("Cannot get priority range for scheduling policy %d."), + policy); + } + else if ( max_prio == min_prio ) + { + if ( prio != wxPRIORITY_DEFAULT ) + { + // notify the programmer that this doesn't work here + wxLogWarning(_("Thread priority setting is ignored.")); + } + //else: we have default priority, so don't complain + + // anyhow, don't do anything because priority is just ignored + } + else + { + struct sched_param sp; + if ( pthread_attr_getschedparam(&attr, &sp) != 0 ) + { + wxFAIL_MSG(wxT("pthread_attr_getschedparam() failed")); + } + + sp.sched_priority = min_prio + (prio*(max_prio - min_prio))/100; + + if ( pthread_attr_setschedparam(&attr, &sp) != 0 ) + { + wxFAIL_MSG(wxT("pthread_attr_setschedparam(priority) failed")); + } + } +#endif // HAVE_THREAD_PRIORITY_FUNCTIONS + +#ifdef HAVE_PTHREAD_ATTR_SETSCOPE + // this will make the threads created by this process really concurrent + if ( pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) != 0 ) + { + wxFAIL_MSG(wxT("pthread_attr_setscope(PTHREAD_SCOPE_SYSTEM) failed")); + } +#endif // HAVE_PTHREAD_ATTR_SETSCOPE + + // VZ: assume that this one is always available (it's rather fundamental), + // if this function is ever missing we should try to use + // pthread_detach() instead (after thread creation) + if ( thread->IsDetached() ) + { + if ( pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) != 0 ) + { + wxFAIL_MSG(wxT("pthread_attr_setdetachstate(DETACHED) failed")); + } + + // never try to join detached threads + Detach(); + } + //else: threads are created joinable by default, it's ok + + // create the new OS thread object + int rc = pthread_create + ( + GetIdPtr(), + &attr, + wxPthreadStart, + (void *)thread + ); + + if ( pthread_attr_destroy(&attr) != 0 ) + { + wxFAIL_MSG(wxT("pthread_attr_destroy() failed")); + } + + if ( rc != 0 ) + { + SetState(STATE_EXITED); + + return wxTHREAD_NO_RESOURCE; + } + + m_created = true; + return wxTHREAD_NO_ERROR; +} + wxThreadError wxThreadInternal::Run() { wxCHECK_MSG( GetState() == STATE_NEW, wxTHREAD_RUNNING, @@ -1127,18 +1279,23 @@ wxThreadIdType wxThread::GetCurrentId() bool wxThread::SetConcurrency(size_t level) { -#ifdef HAVE_THR_SETCONCURRENCY +#ifdef HAVE_PTHREAD_SET_CONCURRENCY + int rc = pthread_setconcurrency( level ); +#elif defined(HAVE_THR_SETCONCURRENCY) int rc = thr_setconcurrency(level); - if ( rc != 0 ) - { - wxLogSysError(rc, wxT("thr_setconcurrency() failed")); - } - - return rc == 0; #else // !HAVE_THR_SETCONCURRENCY // ok only for the default value - return level == 0; + int rc = level == 0 ? 0 : -1; #endif // HAVE_THR_SETCONCURRENCY/!HAVE_THR_SETCONCURRENCY + + if ( rc != 0 ) + { + wxLogSysError(rc, _("Failed to set thread concurrency level to %lu"), + static_cast(level)); + return false; + } + + return true; } // ----------------------------------------------------------------------------- @@ -1159,136 +1316,25 @@ wxThread::wxThread(wxThreadKind kind) m_isDetached = kind == wxTHREAD_DETACHED; } -#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE - #define WXUNUSED_STACKSIZE(identifier) identifier -#else - #define WXUNUSED_STACKSIZE(identifier) WXUNUSED(identifier) -#endif - -wxThreadError wxThread::Create(unsigned int WXUNUSED_STACKSIZE(stackSize)) +wxThreadError wxThread::Create(unsigned int stackSize) { - if ( m_internal->GetState() != STATE_NEW ) - { - // don't recreate thread - return wxTHREAD_RUNNING; - } + wxCriticalSectionLocker lock(m_critsect); - // set up the thread attribute: right now, we only set thread priority - pthread_attr_t attr; - pthread_attr_init(&attr); - -#ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE - if (stackSize) - pthread_attr_setstacksize(&attr, stackSize); -#endif - -#ifdef HAVE_THREAD_PRIORITY_FUNCTIONS - int policy; - if ( pthread_attr_getschedpolicy(&attr, &policy) != 0 ) - { - wxLogError(_("Cannot retrieve thread scheduling policy.")); - } - -#ifdef __VMS__ - /* the pthread.h contains too many spaces. This is a work-around */ -# undef sched_get_priority_max -#undef sched_get_priority_min -#define sched_get_priority_max(_pol_) \ - (_pol_ == SCHED_OTHER ? PRI_FG_MAX_NP : PRI_FIFO_MAX) -#define sched_get_priority_min(_pol_) \ - (_pol_ == SCHED_OTHER ? PRI_FG_MIN_NP : PRI_FIFO_MIN) -#endif - - int max_prio = sched_get_priority_max(policy), - min_prio = sched_get_priority_min(policy), - prio = m_internal->GetPriority(); - - if ( min_prio == -1 || max_prio == -1 ) - { - wxLogError(_("Cannot get priority range for scheduling policy %d."), - policy); - } - else if ( max_prio == min_prio ) - { - if ( prio != WXTHREAD_DEFAULT_PRIORITY ) - { - // notify the programmer that this doesn't work here - wxLogWarning(_("Thread priority setting is ignored.")); - } - //else: we have default priority, so don't complain - - // anyhow, don't do anything because priority is just ignored - } - else - { - struct sched_param sp; - if ( pthread_attr_getschedparam(&attr, &sp) != 0 ) - { - wxFAIL_MSG(wxT("pthread_attr_getschedparam() failed")); - } - - sp.sched_priority = min_prio + (prio*(max_prio - min_prio))/100; - - if ( pthread_attr_setschedparam(&attr, &sp) != 0 ) - { - wxFAIL_MSG(wxT("pthread_attr_setschedparam(priority) failed")); - } - } -#endif // HAVE_THREAD_PRIORITY_FUNCTIONS - -#ifdef HAVE_PTHREAD_ATTR_SETSCOPE - // this will make the threads created by this process really concurrent - if ( pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM) != 0 ) - { - wxFAIL_MSG(wxT("pthread_attr_setscope(PTHREAD_SCOPE_SYSTEM) failed")); - } -#endif // HAVE_PTHREAD_ATTR_SETSCOPE - - // VZ: assume that this one is always available (it's rather fundamental), - // if this function is ever missing we should try to use - // pthread_detach() instead (after thread creation) - if ( m_isDetached ) - { - if ( pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) != 0 ) - { - wxFAIL_MSG(wxT("pthread_attr_setdetachstate(DETACHED) failed")); - } - - // never try to join detached threads - m_internal->Detach(); - } - //else: threads are created joinable by default, it's ok - - // create the new OS thread object - int rc = pthread_create - ( - m_internal->GetIdPtr(), - &attr, - wxPthreadStart, - (void *)this - ); - - if ( pthread_attr_destroy(&attr) != 0 ) - { - wxFAIL_MSG(wxT("pthread_attr_destroy() failed")); - } - - if ( rc != 0 ) - { - m_internal->SetState(STATE_EXITED); - - return wxTHREAD_NO_RESOURCE; - } - - return wxTHREAD_NO_ERROR; + return m_internal->Create(this, stackSize); } wxThreadError wxThread::Run() { wxCriticalSectionLocker lock(m_critsect); - wxCHECK_MSG( m_internal->GetId(), wxTHREAD_MISC_ERROR, - wxT("must call wxThread::Create() first") ); + // Create the thread if it wasn't created yet with an explicit + // Create() call: + if ( !m_internal->WasCreated() ) + { + wxThreadError rv = m_internal->Create(this, 0); + if ( rv != wxTHREAD_NO_ERROR ) + return rv; + } return m_internal->Run(); } @@ -1299,8 +1345,7 @@ wxThreadError wxThread::Run() void wxThread::SetPriority(unsigned int prio) { - wxCHECK_RET( ((int)WXTHREAD_MIN_PRIORITY <= (int)prio) && - ((int)prio <= (int)WXTHREAD_MAX_PRIORITY), + wxCHECK_RET( wxPRIORITY_MIN <= prio && prio <= wxPRIORITY_MAX, wxT("invalid thread priority") ); wxCriticalSectionLocker lock(m_critsect); @@ -1326,8 +1371,7 @@ void wxThread::SetPriority(unsigned int prio) // // FIXME this is not true for 2.6!! - // map wx priorites WXTHREAD_MIN_PRIORITY..WXTHREAD_MAX_PRIORITY - // to Unix priorities 20..-20 + // map wx priorites 0..100 to Unix priorities 20..-20 if ( setpriority(PRIO_PROCESS, 0, -(2*(int)prio)/5 + 20) == -1 ) { wxLogError(_("Failed to set thread priority %d."), prio); @@ -1832,7 +1876,7 @@ static void DeleteThread(wxThread *This) } } -#ifndef __WXOSX__ +#ifndef __DARWIN__ void wxMutexGuiEnterImpl() { diff --git a/Externals/wxWidgets3/src/unix/timerunx.cpp b/Externals/wxWidgets3/src/unix/timerunx.cpp index e20034b32c..1d99805f54 100644 --- a/Externals/wxWidgets3/src/unix/timerunx.cpp +++ b/Externals/wxWidgets3/src/unix/timerunx.cpp @@ -3,7 +3,6 @@ // Purpose: wxTimer implementation for non-GUI applications under Unix // Author: Lukasz Michalski // Created: 15/01/2005 -// RCS-ID: $Id: timerunx.cpp 69839 2011-11-27 19:50:33Z VZ $ // Copyright: (c) 2007 Lukasz Michalski // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/Externals/wxWidgets3/src/unix/uiactionx11.cpp b/Externals/wxWidgets3/src/unix/uiactionx11.cpp index c9e87870fe..a19a3d2284 100644 --- a/Externals/wxWidgets3/src/unix/uiactionx11.cpp +++ b/Externals/wxWidgets3/src/unix/uiactionx11.cpp @@ -4,7 +4,6 @@ // Author: Kevin Ollivier, Steven Lamerton, Vadim Zeitlin // Modified by: // Created: 2010-03-06 -// RCS-ID: $Id: uiactionx11.cpp 69626 2011-11-01 12:04:27Z VZ $ // Copyright: (c) Kevin Ollivier // (c) 2010 Steven Lamerton // (c) 2010 Vadim Zeitlin @@ -16,6 +15,8 @@ #if wxUSE_UIACTIONSIMULATOR #include "wx/uiaction.h" +#include "wx/event.h" +#include "wx/evtloop.h" #include #include @@ -88,6 +89,15 @@ bool wxUIActionSimulator::MouseMove(long x, long y) Window root = display.DefaultRoot(); XWarpPointer(display, None, root, 0, 0, 0, 0, x, y); + // At least with wxGTK we must always process the pending events before the + // mouse position change really takes effect, so just do it from here + // instead of forcing the client code using this function to always use + // wxYield() which is unnecessary under the other platforms. + if ( wxEventLoopBase* const loop = wxEventLoop::GetActive() ) + { + loop->YieldFor(wxEVT_CATEGORY_USER_INPUT); + } + return true; } diff --git a/Externals/wxWidgets3/src/unix/utilsunx.cpp b/Externals/wxWidgets3/src/unix/utilsunx.cpp index 8ee71798fb..98548a2e3f 100644 --- a/Externals/wxWidgets3/src/unix/utilsunx.cpp +++ b/Externals/wxWidgets3/src/unix/utilsunx.cpp @@ -2,8 +2,8 @@ // Name: src/unix/utilsunx.cpp // Purpose: generic Unix implementation of many wx functions (for wxBase) // Author: Vadim Zeitlin -// Id: $Id: utilsunx.cpp 67411 2011-04-06 17:04:12Z PC $ // Copyright: (c) 1998 Robert Roebling, Vadim Zeitlin +// (c) 2013 Rob Bresalier, Vadim Zeitlin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -37,6 +37,7 @@ #include "wx/apptrait.h" #include "wx/process.h" +#include "wx/scopedptr.h" #include "wx/thread.h" #include "wx/cmdline.h" @@ -46,11 +47,12 @@ #include "wx/private/selectdispatcher.h" #include "wx/private/fdiodispatcher.h" #include "wx/unix/execute.h" +#include "wx/unix/pipe.h" #include "wx/unix/private.h" -#ifdef wxHAS_GENERIC_PROCESS_CALLBACK -#include "wx/private/fdiodispatcher.h" -#endif +#include "wx/evtloop.h" +#include "wx/mstream.h" +#include "wx/private/fdioeventloopsourcehandler.h" #include #include // waitpid() @@ -63,32 +65,12 @@ #if HAS_PIPE_STREAMS -// define this to let wxexec.cpp know that we know what we're doing -#define _WX_USED_BY_WXEXECUTE_ -#include "../common/execcmn.cpp" +#include "wx/private/pipestream.h" +#include "wx/private/streamtempinput.h" +#include "wx/unix/private/executeiohandler.h" #endif // HAS_PIPE_STREAMS -#if defined(__MWERKS__) && defined(__MACH__) - #ifndef WXWIN_OS_DESCRIPTION - #define WXWIN_OS_DESCRIPTION "MacOS X" - #endif - #ifndef HAVE_NANOSLEEP - #define HAVE_NANOSLEEP - #endif - #ifndef HAVE_UNAME - #define HAVE_UNAME - #endif - - // our configure test believes we can use sigaction() if the function is - // available but Metrowekrs with MSL run-time does have the function but - // doesn't have sigaction struct so finally we can't use it... - #ifdef __MSL__ - #undef wxUSE_ON_FATAL_EXCEPTION - #define wxUSE_ON_FATAL_EXCEPTION 0 - #endif -#endif - // not only the statfs syscall is called differently depending on platform, but // one of its incarnations, statvfs(), takes different arguments under // different platforms and even different versions of the same system (Solaris @@ -137,7 +119,6 @@ #include #include #include -#include // for O_WRONLY and friends #include // nanosleep() and/or usleep() #include // isspace() #include // needed for FD_SETSIZE @@ -152,6 +133,10 @@ #include // for SAGET and MINFO structures #endif +#ifdef HAVE_SETPRIORITY + #include // for setpriority() +#endif + // ---------------------------------------------------------------------------- // conditional compilation // ---------------------------------------------------------------------------- @@ -502,6 +487,83 @@ long wxExecute(wchar_t **wargv, int flags, wxProcess *process, #endif // wxUSE_UNICODE +namespace +{ + +// Helper function of wxExecute(): wait for the process termination without +// dispatching any events. +// +// This is used in wxEXEC_NOEVENTS case. +int BlockUntilChildExit(wxExecuteData& execData) +{ + wxCHECK_MSG( wxTheApp, -1, + wxS("Can't block until child exit without wxTheApp") ); + +#if wxUSE_SELECT_DISPATCHER + + // Even if we don't want to dispatch events, we still need to handle + // child IO notifications and process termination concurrently, i.e. + // we can't simply block waiting for the child to terminate as we would + // dead lock if it writes more than the pipe buffer size (typically + // 4KB) bytes of output -- it would then block waiting for us to read + // the data while we'd block waiting for it to terminate. + // + // So while we don't use the full blown event loop, we still do use a + // dispatcher with which we register just the 3 FDs we're interested + // in: the child stdout and stderr and the pipe written to by the + // signal handler so that we could react to the child process + // termination too. + + // Notice that we must create a new dispatcher object here instead of + // reusing the global wxFDIODispatcher::Get() because we want to + // monitor only the events on the FDs explicitly registered with this + // one and not all the other ones that could be registered with the + // global dispatcher (think about the case of nested wxExecute() calls). + wxSelectDispatcher dispatcher; + + // Do register all the FDs we want to monitor here: first, the one used to + // handle the signals asynchronously. + wxScopedPtr + signalHandler(wxTheApp->RegisterSignalWakeUpPipe(dispatcher)); + +#if wxUSE_STREAMS + // And then the two for the child output and error streams if necessary. + wxScopedPtr + stdoutHandler, + stderrHandler; + if ( execData.IsRedirected() ) + { + stdoutHandler.reset(new wxExecuteFDIOHandler + ( + dispatcher, + execData.fdOut, + execData.bufOut + )); + stderrHandler.reset(new wxExecuteFDIOHandler + ( + dispatcher, + execData.fdErr, + execData.bufErr + )); + } +#endif // wxUSE_STREAMS + + // And dispatch until the PID is reset from wxExecuteData::OnExit(). + while ( execData.pid ) + { + dispatcher.Dispatch(); + } + + return execData.exitcode; +#else // !wxUSE_SELECT_DISPATCHER + wxFAIL_MSG( wxS("Can't block until child exit without wxSelectDispatcher") ); + + return -1; +#endif // wxUSE_SELECT_DISPATCHER/!wxUSE_SELECT_DISPATCHER +} + +} // anonymous namespace + // wxExecute: the real worker function long wxExecute(char **argv, int flags, wxProcess *process, const wxExecuteEnv *env) @@ -536,21 +598,14 @@ long wxExecute(char **argv, int flags, wxProcess *process, } #endif // __DARWIN__ - // this struct contains all information which we use for housekeeping - wxExecuteData execData; + wxScopedPtr execDataPtr(new wxExecuteData); + wxExecuteData& execData = *execDataPtr; + execData.flags = flags; execData.process = process; - // create pipes - if ( !execData.pipeEndProcDetect.Create() ) - { - wxLogError( _("Failed to execute '%s'\n"), *argv ); - - return ERROR_RETURN_CODE; - } - - // pipes for inter process communication + // create pipes for inter process communication wxPipe pipeIn, // stdin pipeOut, // stdout pipeErr; // stderr @@ -565,6 +620,21 @@ long wxExecute(char **argv, int flags, wxProcess *process, } } + // priority: we need to map wxWidgets priority which is in the range 0..100 + // to Unix nice value which is in the range -20..19. As there is an odd + // number of elements in our range and an even number in the Unix one, we + // have to do it in this rather ugly way to guarantee that: + // 1. wxPRIORITY_{MIN,DEFAULT,MAX} map to -20, 0 and 19 respectively. + // 2. The mapping is monotonously increasing. + // 3. The mapping is onto the target range. + int prio = process ? process->GetPriority() : 0; + if ( prio <= 50 ) + prio = (2*prio)/5 - 20; + else if ( prio < 55 ) + prio = 1; + else + prio = (2*prio)/5 - 21; + // fork the process // // NB: do *not* use vfork() here, it completely breaks this code for some @@ -598,6 +668,13 @@ long wxExecute(char **argv, int flags, wxProcess *process, } #endif // !__VMS +#if defined(HAVE_SETPRIORITY) + if ( prio && setpriority(PRIO_PROCESS, 0, prio) != 0 ) + { + wxLogSysError(_("Failed to set process priority")); + } +#endif // HAVE_SETPRIORITY + // redirect stdin, stdout and stderr if ( pipeIn.IsOk() ) { @@ -620,13 +697,6 @@ long wxExecute(char **argv, int flags, wxProcess *process, // the descriptors do not need to be closed but for now this is better // than never closing them at all as wx code never used FD_CLOEXEC. - // Note that while the reading side of the end process detection pipe - // can be safely closed, we should keep the write one opened, it will - // be only closed when the process terminates resulting in a read - // notification to the parent - const int fdEndProc = execData.pipeEndProcDetect.Detach(wxPipe::Write); - execData.pipeEndProcDetect.Close(); - // TODO: Iterating up to FD_SETSIZE is both inefficient (because it may // be quite big) and incorrect (because in principle we could // have more opened descriptions than this number). Unfortunately @@ -638,8 +708,7 @@ long wxExecute(char **argv, int flags, wxProcess *process, { if ( fd != STDIN_FILENO && fd != STDOUT_FILENO && - fd != STDERR_FILENO && - fd != fdEndProc ) + fd != STDERR_FILENO ) { close(fd); } @@ -702,18 +771,11 @@ long wxExecute(char **argv, int flags, wxProcess *process, } else // we're in parent { - // save it for WaitForChild() use - execData.pid = pid; - if (execData.process) - execData.process->SetPid(pid); // and also in the wxProcess + execData.OnStart(pid); // prepare for IO redirection #if HAS_PIPE_STREAMS - // the input buffer bufOut is connected to stdout, this is why it is - // called bufOut and not bufIn - wxStreamTempInputBuffer bufOut, - bufErr; if ( process && process->IsRedirected() ) { @@ -744,14 +806,14 @@ long wxExecute(char **argv, int flags, wxProcess *process, process->SetPipeStreams(outStream, inStream, errStream); - bufOut.Init(outStream); - bufErr.Init(errStream); + if ( flags & wxEXEC_SYNC ) + { + execData.bufOut.Init(outStream); + execData.bufErr.Init(errStream); - execData.bufOut = &bufOut; - execData.bufErr = &bufErr; - - execData.fdOut = fdOut; - execData.fdErr = fdErr; + execData.fdOut = fdOut; + execData.fdErr = fdErr; + } } #endif // HAS_PIPE_STREAMS @@ -762,14 +824,32 @@ long wxExecute(char **argv, int flags, wxProcess *process, pipeErr.Close(); } - // we want this function to work even if there is no wxApp so ensure - // that we have a valid traits pointer - wxConsoleAppTraits traitsConsole; - wxAppTraits *traits = wxTheApp ? wxTheApp->GetTraits() : NULL; - if ( !traits ) - traits = &traitsConsole; + // For the asynchronous case we don't have to do anything else, just + // let the process run. + if ( !(flags & wxEXEC_SYNC) ) + { + // Ensure that the housekeeping data is kept alive, it will be + // destroyed only when the child terminates. + execDataPtr.release(); - return traits->WaitForChild(execData); + return execData.pid; + } + + + // If we don't need to dispatch any events, things are relatively + // simple and we don't need to delegate to wxAppTraits. + if ( flags & wxEXEC_NOEVENTS ) + { + return BlockUntilChildExit(execData); + } + + + // If we do need to dispatch events, enter a local event loop waiting + // until the child exits. As the exact kind of event loop depends on + // the sort of application we're in (console or GUI), we delegate this + // to wxAppTraits which virtualizes all the differences between the + // console and the GUI programs. + return wxApp::GetValidTraits().WaitForChild(execData); } #if !defined(__VMS) && !defined(__INTEL_COMPILER) @@ -834,15 +914,25 @@ wxString wxGetUserHome( const wxString &user ) // network and user id routines // ---------------------------------------------------------------------------- -// private utility function which returns output of the given command, removing -// the trailing newline -static wxString wxGetCommandOutput(const wxString &cmd) +// Private utility function which returns output of the given command, removing +// the trailing newline. +// +// Note that by default use Latin-1 just to ensure that we never fail, but if +// the encoding is known (e.g. UTF-8 for lsb_release), it should be explicitly +// used instead. +static wxString +wxGetCommandOutput(const wxString &cmd, wxMBConv& conv = wxConvISO8859_1) { - FILE *f = popen(cmd.ToAscii(), "r"); + // Suppress stderr from the shell to avoid outputting errors if the command + // doesn't exist. + FILE *f = popen((cmd + " 2>/dev/null").ToAscii(), "r"); if ( !f ) { - wxLogSysError(wxT("Executing \"%s\" failed"), cmd.c_str()); - return wxEmptyString; + // Notice that this doesn't happen simply if the command doesn't exist, + // but only in case of some really catastrophic failure inside popen() + // so we should really notify the user about this as this is not normal. + wxLogSysError(wxT("Executing \"%s\" failed"), cmd); + return wxString(); } wxString s; @@ -852,7 +942,7 @@ static wxString wxGetCommandOutput(const wxString &cmd) if ( !fgets(buf, sizeof(buf), f) ) break; - s += wxString::FromAscii(buf); + s += wxString(buf, conv); } pclose(f); @@ -993,26 +1083,41 @@ bool wxIsPlatform64Bit() } #ifdef __LINUX__ + +static bool +wxGetValueFromLSBRelease(wxString arg, const wxString& lhs, wxString* rhs) +{ + // lsb_release seems to just read a global file which is always in UTF-8 + // and hence its output is always in UTF-8 as well, regardless of the + // locale currently configured by our environment. + return wxGetCommandOutput(wxS("lsb_release ") + arg, wxConvUTF8) + .StartsWith(lhs, rhs); +} + wxLinuxDistributionInfo wxGetLinuxDistributionInfo() { - const wxString id = wxGetCommandOutput(wxT("lsb_release --id")); - const wxString desc = wxGetCommandOutput(wxT("lsb_release --description")); - const wxString rel = wxGetCommandOutput(wxT("lsb_release --release")); - const wxString codename = wxGetCommandOutput(wxT("lsb_release --codename")); - wxLinuxDistributionInfo ret; - id.StartsWith("Distributor ID:\t", &ret.Id); - desc.StartsWith("Description:\t", &ret.Description); - rel.StartsWith("Release:\t", &ret.Release); - codename.StartsWith("Codename:\t", &ret.CodeName); + if ( !wxGetValueFromLSBRelease(wxS("--id"), wxS("Distributor ID:\t"), + &ret.Id) ) + { + // Don't bother to continue, lsb_release is probably not available. + return ret; + } + + wxGetValueFromLSBRelease(wxS("--description"), wxS("Description:\t"), + &ret.Description); + wxGetValueFromLSBRelease(wxS("--release"), wxS("Release:\t"), + &ret.Release); + wxGetValueFromLSBRelease(wxS("--codename"), wxS("Codename:\t"), + &ret.CodeName); return ret; } -#endif +#endif // __LINUX__ // these functions are in src/osx/utilsexc_base.cpp for wxMac -#ifndef __WXMAC__ +#ifndef __DARWIN__ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin) { @@ -1048,7 +1153,7 @@ wxString wxGetOsDescription() return wxGetCommandOutput(wxT("uname -s -r -m")); } -#endif // !__WXMAC__ +#endif // !__DARWIN__ unsigned long wxGetProcessId() { @@ -1327,141 +1432,73 @@ bool wxHandleFatalExceptions(bool doit) // wxExecute support // ---------------------------------------------------------------------------- -int wxAppTraits::AddProcessCallback(wxEndProcessData *data, int fd) +int wxAppTraits::WaitForChild(wxExecuteData& execData) { - // define a custom handler processing only the closure of the descriptor - struct wxEndProcessFDIOHandler : public wxFDIOHandler +#if wxUSE_CONSOLE_EVENTLOOP + wxConsoleEventLoop loop; + return RunLoopUntilChildExit(execData, loop); +#else // !wxUSE_CONSOLE_EVENTLOOP + wxFAIL_MSG( wxS("Can't wait for child process without wxConsoleEventLoop") ); + + return -1; +#endif // wxUSE_CONSOLE_EVENTLOOP/!wxUSE_CONSOLE_EVENTLOOP +} + +// This function is common code for both console and GUI applications and used +// by wxExecute() to wait for the child exit while dispatching events. +// +// Notice that it should not be used for all the other cases, e.g. when we +// don't need to wait for the child (wxEXEC_ASYNC) or when the events must not +// dispatched (wxEXEC_NOEVENTS). +int +wxAppTraits::RunLoopUntilChildExit(wxExecuteData& execData, + wxEventLoopBase& loop) +{ + // It is possible that wxExecuteData::OnExit() had already been called + // and reset the PID to 0, in which case we don't need to do anything + // at all. + if ( !execData.pid ) + return execData.exitcode; + +#if wxUSE_STREAMS + // Monitor the child streams if necessary. + wxScopedPtr + stdoutHandler, + stderrHandler; + if ( execData.IsRedirected() ) { - wxEndProcessFDIOHandler(wxEndProcessData *data, int fd) - : m_data(data), m_fd(fd) - { - } + stdoutHandler.reset(new wxExecuteEventLoopSourceHandler + ( + execData.fdOut, execData.bufOut + )); + stderrHandler.reset(new wxExecuteEventLoopSourceHandler + ( + execData.fdErr, execData.bufErr + )); + } +#endif // wxUSE_STREAMS - virtual void OnReadWaiting() - { - wxFDIODispatcher::Get()->UnregisterFD(m_fd); - close(m_fd); + // Store the event loop in the data associated with the child + // process so that it could exit the loop when the child exits. + execData.syncEventLoop = &loop; - wxHandleProcessTermination(m_data); + // And run it. + loop.Run(); - delete this; - } - - virtual void OnWriteWaiting() { wxFAIL_MSG("unreachable"); } - virtual void OnExceptionWaiting() { wxFAIL_MSG("unreachable"); } - - wxEndProcessData * const m_data; - const int m_fd; - }; - - wxFDIODispatcher::Get()->RegisterFD - ( - fd, - new wxEndProcessFDIOHandler(data, fd), - wxFDIO_INPUT - ); - return fd; // unused, but return something unique for the tag + // The exit code will have been set when the child termination was detected. + return execData.exitcode; } -bool wxAppTraits::CheckForRedirectedIO(wxExecuteData& execData) -{ -#if HAS_PIPE_STREAMS - bool hasIO = false; +// ---------------------------------------------------------------------------- +// wxExecuteData +// ---------------------------------------------------------------------------- - if ( execData.bufOut && execData.bufOut->Update() ) - hasIO = true; - - if ( execData.bufErr && execData.bufErr->Update() ) - hasIO = true; - - return hasIO; -#else // !HAS_PIPE_STREAMS - wxUnusedVar(execData); - - return false; -#endif // HAS_PIPE_STREAMS/!HAS_PIPE_STREAMS -} - -// helper classes/functions used by WaitForChild() namespace { -// convenient base class for IO handlers which are registered for read -// notifications only and which also stores the FD we're reading from -// -// the derived classes still have to implement OnReadWaiting() -class wxReadFDIOHandler : public wxFDIOHandler -{ -public: - wxReadFDIOHandler(wxFDIODispatcher& disp, int fd) : m_fd(fd) - { - if ( fd ) - disp.RegisterFD(fd, this, wxFDIO_INPUT); - } - - virtual void OnWriteWaiting() { wxFAIL_MSG("unreachable"); } - virtual void OnExceptionWaiting() { wxFAIL_MSG("unreachable"); } - -protected: - const int m_fd; - - wxDECLARE_NO_COPY_CLASS(wxReadFDIOHandler); -}; - -// class for monitoring our end of the process detection pipe, simply sets a -// flag when input on the pipe (which must be due to EOF) is detected -class wxEndHandler : public wxReadFDIOHandler -{ -public: - wxEndHandler(wxFDIODispatcher& disp, int fd) - : wxReadFDIOHandler(disp, fd) - { - m_terminated = false; - } - - bool Terminated() const { return m_terminated; } - - virtual void OnReadWaiting() { m_terminated = true; } - -private: - bool m_terminated; - - wxDECLARE_NO_COPY_CLASS(wxEndHandler); -}; - -#if HAS_PIPE_STREAMS - -// class for monitoring our ends of child stdout/err, should be constructed -// with the FD and stream from wxExecuteData and will do nothing if they're -// invalid -// -// unlike wxEndHandler this class registers itself with the provided dispatcher -class wxRedirectedIOHandler : public wxReadFDIOHandler -{ -public: - wxRedirectedIOHandler(wxFDIODispatcher& disp, - int fd, - wxStreamTempInputBuffer *buf) - : wxReadFDIOHandler(disp, fd), - m_buf(buf) - { - } - - virtual void OnReadWaiting() - { - m_buf->Update(); - } - -private: - wxStreamTempInputBuffer * const m_buf; - - wxDECLARE_NO_COPY_CLASS(wxRedirectedIOHandler); -}; - -#endif // HAS_PIPE_STREAMS - -// helper function which calls waitpid() and analyzes the result -int DoWaitForChild(int pid, int flags = 0) +// Helper function that checks whether the child with the given PID has exited +// and fills the provided parameter with its return code if it did. +bool CheckForChildExit(int pid, int* exitcodeOut) { wxASSERT_MSG( pid > 0, "invalid PID" ); @@ -1470,124 +1507,150 @@ int DoWaitForChild(int pid, int flags = 0) // loop while we're getting EINTR for ( ;; ) { - rc = waitpid(pid, &status, flags); + rc = waitpid(pid, &status, WNOHANG); if ( rc != -1 || errno != EINTR ) break; } - if ( rc == 0 ) + switch ( rc ) { - // This can only happen if the child application closes our dummy pipe - // that is used to monitor its lifetime; in that case, our best bet is - // to pretend the process did terminate, because otherwise wxExecute() - // would hang indefinitely (OnReadWaiting() won't be called again, the - // descriptor is closed now). - wxLogDebug("Child process (PID %d) still alive but pipe closed so " - "generating a close notification", pid); - } - else if ( rc == -1 ) - { - wxLogLastError(wxString::Format("waitpid(%d)", pid)); - } - else // child did terminate - { - wxASSERT_MSG( rc == pid, "unexpected waitpid() return value" ); + case 0: + // No error but the child is still running. + return false; - // notice that the caller expects the exit code to be signed, e.g. -1 - // instead of 255 so don't assign WEXITSTATUS() to an int - signed char exitcode; - if ( WIFEXITED(status) ) - exitcode = WEXITSTATUS(status); - else if ( WIFSIGNALED(status) ) - exitcode = -WTERMSIG(status); - else - { - wxLogError("Child process (PID %d) exited for unknown reason, " - "status = %d", pid, status); - exitcode = -1; - } + case -1: + // Checking child status failed. Invalid PID? + wxLogLastError(wxString::Format("waitpid(%d)", pid)); + return false; - return exitcode; + default: + // Child did terminate. + wxASSERT_MSG( rc == pid, "unexpected waitpid() return value" ); + + // notice that the caller expects the exit code to be signed, e.g. -1 + // instead of 255 so don't assign WEXITSTATUS() to an int + signed char exitcode; + if ( WIFEXITED(status) ) + exitcode = WEXITSTATUS(status); + else if ( WIFSIGNALED(status) ) + exitcode = -WTERMSIG(status); + else + { + wxLogError("Child process (PID %d) exited for unknown reason, " + "status = %d", pid, status); + exitcode = -1; + } + + if ( exitcodeOut ) + *exitcodeOut = exitcode; + + return true; } - - return -1; } } // anonymous namespace -int wxAppTraits::WaitForChild(wxExecuteData& execData) +wxExecuteData::ChildProcessesData wxExecuteData::ms_childProcesses; + +/* static */ +void wxExecuteData::OnSomeChildExited(int WXUNUSED(sig)) { - if ( !(execData.flags & wxEXEC_SYNC) ) - { - // asynchronous execution: just launch the process and return, - // endProcData will be destroyed when it terminates (currently we leak - // it if the process doesn't terminate before we do and this should be - // fixed but it's not a real leak so it's not really very high - // priority) - wxEndProcessData *endProcData = new wxEndProcessData; - endProcData->process = execData.process; - endProcData->pid = execData.pid; - endProcData->tag = AddProcessCallback - ( - endProcData, - execData.GetEndProcReadFD() - ); - endProcData->async = true; + // We know that some child process has terminated, but we don't know which + // one, so check all of them (notice that more than one could have exited). + // + // An alternative approach would be to call waitpid(-1, &status, WNOHANG) + // (in a loop to take care of the multiple children exiting case) and + // perhaps this would be more efficient. But for now this seems to work. - return execData.pid; - } - //else: synchronous execution case -#if HAS_PIPE_STREAMS && wxUSE_SOCKETS - wxProcess * const process = execData.process; - if ( process && process->IsRedirected() ) + // Make a copy of the list before iterating over it to avoid problems due + // to deleting entries from it in the process. + const ChildProcessesData allChildProcesses = ms_childProcesses; + for ( ChildProcessesData::const_iterator it = allChildProcesses.begin(); + it != allChildProcesses.end(); + ++it ) { - // we can't simply block waiting for the child to terminate as we would - // dead lock if it writes more than the pipe buffer size (typically - // 4KB) bytes of output -- it would then block waiting for us to read - // the data while we'd block waiting for it to terminate + const int pid = it->first; + + // Check whether this child exited. + int exitcode; + if ( !CheckForChildExit(pid, &exitcode) ) + continue; + + // And handle its termination if it did. // - // so multiplex here waiting for any input from the child or closure of - // the pipe used to indicate its termination - wxSelectDispatcher disp; - - wxEndHandler endHandler(disp, execData.GetEndProcReadFD()); - - wxRedirectedIOHandler outHandler(disp, execData.fdOut, execData.bufOut), - errHandler(disp, execData.fdErr, execData.bufErr); - - while ( !endHandler.Terminated() ) - { - disp.Dispatch(); - } + // Notice that this will implicitly remove it from ms_childProcesses. + it->second->OnExit(exitcode); } - //else: no IO redirection, just block waiting for the child to exit -#endif // HAS_PIPE_STREAMS - - return DoWaitForChild(execData.pid); } -void wxHandleProcessTermination(wxEndProcessData *data) +void wxExecuteData::OnStart(int pid_) { - data->exitcode = DoWaitForChild(data->pid, WNOHANG); + wxCHECK_RET( wxTheApp, + wxS("Ensure wxTheApp is set before calling wxExecute()") ); - // notify user about termination if required - if ( data->process ) + // Setup the signal handler for SIGCHLD to be able to detect the child + // termination. + // + // Notice that SetSignalHandler() is idempotent, so it's fine to call + // it more than once with the same handler. + wxTheApp->SetSignalHandler(SIGCHLD, OnSomeChildExited); + + + // Remember the child PID to be able to wait for it later. + pid = pid_; + + // Also save it in wxProcess where it will be accessible to the user code. + if ( process ) + process->SetPid(pid); + + // Finally, add this object itself to the list of child processes so that + // we can check for its termination the next time we get SIGCHLD. + ms_childProcesses[pid] = this; +} + +void wxExecuteData::OnExit(int exitcode_) +{ + // Remove this process from the hash list of child processes that are + // still open as soon as possible to ensure we don't process it again even + // if another SIGCHLD happens. + if ( !ms_childProcesses.erase(pid) ) { - data->process->OnTerminate(data->pid, data->exitcode); + wxFAIL_MSG(wxString::Format(wxS("Data for PID %d not in the list?"), pid)); } - if ( data->async ) + + exitcode = exitcode_; + +#if wxUSE_STREAMS + if ( IsRedirected() ) { - // in case of asynchronous execution we don't need this data any more + // Read the remaining data in a blocking way: this is fine because the + // child has already exited and hence all the data must be already + // available in the streams buffers. + bufOut.ReadAll(); + bufErr.ReadAll(); + } +#endif // wxUSE_STREAMS + + // Notify user about termination if required + if ( !(flags & wxEXEC_SYNC) ) + { + if ( process ) + process->OnTerminate(pid, exitcode); + + // in case of asynchronous execution we don't need this object any more // after the child terminates - delete data; + delete this; } else // sync execution { // let wxExecute() know that the process has terminated - data->pid = 0; + pid = 0; + + // Stop the event loop for synchronous wxExecute() if we're running one. + if ( syncEventLoop ) + syncEventLoop->ScheduleExit(); } } - diff --git a/Externals/wxWidgets3/src/unix/utilsx11.cpp b/Externals/wxWidgets3/src/unix/utilsx11.cpp index c5fc2e7421..12ff73e6a3 100644 --- a/Externals/wxWidgets3/src/unix/utilsx11.cpp +++ b/Externals/wxWidgets3/src/unix/utilsx11.cpp @@ -4,7 +4,6 @@ // Author: Mattia Barbon, Vaclav Slavik, Robert Roebling // Modified by: // Created: 25.03.02 -// RCS-ID: $Id: utilsx11.cpp 70741 2012-02-28 18:23:39Z PC $ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -38,8 +37,13 @@ #ifdef __WXGTK__ #include +#ifdef GDK_WINDOWING_X11 #include #endif +#endif + +// Only X11 backend is supported for wxGTK here +#if !defined(__WXGTK__) || defined(GDK_WINDOWING_X11) // Various X11 Atoms used in this file: static Atom _NET_WM_STATE = 0; @@ -849,6 +853,8 @@ bool wxGetKeyState(wxKeyCode key) return key_vector[keyCode >> 3] & (1 << (keyCode & 7)); } +#endif // !defined(__WXGTK__) || defined(GDK_WINDOWING_X11) + // ---------------------------------------------------------------------------- // Launch document with default app // ---------------------------------------------------------------------------- diff --git a/Externals/wxWidgets3/src/unix/wakeuppipe.cpp b/Externals/wxWidgets3/src/unix/wakeuppipe.cpp new file mode 100644 index 0000000000..1bd33d6021 --- /dev/null +++ b/Externals/wxWidgets3/src/unix/wakeuppipe.cpp @@ -0,0 +1,128 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/unix/wakeuppipe.cpp +// Purpose: Implementation of wxWakeUpPipe class. +// Author: Vadim Zeitlin +// Created: 2013-06-09 (extracted from src/unix/evtloopunix.cpp) +// Copyright: (c) 2013 Vadim Zeitlin +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +// ============================================================================ +// declarations +// ============================================================================ + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// for compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#endif // WX_PRECOMP + +#include "wx/unix/private/wakeuppipe.h" + +#include + +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +#define TRACE_EVENTS wxT("events") + +// ============================================================================ +// wxWakeUpPipe implementation +// ============================================================================ + +// ---------------------------------------------------------------------------- +// initialization +// ---------------------------------------------------------------------------- + +wxWakeUpPipe::wxWakeUpPipe() +{ + m_pipeIsEmpty = true; + + if ( !m_pipe.Create() ) + { + wxLogError(_("Failed to create wake up pipe used by event loop.")); + return; + } + + + if ( !m_pipe.MakeNonBlocking(wxPipe::Read) ) + { + wxLogSysError(_("Failed to switch wake up pipe to non-blocking mode")); + return; + } + + wxLogTrace(TRACE_EVENTS, wxT("Wake up pipe (%d, %d) created"), + m_pipe[wxPipe::Read], m_pipe[wxPipe::Write]); +} + +// ---------------------------------------------------------------------------- +// wakeup handling +// ---------------------------------------------------------------------------- + +void wxWakeUpPipe::WakeUpNoLock() +{ + // No need to do anything if the pipe already contains something. + if ( !m_pipeIsEmpty ) + return; + + if ( write(m_pipe[wxPipe::Write], "s", 1) != 1 ) + { + // don't use wxLog here, we can be in another thread and this could + // result in dead locks + perror("write(wake up pipe)"); + } + else + { + // We just wrote to it, so it's not empty any more. + m_pipeIsEmpty = false; + } +} + +void wxWakeUpPipe::OnReadWaiting() +{ + // got wakeup from child thread, remove the data that provoked it from the + // pipe + + char buf[4]; + for ( ;; ) + { + const int size = read(GetReadFd(), buf, WXSIZEOF(buf)); + + if ( size > 0 ) + { + wxASSERT_MSG( size == 1, "Too many writes to wake-up pipe?" ); + + break; + } + + if ( size == 0 || (size == -1 && errno == EAGAIN) ) + { + // No data available, not an error (but still surprising, + // spurious wakeup?) + break; + } + + if ( errno == EINTR ) + { + // We were interrupted, try again. + continue; + } + + wxLogSysError(_("Failed to read from wake-up pipe")); + + return; + } + + // The pipe is empty now, so future calls to WakeUp() would need to write + // to it again. + m_pipeIsEmpty = true; +} diff --git a/Externals/wxWidgets3/wx/wxcocoa.h b/Externals/wxWidgets3/wx/wxcocoa.h index 33a19cda5b..e05ccb3909 100644 --- a/Externals/wxWidgets3/wx/wxcocoa.h +++ b/Externals/wxWidgets3/wx/wxcocoa.h @@ -1267,5 +1267,8 @@ /* define this when wxDC::Blit() respects SetDeviceOrigin() in wxGTK */ /* #undef wxHAS_WORKING_GTK_DC_BLIT */ +#define wxUSE_COMPILER_TLS 1 +#define wxUSE_PREFERENCES_EDITOR 1 + #endif /* __WX_SETUP_H__ */ diff --git a/Externals/wxWidgets3/wx/wxgtk.h b/Externals/wxWidgets3/wx/wxgtk.h index bcbdd9be37..c8c4eba86b 100644 --- a/Externals/wxWidgets3/wx/wxgtk.h +++ b/Externals/wxWidgets3/wx/wxgtk.h @@ -1256,5 +1256,8 @@ /* define this when wxDC::Blit() respects SetDeviceOrigin() in wxGTK */ /* #undef wxHAS_WORKING_GTK_DC_BLIT */ +#define wxUSE_COMPILER_TLS 1 +#define wxUSE_PREFERENCES_EDITOR 1 + #endif /* __WX_SETUP_H__ */ diff --git a/Externals/wxWidgets3/wx/wxmsw.h b/Externals/wxWidgets3/wx/wxmsw.h index 0205c8c66e..93950bf567 100644 --- a/Externals/wxWidgets3/wx/wxmsw.h +++ b/Externals/wxWidgets3/wx/wxmsw.h @@ -1634,5 +1634,8 @@ #define wxUSE_CRASHREPORT 1 /* --- end MSW options --- */ +#define wxUSE_COMPILER_TLS 1 +#define wxUSE_PREFERENCES_EDITOR 1 + #endif // _WX_SETUP_H_