From 03647350fc7cd141953c72e0284e928847d30f44 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 21 Aug 2009 10:41:26 +0000 Subject: [PATCH] No changes, just removed hard tabs and trailing white space. This commit is huge but there are no non-white-space changes in it. Some files containing third-party sources (src/msw/wince/time.cpp, src/x11/pango*.cpp) were left unchanged. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/anidecod.h | 4 +- include/wx/animdecod.h | 6 +- include/wx/aui/floatpane.h | 8 +- include/wx/cairo.h | 4 +- include/wx/cocoa/NSSlider.h | 2 +- include/wx/cocoa/ObjcRef.h | 6 +- include/wx/cocoa/autorelease.h | 2 +- include/wx/cocoa/dirdlg.h | 2 +- include/wx/cocoa/filedlg.h | 2 +- include/wx/cocoa/font.h | 4 +- include/wx/cocoa/slider.h | 2 +- include/wx/cocoa/sound.h | 4 +- include/wx/cocoa/tooltip.h | 2 +- include/wx/combo.h | 2 +- include/wx/confbase.h | 2 +- include/wx/dataobj.h | 2 +- include/wx/datstrm.h | 2 +- include/wx/dcgraph.h | 14 +- include/wx/dcmemory.h | 6 +- include/wx/dcmirror.h | 2 +- include/wx/dcscreen.h | 2 +- include/wx/dcsvg.h | 12 +- include/wx/dfb/font.h | 4 +- include/wx/dialog.h | 10 +- include/wx/font.h | 4 +- include/wx/fontutil.h | 2 +- include/wx/generic/dataview.h | 12 +- include/wx/generic/dcpsg.h | 12 +- include/wx/generic/statbmpg.h | 8 +- include/wx/generic/treectlg.h | 10 +- include/wx/gifdecod.h | 2 +- include/wx/glcanvas.h | 2 +- include/wx/graphics.h | 12 +- include/wx/gtk/bitmap.h | 4 +- include/wx/gtk/dcclient.h | 8 +- include/wx/gtk/dcmemory.h | 6 +- include/wx/gtk/evtloop.h | 2 +- include/wx/gtk/filectrl.h | 2 +- include/wx/gtk/font.h | 2 +- include/wx/gtk/gnome/gprint.h | 4 +- include/wx/gtk/gnome/gvfs.h | 2 +- include/wx/gtk/popupwin.h | 2 +- include/wx/gtk/print.h | 4 +- include/wx/gtk/region.h | 2 +- include/wx/gtk/scrolbar.h | 2 +- include/wx/gtk/spinbutt.h | 4 +- include/wx/gtk/statbmp.h | 2 +- include/wx/gtk/statbox.h | 2 +- include/wx/gtk/treeentry_gtk.h | 2 +- include/wx/gtk1/font.h | 4 +- include/wx/imagbmp.h | 2 +- include/wx/image.h | 12 +- include/wx/log.h | 2 +- include/wx/menu.h | 2 +- include/wx/meta/convertible.h | 13 +- include/wx/meta/if.h | 2 +- include/wx/meta/int2type.h | 2 +- include/wx/mgl/dcmemory.h | 2 +- include/wx/mgl/dcscreen.h | 2 +- include/wx/mgl/font.h | 4 +- include/wx/mgl/popupwin.h | 2 +- include/wx/mimetype.h | 2 +- include/wx/motif/font.h | 4 +- include/wx/msw/dc.h | 2 +- include/wx/msw/dcclient.h | 2 +- include/wx/msw/dcmemory.h | 2 +- include/wx/msw/font.h | 2 +- include/wx/msw/printdlg.h | 18 +- include/wx/msw/spinctrl.h | 2 +- include/wx/msw/textctrl.h | 2 +- include/wx/msw/tglbtn.h | 4 +- include/wx/msw/tooltip.h | 4 +- include/wx/msw/window.h | 4 +- include/wx/msw/wrapwin.h | 6 +- include/wx/os2/bitmap.h | 2 +- include/wx/os2/dcmemory.h | 2 +- include/wx/os2/font.h | 4 +- include/wx/os2/listctrl.h | 6 +- include/wx/os2/sound.h | 2 +- include/wx/osx/bmpbuttn.h | 4 +- include/wx/osx/carbon/chkconf.h | 4 +- include/wx/osx/carbon/dataview.h | 8 +- include/wx/osx/carbon/private.h | 70 +++--- include/wx/osx/carbon/private/overlay.h | 20 +- include/wx/osx/carbon/private/print.h | 8 +- include/wx/osx/carbon/statbmp.h | 2 +- include/wx/osx/checkbox.h | 2 +- include/wx/osx/checklst.h | 2 +- include/wx/osx/chkconf.h | 6 +- include/wx/osx/choice.h | 2 +- include/wx/osx/cocoa/chkconf.h | 4 +- include/wx/osx/cocoa/dataview.h | 14 +- include/wx/osx/cocoa/private.h | 82 +++--- include/wx/osx/cocoa/private/textimpl.h | 2 +- include/wx/osx/config_xcode.h | 4 +- include/wx/osx/core/cfdataref.h | 8 +- include/wx/osx/core/cfstring.h | 8 +- include/wx/osx/core/dataview.h | 2 +- include/wx/osx/core/mimetype.h | 2 +- include/wx/osx/core/private.h | 318 ++++++++++++------------ include/wx/osx/dataobj2.h | 2 +- include/wx/osx/dataview.h | 4 +- include/wx/osx/dcmemory.h | 10 +- include/wx/osx/dcscreen.h | 2 +- include/wx/osx/dnd.h | 2 +- include/wx/osx/font.h | 6 +- include/wx/osx/frame.h | 2 +- include/wx/osx/glcanvas.h | 4 +- include/wx/osx/imaglist.h | 12 +- include/wx/osx/iphone/chkconf.h | 132 +++++----- include/wx/osx/iphone/private.h | 72 +++--- include/wx/osx/listbox.h | 14 +- include/wx/osx/menu.h | 16 +- include/wx/osx/menuitem.h | 2 +- include/wx/osx/nonownedwnd.h | 12 +- include/wx/osx/notebook.h | 4 +- include/wx/osx/pnghand.h | 2 +- include/wx/osx/popupwin.h | 2 +- include/wx/osx/printdlg.h | 16 +- include/wx/osx/printmac.h | 4 +- include/wx/osx/radiobut.h | 10 +- include/wx/osx/slider.h | 2 +- include/wx/osx/sound.h | 2 +- include/wx/osx/spinbutt.h | 4 +- include/wx/osx/srchctrl.h | 2 +- include/wx/osx/statbox.h | 2 +- include/wx/osx/taskbarosx.h | 6 +- include/wx/osx/textctrl.h | 4 +- include/wx/osx/tglbtn.h | 2 +- include/wx/osx/toplevel.h | 6 +- include/wx/osx/window.h | 6 +- include/wx/palmos/font.h | 2 +- include/wx/palmos/listctrl.h | 2 +- include/wx/palmos/missing.h | 16 +- include/wx/palmos/textctrl.h | 2 +- include/wx/platform.h | 34 +-- include/wx/platinfo.h | 26 +- include/wx/printdlg.h | 10 +- include/wx/process.h | 2 +- include/wx/propgrid/advprops.h | 2 +- include/wx/propgrid/property.h | 2 +- include/wx/propgrid/propgrid.h | 2 +- include/wx/sckstrm.h | 8 +- include/wx/setup_gccxml.h | 6 +- include/wx/srchctrl.h | 2 +- include/wx/string.h | 2 +- include/wx/toplevel.h | 2 +- include/wx/univ/choice.h | 6 +- include/wx/univ/textctrl.h | 2 +- include/wx/unix/mimetype.h | 2 +- include/wx/vms_x_fix.h | 10 +- include/wx/vscroll.h | 2 +- include/wx/wx_cwcocoa_cm.h | 2 +- include/wx/wxcrtbase.h | 2 +- include/wx/wxprec.h | 2 +- include/wx/x11/bitmap.h | 2 +- include/wx/x11/dataform.h | 18 +- include/wx/x11/dataobj.h | 2 +- include/wx/x11/dcclient.h | 6 +- include/wx/x11/dcmemory.h | 2 +- include/wx/x11/dnd.h | 60 ++--- include/wx/x11/font.h | 4 +- include/wx/x11/nanox/X11/Xlib.h | 2 +- include/wx/x11/popupwin.h | 4 +- include/wx/x11/privx.h | 2 +- include/wx/x11/reparent.h | 2 +- include/wx/xlocale.h | 6 +- include/wx/xpmdecod.h | 6 +- include/wx/xrc/xh_spin.h | 2 +- include/wx/xti.h | 2 +- src/aui/auibook.cpp | 2 +- src/aui/dockart.cpp | 10 +- src/aui/framemanager.cpp | 32 +-- src/cocoa/data.cpp | 2 +- src/common/artstd.cpp | 2 +- src/common/cairo.cpp | 4 +- src/common/config.cpp | 2 +- src/common/ctrlsub.cpp | 2 +- src/common/datavcmn.cpp | 2 +- src/common/dcgraph.cpp | 20 +- src/common/dlgcmn.cpp | 6 +- src/common/ffile.cpp | 2 +- src/common/fileback.cpp | 2 +- src/common/filesys.cpp | 6 +- src/common/fmapbase.cpp | 4 +- src/common/fontcmn.cpp | 6 +- src/common/fontenumcmn.cpp | 6 +- src/common/fs_inet.cpp | 2 +- src/common/gbsizer.cpp | 12 +- src/common/glcmn.cpp | 2 +- src/common/graphcmn.cpp | 2 +- src/common/imagbmp.cpp | 18 +- src/common/image.cpp | 2 +- src/common/imaggif.cpp | 2 +- src/common/imagiff.cpp | 4 +- src/common/imagjpeg.cpp | 2 +- src/common/imagtiff.cpp | 2 +- src/common/intl.cpp | 6 +- src/common/log.cpp | 2 +- src/common/persist.cpp | 2 +- src/common/pickerbase.cpp | 10 +- src/common/platinfo.cpp | 2 +- src/common/prntbase.cpp | 94 +++---- src/common/process.cpp | 2 +- src/common/regex.cpp | 14 +- src/common/sizer.cpp | 4 +- src/common/sstream.cpp | 8 +- src/common/stream.cpp | 8 +- src/common/variant.cpp | 4 +- src/common/wxcrt.cpp | 36 +-- src/common/xlocale.cpp | 4 +- src/common/zstream.cpp | 8 +- src/generic/animateg.cpp | 10 +- src/generic/bmpcboxg.cpp | 2 +- src/generic/combog.cpp | 2 +- src/generic/datavgen.cpp | 6 +- src/generic/dcpsg.cpp | 2 +- src/generic/graphicc.cpp | 14 +- src/generic/gridctrl.cpp | 2 +- src/generic/headerctrlg.cpp | 6 +- src/generic/hyperlinkg.cpp | 2 +- src/generic/paletteg.cpp | 4 +- src/generic/prntdlgg.cpp | 10 +- src/generic/regiong.cpp | 2 +- src/generic/statusbr.cpp | 22 +- src/generic/vscroll.cpp | 6 +- src/generic/wizard.cpp | 2 +- src/gtk/calctrl.cpp | 6 +- src/gtk/checkbox.cpp | 2 +- src/gtk/cursor.cpp | 4 +- src/gtk/dataview.cpp | 36 +-- src/gtk/dc.cpp | 2 +- src/gtk/dcmemory.cpp | 14 +- src/gtk/dcscreen.cpp | 6 +- src/gtk/dnd.cpp | 2 +- src/gtk/evtloop.cpp | 6 +- src/gtk/filectrl.cpp | 4 +- src/gtk/filedlg.cpp | 10 +- src/gtk/filepicker.cpp | 10 +- src/gtk/font.cpp | 2 +- src/gtk/fontpicker.cpp | 2 +- src/gtk/frame.cpp | 2 +- src/gtk/listbox.cpp | 26 +- src/gtk/mdi.cpp | 2 +- src/gtk/minifram.cpp | 6 +- src/gtk/notebook.cpp | 2 +- src/gtk/popupwin.cpp | 4 +- src/gtk/print.cpp | 6 +- src/gtk/private.cpp | 8 +- src/gtk/region.cpp | 2 +- src/gtk/settings.cpp | 4 +- src/gtk/statbox.cpp | 2 +- src/gtk/stattext.cpp | 2 +- src/gtk/toplevel.cpp | 2 +- src/gtk/utilsgtk.cpp | 2 +- src/gtk/win_gtk.cpp | 14 +- src/gtk/window.cpp | 12 +- src/gtk1/bmpbuttn.cpp | 6 +- src/gtk1/dnd.cpp | 2 +- src/gtk1/main.cpp | 2 +- src/gtk1/statbmp.cpp | 2 +- src/html/helpdata.cpp | 4 +- src/html/helpfrm.cpp | 2 +- src/html/htmlcell.cpp | 14 +- src/html/htmlfilt.cpp | 2 +- src/html/winpars.cpp | 2 +- src/motif/cursor.cpp | 4 +- src/motif/main.cpp | 2 +- src/motif/statbox.cpp | 2 +- src/msw/bitmap.cpp | 2 +- src/msw/bmpcbox.cpp | 4 +- src/msw/calctrl.cpp | 2 +- src/msw/control.cpp | 2 +- src/msw/dcmemory.cpp | 18 +- src/msw/dir.cpp | 4 +- src/msw/evtloop.cpp | 6 +- src/msw/graphics.cpp | 62 ++--- src/msw/imaglist.cpp | 2 +- src/msw/listbox.cpp | 2 +- src/msw/ole/droptgt.cpp | 4 +- src/msw/settings.cpp | 4 +- src/msw/tglbtn.cpp | 40 +-- src/msw/tooltip.cpp | 8 +- src/msw/utilsgui.cpp | 2 +- src/msw/wince/tbarwce.cpp | 2 +- src/os2/bitmap.cpp | 2 +- src/os2/dc.cpp | 8 +- src/os2/dcmemory.cpp | 18 +- src/os2/evtloop.cpp | 2 +- src/os2/listbox.cpp | 2 +- src/os2/ownerdrw.cpp | 2 +- src/os2/utils.cpp | 22 +- src/os2/window.cpp | 2 +- src/osx/accel.cpp | 2 +- src/osx/artmac.cpp | 28 +-- src/osx/carbon/app.cpp | 14 +- src/osx/carbon/button.cpp | 14 +- src/osx/carbon/checkbox.cpp | 12 +- src/osx/carbon/choice.cpp | 14 +- src/osx/carbon/colordlg.cpp | 4 +- src/osx/carbon/combobox.cpp | 6 +- src/osx/carbon/cursor.cpp | 2 +- src/osx/carbon/dataobj.cpp | 50 ++-- src/osx/carbon/dataview.cpp | 6 +- src/osx/carbon/dcclient.cpp | 10 +- src/osx/carbon/dcscreen.cpp | 16 +- src/osx/carbon/dirdlg.cpp | 4 +- src/osx/carbon/dirmac.cpp | 6 +- src/osx/carbon/dnd.cpp | 232 ++++++++--------- src/osx/carbon/drawer.cpp | 2 +- src/osx/carbon/font.cpp | 66 ++--- src/osx/carbon/fontdlgosx.mm | 4 +- src/osx/carbon/gauge.cpp | 16 +- src/osx/carbon/glcanvas.cpp | 18 +- src/osx/carbon/graphics.cpp | 84 +++---- src/osx/carbon/listbox.cpp | 70 +++--- src/osx/carbon/listctrl_mac.cpp | 40 +-- src/osx/carbon/mediactrl.cpp | 4 +- src/osx/carbon/menu.cpp | 66 ++--- src/osx/carbon/menuitem.cpp | 2 +- src/osx/carbon/nonownedwnd.cpp | 34 +-- src/osx/carbon/notebmac.cpp | 10 +- src/osx/carbon/popupwin.cpp | 4 +- src/osx/carbon/printdlg.cpp | 2 +- src/osx/carbon/radiobut.cpp | 12 +- src/osx/carbon/region.cpp | 10 +- src/osx/carbon/scrolbar.cpp | 14 +- src/osx/carbon/settings.cpp | 4 +- src/osx/carbon/slider.cpp | 10 +- src/osx/carbon/spinbutt.cpp | 12 +- src/osx/carbon/srchctrl.cpp | 14 +- src/osx/carbon/statbox.cpp | 10 +- src/osx/carbon/statlmac.cpp | 12 +- src/osx/carbon/stattext.cpp | 16 +- src/osx/carbon/taskbar.cpp | 2 +- src/osx/carbon/textctrl.cpp | 16 +- src/osx/carbon/tglbtn.cpp | 32 +-- src/osx/carbon/thread.cpp | 4 +- src/osx/carbon/tooltip.cpp | 10 +- src/osx/carbon/uma.cpp | 4 +- src/osx/carbon/utils.cpp | 6 +- src/osx/carbon/utilscocoa.mm | 50 ++-- src/osx/checkbox_osx.cpp | 4 +- src/osx/checklst_osx.cpp | 4 +- src/osx/choice_osx.cpp | 8 +- src/osx/cocoa/bmpbuttn.mm | 16 +- src/osx/cocoa/checkbox.mm | 16 +- src/osx/cocoa/choice.mm | 12 +- src/osx/cocoa/dialog.mm | 10 +- src/osx/cocoa/dirdlg.mm | 28 +-- src/osx/cocoa/filedlg.mm | 28 +-- src/osx/cocoa/gauge.mm | 18 +- src/osx/cocoa/glcanvas.mm | 8 +- src/osx/cocoa/listbox.mm | 154 ++++++------ src/osx/cocoa/menu.mm | 22 +- src/osx/cocoa/menuitem.mm | 28 +-- src/osx/cocoa/msgdlg.mm | 18 +- src/osx/cocoa/nonownedwnd.mm | 74 +++--- src/osx/cocoa/notebook.mm | 34 +-- src/osx/cocoa/printdlg.mm | 4 +- src/osx/cocoa/radiobut.mm | 18 +- src/osx/cocoa/scrolbar.mm | 32 +-- src/osx/cocoa/slider.mm | 22 +- src/osx/cocoa/spinbutt.mm | 26 +- src/osx/cocoa/srchctrl.mm | 18 +- src/osx/cocoa/statbox.mm | 22 +- src/osx/cocoa/statline.mm | 12 +- src/osx/cocoa/stattext.mm | 18 +- src/osx/cocoa/taskbar.mm | 6 +- src/osx/cocoa/textctrl.mm | 98 ++++---- src/osx/cocoa/tglbtn.mm | 28 +-- src/osx/cocoa/toolbar.mm | 32 +-- src/osx/cocoa/utils.mm | 10 +- src/osx/cocoa/window.mm | 204 +++++++-------- src/osx/core/bitmap.cpp | 4 +- src/osx/core/cfstring.cpp | 12 +- src/osx/core/colour.cpp | 8 +- src/osx/core/dcmemory.cpp | 6 +- src/osx/core/glgrab.cpp | 68 ++--- src/osx/core/hid.cpp | 2 +- src/osx/core/hidjoystick.cpp | 2 +- src/osx/core/printmac.cpp | 46 ++-- src/osx/core/stdpaths_cf.cpp | 6 +- src/osx/core/strconv_cf.cpp | 12 +- src/osx/core/timer.cpp | 8 +- src/osx/core/utilsexc_base.cpp | 6 +- src/osx/iphone/button.mm | 36 +-- src/osx/iphone/checkbox.mm | 16 +- src/osx/iphone/msgdlg.mm | 16 +- src/osx/iphone/nonownedwnd.mm | 44 ++-- src/osx/iphone/utils.mm | 18 +- src/osx/iphone/window.mm | 76 +++--- src/osx/listbox_osx.cpp | 18 +- src/osx/menu_osx.cpp | 14 +- src/osx/menuitem_osx.cpp | 14 +- src/osx/nonownedwnd_osx.cpp | 30 +-- src/osx/notebook_osx.cpp | 2 +- src/osx/printdlg_osx.cpp | 4 +- src/osx/radiobox_osx.cpp | 14 +- src/osx/radiobut_osx.cpp | 2 +- src/osx/scrolbar_osx.cpp | 4 +- src/osx/slider_osx.cpp | 6 +- src/osx/spinbutt_osx.cpp | 16 +- src/osx/srchctrl_osx.cpp | 2 +- src/osx/statbox_osx.cpp | 2 +- src/osx/stattext_osx.cpp | 4 +- src/osx/textctrl_osx.cpp | 4 +- src/osx/tglbtn_osx.cpp | 26 +- src/osx/window_osx.cpp | 4 +- src/palmos/dcmemory.cpp | 18 +- src/propgrid/advprops.cpp | 26 +- src/propgrid/editors.cpp | 14 +- src/propgrid/manager.cpp | 6 +- src/propgrid/property.cpp | 10 +- src/propgrid/propgrid.cpp | 2 +- src/propgrid/propgridiface.cpp | 6 +- src/propgrid/propgridpagestate.cpp | 10 +- src/propgrid/props.cpp | 4 +- src/richtext/richtextbuffer.cpp | 2 +- src/richtext/richtextbulletspage.cpp | 2 +- src/richtext/richtexthtml.cpp | 2 +- src/richtext/richtextprint.cpp | 70 +++--- src/richtext/richtextstyles.cpp | 38 +-- src/unix/fontutil.cpp | 4 +- src/unix/mediactrl.cpp | 4 +- src/unix/mimetype.cpp | 4 +- src/unix/net.cpp | 24 +- src/unix/utilsunx.cpp | 4 +- src/x11/bitmap.cpp | 2 +- src/x11/dcclient.cpp | 2 +- src/x11/dcmemory.cpp | 6 +- src/x11/font.cpp | 2 +- src/x11/minifram.cpp | 2 +- src/x11/pango_x.cpp | 82 +++--- src/x11/pangox11.cpp | 80 +++--- src/xrc/xh_collpane.cpp | 2 +- 436 files changed, 2782 insertions(+), 2777 deletions(-) diff --git a/include/wx/anidecod.h b/include/wx/anidecod.h index df5be1a60b..86970ae771 100644 --- a/include/wx/anidecod.h +++ b/include/wx/anidecod.h @@ -44,7 +44,7 @@ public: virtual wxColour GetTransparentColour(unsigned int frame) const; // implementation of wxAnimationDecoder's pure virtuals - + virtual bool Load( wxInputStream& stream ); bool ConvertToImage(unsigned int frame, wxImage *image) const; @@ -58,7 +58,7 @@ private: // wxAnimationDecoder pure virtual: virtual bool DoCanRead( wxInputStream& stream ) const; // modifies current stream position (see wxAnimationDecoder::CanRead) - + // frames stored as wxImage(s): ANI files are meant to be used mostly for animated // cursors and thus they do not use any optimization to encode differences between // two frames: they are just a list of images to display sequentially. diff --git a/include/wx/animdecod.h b/include/wx/animdecod.h index 1c6cb20d1f..acea85d0ec 100644 --- a/include/wx/animdecod.h +++ b/include/wx/animdecod.h @@ -95,11 +95,11 @@ public: } virtual bool Load( wxInputStream& stream ) = 0; - + bool CanRead( wxInputStream& stream ) const { // NOTE: this code is the same of wxImageHandler::CallDoCanRead - + if ( !stream.IsSeekable() ) return false; // can't test unseekable stream @@ -157,7 +157,7 @@ protected: // this function should modify the stream current position without taking care // of restoring it since CanRead() will do it. virtual bool DoCanRead(wxInputStream& stream) const = 0; - + wxSize m_szAnimation; unsigned int m_nFrames; diff --git a/include/wx/aui/floatpane.h b/include/wx/aui/floatpane.h index 8d95b8cfe3..2638d6e3a8 100644 --- a/include/wx/aui/floatpane.h +++ b/include/wx/aui/floatpane.h @@ -37,18 +37,18 @@ public: const wxAuiPaneInfo& pane, wxWindowID id = wxID_ANY, long style = wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | - wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | + wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | wxCLIP_CHILDREN ); virtual ~wxAuiFloatingFrame(); void SetPaneWindow(const wxAuiPaneInfo& pane); wxAuiManager* GetOwnerManager() const; - + protected: virtual void OnMoveStart(); virtual void OnMoving(const wxRect& window_rect, wxDirection dir); virtual void OnMoveFinished(); - + private: void OnSize(wxSizeEvent& event); void OnClose(wxCloseEvent& event); @@ -56,7 +56,7 @@ private: void OnIdle(wxIdleEvent& event); void OnActivate(wxActivateEvent& event); static bool isMouseDown(); - + private: wxWindow* m_pane_window; // pane window being managed bool m_solid_drag; // true if system uses solid window drag diff --git a/include/wx/cairo.h b/include/wx/cairo.h index a6041f2418..8dd9e7556d 100644 --- a/include/wx/cairo.h +++ b/include/wx/cairo.h @@ -43,13 +43,13 @@ private: wxCairoLibrary(); ~wxCairoLibrary(); - + bool IsOk(); bool InitializeMethods(); wxDynamicLibrary m_libCairo; wxDynamicLibrary m_libPangoCairo; - + // true if we successfully loaded the libraries and can use them // // note that this field must have this name as it's used by wxDL_XXX macros diff --git a/include/wx/cocoa/NSSlider.h b/include/wx/cocoa/NSSlider.h index 9dc637dc5e..f0d06a9b53 100644 --- a/include/wx/cocoa/NSSlider.h +++ b/include/wx/cocoa/NSSlider.h @@ -21,7 +21,7 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSSlider); WX_DECLARE_OBJC_HASHMAP(NSSlider); // For when we're not in Objective-C mode: -typedef struct objc_selector *SEL; +typedef struct objc_selector *SEL; class wxCocoaNSSliderLastSelectorChanger; diff --git a/include/wx/cocoa/ObjcRef.h b/include/wx/cocoa/ObjcRef.h index f08c6435dd..d8361c62c3 100644 --- a/include/wx/cocoa/ObjcRef.h +++ b/include/wx/cocoa/ObjcRef.h @@ -2,7 +2,7 @@ // Name: wx/cocoa/ObjcRef.h // Purpose: wxObjcAutoRef template class // Author: David Elliott -// Modified by: +// Modified by: // Created: 2004/03/28 // RCS-ID: $Id$ // Copyright: (c) 2004 David Elliott @@ -47,7 +47,7 @@ wxGCSafeRelease(m_obj); // release current object (if any) m_obj = wxGCSafeRetain([[NSObject alloc] init]); [m_obj release]; // balance alloc - + Consider the effect on the retain count from each statement (alloc, CFRetain, release) In RR mode: retainCount = 1, +1, -1 In GC mode: strongRetainCount = 0, +1, -0 @@ -150,7 +150,7 @@ protected: it will use a method (currently CFRetain/CFRelease) to ensure the object will never be finalized until this object is destroyed. */ - + template class wxObjcAutoRefFromAlloc: wxObjcAutoRefBase { diff --git a/include/wx/cocoa/autorelease.h b/include/wx/cocoa/autorelease.h index eedba0fdba..f80e493bda 100644 --- a/include/wx/cocoa/autorelease.h +++ b/include/wx/cocoa/autorelease.h @@ -2,7 +2,7 @@ // Name: wx/cocoa/autorelease.h // Purpose: Automatic NSAutoreleasePool functionality // Author: David Elliott -// Modified by: +// Modified by: // Created: 2003/07/11 // RCS-ID: $Id$ // Copyright: (c) 2003 David Elliott diff --git a/include/wx/cocoa/dirdlg.h b/include/wx/cocoa/dirdlg.h index 04f9bc31e3..9412469bf6 100644 --- a/include/wx/cocoa/dirdlg.h +++ b/include/wx/cocoa/dirdlg.h @@ -34,7 +34,7 @@ public: virtual ~wxDirDialog(); virtual int ShowModal(); - + inline WX_NSSavePanel GetNSSavePanel() { return (WX_NSSavePanel)m_cocoaNSWindow; } diff --git a/include/wx/cocoa/filedlg.h b/include/wx/cocoa/filedlg.h index 62f5561851..bbcc7ca9bb 100644 --- a/include/wx/cocoa/filedlg.h +++ b/include/wx/cocoa/filedlg.h @@ -40,7 +40,7 @@ public: virtual void GetFilenames(wxArrayString& files) const; virtual int ShowModal(); - + inline WX_NSSavePanel GetNSSavePanel() { return (WX_NSSavePanel)m_cocoaNSWindow; } diff --git a/include/wx/cocoa/font.h b/include/wx/cocoa/font.h index ae5686f98d..304a72db8d 100644 --- a/include/wx/cocoa/font.h +++ b/include/wx/cocoa/font.h @@ -62,7 +62,7 @@ public: { (void)Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -74,7 +74,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + /*! @abstract Construction with opaque wxNativeFontInfo */ wxFont(const wxNativeFontInfo& info) diff --git a/include/wx/cocoa/slider.h b/include/wx/cocoa/slider.h index 32950b547f..0b5e20df70 100644 --- a/include/wx/cocoa/slider.h +++ b/include/wx/cocoa/slider.h @@ -92,7 +92,7 @@ public: // these methods get/set the length of the slider pointer in pixels virtual void SetThumbLength(int lenPixels); virtual int GetThumbLength() const; - + // copied from (wxSliderCocoa.h) virtual void SetTickFreq(int n, int pos); virtual int GetTickFreq() const; diff --git a/include/wx/cocoa/sound.h b/include/wx/cocoa/sound.h index 10c3d81893..63355c870d 100644 --- a/include/wx/cocoa/sound.h +++ b/include/wx/cocoa/sound.h @@ -3,7 +3,7 @@ // Purpose: wxSound class (loads and plays short Windows .wav files). // Optional on non-Windows platforms. // Authors: David Elliott, Ryan Norton -// Modified by: +// Modified by: // Created: 2004-10-02 // RCS-ID: $Id$ // Copyright: (c) 2004 David Elliott, Ryan Norton @@ -41,7 +41,7 @@ public: void SetNSSound(WX_NSSound cocoaNSSound); inline WX_NSSound GetNSSound() { return m_cocoaNSSound; } -protected: +protected: bool DoPlay(unsigned flags) const; bool LoadWAV(const wxUint8 *data, size_t length, bool copyData); private: diff --git a/include/wx/cocoa/tooltip.h b/include/wx/cocoa/tooltip.h index 42c9abfc35..85f944d925 100644 --- a/include/wx/cocoa/tooltip.h +++ b/include/wx/cocoa/tooltip.h @@ -48,7 +48,7 @@ private: wxString m_text; // tooltip text wxWindow *m_window; // window we're associated with - + DECLARE_ABSTRACT_CLASS(wxToolTip) }; diff --git a/include/wx/combo.h b/include/wx/combo.h index 2ac66cda0a..a4ae62396c 100644 --- a/include/wx/combo.h +++ b/include/wx/combo.h @@ -617,7 +617,7 @@ protected: // should the focus be reset to the textctrl in idle time? bool m_resetFocus; - + private: void Init(); diff --git a/include/wx/confbase.h b/include/wx/confbase.h index 4534dcf9f0..e0ed69ff5e 100644 --- a/include/wx/confbase.h +++ b/include/wx/confbase.h @@ -217,7 +217,7 @@ public: } #endif // wxHAS_CONFIG_TEMPLATE_RW - // convenience functions returning directly the value + // convenience functions returning directly the value wxString Read(const wxString& key, const wxString& defVal = wxEmptyString) const { wxString s; (void)Read(key, &s, defVal); return s; } diff --git a/include/wx/dataobj.h b/include/wx/dataobj.h index 7eb724f395..e5d36e8675 100644 --- a/include/wx/dataobj.h +++ b/include/wx/dataobj.h @@ -515,7 +515,7 @@ private: #include "wx/gtk/dataobj2.h" // wxURLDataObject defined in msw/ole/dataobj2.h -#else +#else #if defined(__WXGTK__) #include "wx/gtk1/dataobj2.h" #elif defined(__WXX11__) diff --git a/include/wx/datstrm.h b/include/wx/datstrm.h index f379d8a5c6..478d45b8be 100644 --- a/include/wx/datstrm.h +++ b/include/wx/datstrm.h @@ -78,7 +78,7 @@ public: 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; } diff --git a/include/wx/dcgraph.h b/include/wx/dcgraph.h index 364d435894..de977b7577 100644 --- a/include/wx/dcgraph.h +++ b/include/wx/dcgraph.h @@ -31,10 +31,10 @@ public: #endif wxGCDC(); virtual ~wxGCDC(); - + wxGraphicsContext* GetGraphicsContext(); void SetGraphicsContext( wxGraphicsContext* ctx ); - + DECLARE_DYNAMIC_CLASS(wxGCDC) wxDECLARE_NO_COPY_CLASS(wxGCDC); }; @@ -49,7 +49,7 @@ public: wxGCDCImpl( wxDC *owner, const wxPrinterDC& dc ); #endif wxGCDCImpl( wxDC *owner ); - + virtual ~wxGCDCImpl(); void Init(); @@ -65,7 +65,7 @@ public: virtual void StartPage(); virtual void EndPage(); - + // flushing the content of this dc immediately onto screen virtual void Flush(); @@ -97,7 +97,7 @@ public: wxGraphicsContext* GetGraphicsContext() { return m_graphicContext; } virtual void SetGraphicsContext( wxGraphicsContext* ctx ); - + // the true implementations virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, wxFloodFillStyle style = wxFLOOD_SURFACE); @@ -150,7 +150,7 @@ public: virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, - wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest, @@ -195,7 +195,7 @@ protected: double m_formerScaleX, m_formerScaleY; wxGraphicsContext* m_graphicContext; - + DECLARE_CLASS(wxGCDCImpl) wxDECLARE_NO_COPY_CLASS(wxGCDCImpl); }; diff --git a/include/wx/dcmemory.h b/include/wx/dcmemory.h index d84d5be6d8..b104fc55ba 100644 --- a/include/wx/dcmemory.h +++ b/include/wx/dcmemory.h @@ -25,13 +25,13 @@ public: wxMemoryDC(); wxMemoryDC( wxBitmap& bitmap ); wxMemoryDC( wxDC *dc ); - + // select the given bitmap to draw on it void SelectObject(wxBitmap& bmp); // select the given bitmap for read-only void SelectObjectAsSource(const wxBitmap& bmp); - + // get selected bitmap const wxBitmap& GetSelectedBitmap() const; wxBitmap& GetSelectedBitmap(); @@ -39,7 +39,7 @@ public: private: DECLARE_DYNAMIC_CLASS(wxMemoryDC) }; - + #endif // _WX_DCMEMORY_H_BASE_ diff --git a/include/wx/dcmirror.h b/include/wx/dcmirror.h index 6ed45a1ab3..98858240b6 100644 --- a/include/wx/dcmirror.h +++ b/include/wx/dcmirror.h @@ -202,7 +202,7 @@ protected: virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord w, wxCoord h, wxDC *source, wxCoord xsrc, wxCoord ysrc, - wxRasterOperationMode rop = wxCOPY, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) { diff --git a/include/wx/dcscreen.h b/include/wx/dcscreen.h index 763ccb830b..6b1fc2f2da 100644 --- a/include/wx/dcscreen.h +++ b/include/wx/dcscreen.h @@ -24,7 +24,7 @@ public: { return true; } static bool StartDrawingOnTop(wxRect * WXUNUSED(rect) = NULL) { return true; } - static bool EndDrawingOnTop() + static bool EndDrawingOnTop() { return true; } private: diff --git a/include/wx/dcsvg.h b/include/wx/dcsvg.h index 45147c68cc..cf492e7938 100644 --- a/include/wx/dcsvg.h +++ b/include/wx/dcsvg.h @@ -33,11 +33,11 @@ class WXDLLIMPEXP_FWD_CORE wxSVGFileDC; class WXDLLIMPEXP_CORE wxSVGFileDCImpl : public wxDCImpl { public: - wxSVGFileDCImpl( wxSVGFileDC *owner, const wxString &filename, + wxSVGFileDCImpl( wxSVGFileDC *owner, const wxString &filename, int width=320, int height=240, double dpi=72.0 ); virtual ~wxSVGFileDCImpl(); - + bool IsOk() const { return m_OK; } virtual bool CanDrawBitmap() const { return true; } @@ -132,7 +132,7 @@ private: virtual void DoDrawPoint(wxCoord, wxCoord); - virtual void DoDrawPolygon(int n, wxPoint points[], + virtual void DoDrawPolygon(int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle); @@ -179,7 +179,7 @@ private: } virtual void DoGetSizeMM( int *width, int *height ) const; - + virtual wxSize GetPPI() const; void Init (const wxString &filename, int width, int height, double dpi); @@ -205,12 +205,12 @@ private: class WXDLLIMPEXP_CORE wxSVGFileDC : public wxDC { public: - wxSVGFileDC(const wxString& filename, + wxSVGFileDC(const wxString& filename, int width = 320, int height = 240, double dpi = 72.0) : wxDC(new wxSVGFileDCImpl(this, filename, width, height, dpi)) - { + { } }; diff --git a/include/wx/dfb/font.h b/include/wx/dfb/font.h index def7085e07..4b485d7f39 100644 --- a/include/wx/dfb/font.h +++ b/include/wx/dfb/font.h @@ -47,7 +47,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -59,7 +59,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, diff --git a/include/wx/dialog.h b/include/wx/dialog.h index d3e9e4392d..51852d4953 100644 --- a/include/wx/dialog.h +++ b/include/wx/dialog.h @@ -55,9 +55,9 @@ enum wxDialogLayoutAdaptationMode enum wxDialogModality { - wxDIALOG_MODALITY_NONE = 0, - wxDIALOG_MODALITY_WINDOW_MODAL = 1, - wxDIALOG_MODALITY_APP_MODAL = 2 + wxDIALOG_MODALITY_NONE = 0, + wxDIALOG_MODALITY_WINDOW_MODAL = 1, + wxDIALOG_MODALITY_APP_MODAL = 2 }; extern WXDLLIMPEXP_DATA_CORE(const char) wxDialogNameStr[]; @@ -342,8 +342,8 @@ public: wxDialog *GetDialog() const { return wxStaticCast(GetEventObject(), wxDialog); } - - int GetReturnCode() const + + int GetReturnCode() const { return GetDialog()->GetReturnCode(); } virtual wxEvent *Clone() const { return new wxWindowModalDialogEvent (*this); } diff --git a/include/wx/font.h b/include/wx/font.h index ee2d28bf47..225460cda8 100644 --- a/include/wx/font.h +++ b/include/wx/font.h @@ -113,7 +113,7 @@ class WXDLLIMPEXP_CORE wxFontBase : public wxGDIObject public: /* derived classes should provide the following ctors: - + wxFont(); wxFont(const wxString& nativeFontInfoString); wxFont(const wxNativeFontInfo& info); @@ -132,7 +132,7 @@ public: const wxString& face = wxEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT); */ - + // creator function virtual ~wxFontBase(); diff --git a/include/wx/fontutil.h b/include/wx/fontutil.h index e12c021a34..32c2806104 100644 --- a/include/wx/fontutil.h +++ b/include/wx/fontutil.h @@ -152,7 +152,7 @@ public: void Free(); void EnsureValid(); - + bool m_descriptorValid; #if wxOSX_USE_CORE_TEXT CTFontDescriptorRef m_ctFontDescriptor; diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h index 35bee5a82a..032cd62590 100644 --- a/include/wx/generic/dataview.h +++ b/include/wx/generic/dataview.h @@ -135,7 +135,7 @@ public: // in-place editing virtual bool HasEditorCtrl() const; - virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, + virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); @@ -260,7 +260,7 @@ public: virtual wxSize GetSize() const; virtual bool HasEditorCtrl() const { return true; } - virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, + virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); @@ -288,8 +288,8 @@ public: virtual bool Render( wxRect cell, wxDC *dc, int state ); virtual wxSize GetSize() const; virtual bool Activate( wxRect cell, - wxDataViewModel *model, - const wxDataViewItem& item, + wxDataViewModel *model, + const wxDataViewItem& item, unsigned int col ); private: @@ -445,9 +445,9 @@ public: virtual void EnsureVisible( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ); - virtual void HitTest( const wxPoint & point, wxDataViewItem & item, + virtual void HitTest( const wxPoint & point, wxDataViewItem & item, wxDataViewColumn* &column ) const; - virtual wxRect GetItemRect( const wxDataViewItem & item, + virtual wxRect GetItemRect( const wxDataViewItem & item, const wxDataViewColumn *column = NULL ) const; virtual void Expand( const wxDataViewItem & item ); diff --git a/include/wx/generic/dcpsg.h b/include/wx/generic/dcpsg.h index bc544c93fe..e33773ddd3 100644 --- a/include/wx/generic/dcpsg.h +++ b/include/wx/generic/dcpsg.h @@ -95,7 +95,7 @@ public: virtual wxRect GetPaperRect() const; protected: - bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, + bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, wxFloodFillStyle style = wxFLOOD_SURFACE); bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const; void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); @@ -104,11 +104,11 @@ protected: 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, + 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, + void DoDrawPolyPolygon(int n, int count[], 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); @@ -117,7 +117,7 @@ protected: void DoDrawSpline(const wxPointList *points); #endif bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, - wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxDC *source, wxCoord xsrc, wxCoord ysrc, wxRasterOperationMode rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y); diff --git a/include/wx/generic/statbmpg.h b/include/wx/generic/statbmpg.h index 010ec66012..4a2ece335c 100644 --- a/include/wx/generic/statbmpg.h +++ b/include/wx/generic/statbmpg.h @@ -45,9 +45,9 @@ public: virtual wxBitmap GetBitmap() const { return m_bitmap; } - virtual void SetIcon(const wxIcon& icon) - { - m_bitmap.CopyFromIcon(icon); + virtual void SetIcon(const wxIcon& icon) + { + m_bitmap.CopyFromIcon(icon); SetInitialSize(GetBitmapSize()); Refresh(); } @@ -59,7 +59,7 @@ public: private: - wxSize GetBitmapSize() + wxSize GetBitmapSize() { return m_bitmap.Ok() ? wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight()) : wxSize(16, 16); // this is completely arbitrary diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h index 98bc85666a..86f2a90519 100644 --- a/include/wx/generic/treectlg.h +++ b/include/wx/generic/treectlg.h @@ -258,12 +258,12 @@ protected: wxCursor m_oldCursor; // cursor is changed while dragging wxGenericTreeItem *m_oldSelection; wxGenericTreeItem *m_underMouse; // for visual effects - + enum { NoEffect, BorderEffect, AboveEffect, BelowEffect } m_dndEffect; - wxGenericTreeItem *m_dndEffectItem; - + wxGenericTreeItem *m_dndEffectItem; + wxTreeTextCtrl *m_textCtrl; - + wxTimer *m_renameTimer; @@ -276,7 +276,7 @@ protected: // the common part of all ctors void Init(); - // overridden wxWindow methods + // overridden wxWindow methods virtual void DoThaw(); // misc helpers diff --git a/include/wx/gifdecod.h b/include/wx/gifdecod.h index 1520823157..908f470ece 100644 --- a/include/wx/gifdecod.h +++ b/include/wx/gifdecod.h @@ -95,7 +95,7 @@ private: wxGIFErrorCode dgif(wxInputStream& stream, GIFImage *img, int interl, int bits); - + // array of all frames wxArrayPtrVoid m_frames; diff --git a/include/wx/glcanvas.h b/include/wx/glcanvas.h index 6ead07f031..9bd0035457 100644 --- a/include/wx/glcanvas.h +++ b/include/wx/glcanvas.h @@ -118,7 +118,7 @@ public: // miscellaneous helper functions // ------------------------------ -#ifndef wxHAS_OPENGL_ES +#ifndef wxHAS_OPENGL_ES // call glcolor() for the colour with the given name, return false if // colour not found bool SetColour(const wxString& colour); diff --git a/include/wx/graphics.h b/include/wx/graphics.h index d93d63ba41..322e2b769f 100644 --- a/include/wx/graphics.h +++ b/include/wx/graphics.h @@ -30,10 +30,10 @@ enum wxCompositionMode { // R = Result, S = Source, D = Destination, premultiplied with alpha // Ra, Sa, Da their alpha components - + // classic Porter-Duff compositions // http://keithp.com/~keithp/porterduff/p253-porter.pdf - + wxCOMPOSITION_CLEAR, /* R = 0 */ wxCOMPOSITION_SOURCE, /* R = S */ wxCOMPOSITION_OVER, /* R = S + D*(1 - Sa) */ @@ -47,7 +47,7 @@ enum wxCompositionMode wxCOMPOSITION_DEST_OUT, /* R = D*(1 - Sa) */ wxCOMPOSITION_DEST_ATOP, /* R = S*(1 - Da) + D*Sa */ wxCOMPOSITION_XOR, /* R = S*(1 - Da) + D*(1 - Sa) */ - + // mathematical compositions wxCOMPOSITION_ADD, /* R = S + D */ }; @@ -390,13 +390,13 @@ public: // returns the current shape antialiasing mode virtual wxAntialiasMode GetAntialiasMode() const { return m_antialias; } - + // sets the antialiasing mode, returns true if it supported virtual bool SetAntialiasMode(wxAntialiasMode antialias) = 0; // returns the current compositing operator virtual wxCompositionMode GetCompositionMode() const { return m_composition; } - + // sets the compositing operator, returns true if it supported virtual bool SetCompositionMode(wxCompositionMode op) = 0; @@ -417,7 +417,7 @@ public: // all rendering is done into a fully transparent temporary context virtual void BeginLayer(wxDouble opacity) = 0; - // composites back the drawings into the context with the opacity given at + // composites back the drawings into the context with the opacity given at // the BeginLayer call virtual void EndLayer() = 0; diff --git a/include/wx/gtk/bitmap.h b/include/wx/gtk/bitmap.h index 96f3e23814..32a612d4a9 100644 --- a/include/wx/gtk/bitmap.h +++ b/include/wx/gtk/bitmap.h @@ -51,9 +51,9 @@ class WXDLLIMPEXP_CORE wxBitmap: public wxBitmapBase { public: wxBitmap() { } - wxBitmap( int width, int height, int depth = wxBITMAP_SCREEN_DEPTH ) + wxBitmap( int width, int height, int depth = wxBITMAP_SCREEN_DEPTH ) { Create(width, height, depth); } - wxBitmap( const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH ) + wxBitmap( const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH ) { Create(sz, depth); } wxBitmap( const char bits[], int width, int height, int depth = 1 ); wxBitmap( const char* const* bits ); diff --git a/include/wx/gtk/dcclient.h b/include/wx/gtk/dcclient.h index 564975c655..cdd22dec1f 100644 --- a/include/wx/gtk/dcclient.h +++ b/include/wx/gtk/dcclient.h @@ -32,7 +32,7 @@ public: virtual bool CanGetTextExtent() const { return true; } virtual void DoGetSize(int *width, int *height) const; - virtual bool DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, + virtual bool DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, wxFloodFillStyle style=wxFLOOD_SURFACE ); virtual bool DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const; @@ -58,11 +58,11 @@ public: virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y, bool useMask = false ); - virtual bool DoBlit( wxCoord xdest, wxCoord ydest, + virtual bool DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, - wxRasterOperationMode logical_func = wxCOPY, - bool useMask = false, + wxRasterOperationMode logical_func = wxCOPY, + bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1 ); virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y ); diff --git a/include/wx/gtk/dcmemory.h b/include/wx/gtk/dcmemory.h index ff470015c8..40e3ef2a2d 100644 --- a/include/wx/gtk/dcmemory.h +++ b/include/wx/gtk/dcmemory.h @@ -23,7 +23,7 @@ public: wxMemoryDCImpl( wxMemoryDC *owner ); wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ); wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); - + virtual ~wxMemoryDCImpl(); // these get reimplemented for mono-bitmaps to behave @@ -48,12 +48,12 @@ public: private: wxBitmap m_selected; - + void Init(); DECLARE_ABSTRACT_CLASS(wxMemoryDCImpl) }; -#endif +#endif // _WX_GTK_DCMEMORY_H_ diff --git a/include/wx/gtk/evtloop.h b/include/wx/gtk/evtloop.h index 79cb753185..f6225fe851 100644 --- a/include/wx/gtk/evtloop.h +++ b/include/wx/gtk/evtloop.h @@ -32,7 +32,7 @@ public: void StoreGdkEventForLaterProcessing(GdkEvent* ev) { m_arrGdkEvents.Add(ev); } - + protected: // the exit code of this event loop diff --git a/include/wx/gtk/filectrl.h b/include/wx/gtk/filectrl.h index e194bfc49f..e84fff83f4 100644 --- a/include/wx/gtk/filectrl.h +++ b/include/wx/gtk/filectrl.h @@ -55,7 +55,7 @@ private: GtkFileChooser *m_widget; // First wildcard in filter, to be used when the user // saves a file without giving an extension. - wxArrayString m_wildcards; + wxArrayString m_wildcards; }; #if wxUSE_FILECTRL diff --git a/include/wx/gtk/font.h b/include/wx/gtk/font.h index 8e03364bca..0f446d745c 100644 --- a/include/wx/gtk/font.h +++ b/include/wx/gtk/font.h @@ -62,7 +62,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, diff --git a/include/wx/gtk/gnome/gprint.h b/include/wx/gtk/gnome/gprint.h index 182b5e316b..82d8ad3ea6 100644 --- a/include/wx/gtk/gnome/gprint.h +++ b/include/wx/gtk/gnome/gprint.h @@ -250,7 +250,7 @@ public: void SetPalette(const wxPalette& WXUNUSED(palette)) { } protected: - bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, + bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, wxFloodFillStyle style=wxFLOOD_SURFACE ); bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const; void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); @@ -268,7 +268,7 @@ protected: void DoDrawSpline(const wxPointList *points); #endif bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, - wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxDC *source, wxCoord xsrc, wxCoord ysrc, wxRasterOperationMode = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y ); diff --git a/include/wx/gtk/gnome/gvfs.h b/include/wx/gtk/gnome/gvfs.h index 6d65e6f977..40d72508d7 100644 --- a/include/wx/gtk/gnome/gvfs.h +++ b/include/wx/gtk/gnome/gvfs.h @@ -48,6 +48,6 @@ public: }; #endif - // wxUSE_MIMETYPE + // wxUSE_MIMETYPE #endif diff --git a/include/wx/gtk/popupwin.h b/include/wx/gtk/popupwin.h index bb7aa4b0c9..ecc2e52679 100644 --- a/include/wx/gtk/popupwin.h +++ b/include/wx/gtk/popupwin.h @@ -26,7 +26,7 @@ public: bool Create(wxWindow *parent, int flags = wxBORDER_NONE); virtual bool Show(bool show = true); - + virtual void SetFocus(); // implementation diff --git a/include/wx/gtk/print.h b/include/wx/gtk/print.h index 0082aa12db..de57b60979 100644 --- a/include/wx/gtk/print.h +++ b/include/wx/gtk/print.h @@ -255,7 +255,7 @@ public: virtual wxRect GetPaperRect() const; protected: - bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, + bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, wxFloodFillStyle style=wxFLOOD_SURFACE ); void DoGradientFillConcentric(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, const wxPoint& circleCenter); void DoGradientFillLinear(const wxRect& rect, const wxColour& initialColour, const wxColour& destColour, wxDirection nDirection = wxEAST); @@ -275,7 +275,7 @@ protected: void DoDrawSpline(const wxPointList *points); #endif bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, - wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxDC *source, wxCoord xsrc, wxCoord ysrc, wxRasterOperationMode rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y ); diff --git a/include/wx/gtk/region.h b/include/wx/gtk/region.h index e465f0011f..9fbbba8ea2 100644 --- a/include/wx/gtk/region.h +++ b/include/wx/gtk/region.h @@ -35,7 +35,7 @@ public: InitRect(rect.x, rect.y, rect.width, rect.height); } - wxRegion( size_t n, const wxPoint *points, + wxRegion( size_t n, const wxPoint *points, wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); #if wxUSE_IMAGE diff --git a/include/wx/gtk/scrolbar.h b/include/wx/gtk/scrolbar.h index d66010cb08..8b8c61e32c 100644 --- a/include/wx/gtk/scrolbar.h +++ b/include/wx/gtk/scrolbar.h @@ -56,7 +56,7 @@ public: static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); - + protected: virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; diff --git a/include/wx/gtk/spinbutt.h b/include/wx/gtk/spinbutt.h index 5449e2add7..c9d3bc31ed 100644 --- a/include/wx/gtk/spinbutt.h +++ b/include/wx/gtk/spinbutt.h @@ -44,7 +44,7 @@ public: static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); - + virtual bool Enable( bool enable = true ); // implementation @@ -55,7 +55,7 @@ public: protected: void GtkDisableEvents() const; void GtkEnableEvents() const; - + virtual wxSize DoGetBestSize() const; virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const; diff --git a/include/wx/gtk/statbmp.h b/include/wx/gtk/statbmp.h index d1194eb193..54fcd67880 100644 --- a/include/wx/gtk/statbmp.h +++ b/include/wx/gtk/statbmp.h @@ -49,7 +49,7 @@ public: static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); - + private: wxBitmap m_bitmap; diff --git a/include/wx/gtk/statbox.h b/include/wx/gtk/statbox.h index b216e24143..2c9a5c3cba 100644 --- a/include/wx/gtk/statbox.h +++ b/include/wx/gtk/statbox.h @@ -51,7 +51,7 @@ protected: virtual void GTKWidgetDoSetMnemonic(GtkWidget* w); void DoApplyWidgetStyle(GtkRcStyle *style); - + private: DECLARE_DYNAMIC_CLASS(wxStaticBox) }; diff --git a/include/wx/gtk/treeentry_gtk.h b/include/wx/gtk/treeentry_gtk.h index 785339934e..0992d2174e 100644 --- a/include/wx/gtk/treeentry_gtk.h +++ b/include/wx/gtk/treeentry_gtk.h @@ -65,7 +65,7 @@ WXDLLIMPEXP_CORE void gtk_tree_entry_set_userdata (GtkTreeEntry* entry, gpointer userdata); WXDLLIMPEXP_CORE -void gtk_tree_entry_set_destroy_func (GtkTreeEntry* entry, +void gtk_tree_entry_set_destroy_func (GtkTreeEntry* entry, GtkTreeEntryDestroy destroy_func, gpointer destroy_func_data); diff --git a/include/wx/gtk1/font.h b/include/wx/gtk1/font.h index 0686c3934f..068bb1a342 100644 --- a/include/wx/gtk1/font.h +++ b/include/wx/gtk1/font.h @@ -63,7 +63,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -75,7 +75,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, diff --git a/include/wx/imagbmp.h b/include/wx/imagbmp.h index e14142c5eb..a54dceb211 100644 --- a/include/wx/imagbmp.h +++ b/include/wx/imagbmp.h @@ -89,7 +89,7 @@ public: virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=true ); virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=true, int index=-1 ); virtual bool DoLoadFile( wxImage *image, wxInputStream& stream, bool verbose, int index ); - + protected: virtual int DoGetImageCount( wxInputStream& stream ); virtual bool DoCanRead( wxInputStream& stream ); diff --git a/include/wx/image.h b/include/wx/image.h index bc0a60e61d..03c1ea2210 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -100,10 +100,10 @@ public: #if wxUSE_STREAMS // NOTE: LoadFile and SaveFile are not pure virtuals to allow derived classes // to implement only one of the two - virtual bool LoadFile( wxImage *WXUNUSED(image), wxInputStream& WXUNUSED(stream), + virtual bool LoadFile( wxImage *WXUNUSED(image), wxInputStream& WXUNUSED(stream), bool WXUNUSED(verbose)=true, int WXUNUSED(index)=-1 ) { return false; } - virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), + virtual bool SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool WXUNUSED(verbose)=true ) { return false; } @@ -135,9 +135,9 @@ protected: #if wxUSE_STREAMS // NOTE: this function is allowed to change the current stream position // since GetImageCount() will take care of restoring it later - virtual int DoGetImageCount( wxInputStream& WXUNUSED(stream) ) + virtual int DoGetImageCount( wxInputStream& WXUNUSED(stream) ) { return 1; } // default return value is 1 image - + // NOTE: this function is allowed to change the current stream position // since CallDoCanRead() will take care of restoring it later virtual bool DoCanRead( wxInputStream& stream ) = 0; @@ -275,7 +275,7 @@ public: bool Create( int width, int height, bool clear = true ); bool Create( int width, int height, unsigned char* data, bool static_data = false ); bool Create( int width, int height, unsigned char* data, unsigned char* alpha, bool static_data = false ); - + // Create() variants using wxSize: bool Create( const wxSize& sz, bool clear = true ) { return Create(sz.GetWidth(), sz.GetHeight(), clear); } @@ -285,7 +285,7 @@ public: { return Create(sz.GetWidth(), sz.GetHeight(), data, alpha, static_data); } void Destroy(); - + // initialize the image data with zeroes void Clear(unsigned char value = 0); diff --git a/include/wx/log.h b/include/wx/log.h index 86e9f40d5f..c95749977a 100644 --- a/include/wx/log.h +++ b/include/wx/log.h @@ -1307,7 +1307,7 @@ WXDLLIMPEXP_BASE const wxChar* wxSysErrorMsg(unsigned long nErrCode = 0); wxDO_LOG(level) // wxLogFatalError() is special as it can't be disabled -#define wxLogFatalError wxDO_LOG(FatalError) +#define wxLogFatalError wxDO_LOG(FatalError) #define wxVLogFatalError(format, argptr) wxDO_LOGV(FatalError, format, argptr) #define wxLogError wxDO_LOG_IF_ENABLED(Error) diff --git a/include/wx/menu.h b/include/wx/menu.h index 466d50675a..876a72e162 100644 --- a/include/wx/menu.h +++ b/include/wx/menu.h @@ -499,7 +499,7 @@ public: #if WXWIN_COMPATIBILITY_2_8 // get or change the label of the menu at given position // Deprecated in favour of SetMenuLabel - wxDEPRECATED( void SetLabelTop(size_t pos, const wxString& label) ); + wxDEPRECATED( void SetLabelTop(size_t pos, const wxString& label) ); // Deprecated in favour of GetMenuLabelText wxDEPRECATED( wxString GetLabelTop(size_t pos) const ); #endif diff --git a/include/wx/meta/convertible.h b/include/wx/meta/convertible.h index d43fc2c74d..1b46f7f21d 100644 --- a/include/wx/meta/convertible.h +++ b/include/wx/meta/convertible.h @@ -17,8 +17,8 @@ template struct wxConvertibleTo_SizeHelper { - static char Match(B* pb); - static int Match(...); + static char Match(B* pb); + static int Match(...); }; // Helper to decide if an object of type D is convertible to type B (the test @@ -26,8 +26,13 @@ struct wxConvertibleTo_SizeHelper template struct wxConvertibleTo { - enum { value = sizeof(wxConvertibleTo_SizeHelper::Match(static_cast(NULL)))==sizeof(char) - }; + enum + { + value = + sizeof(wxConvertibleTo_SizeHelper::Match(static_cast(NULL))) + == + sizeof(char) + }; }; #endif // _WX_META_CONVERTIBLE_H_ diff --git a/include/wx/meta/if.h b/include/wx/meta/if.h index 82e6d3b135..931591cd48 100644 --- a/include/wx/meta/if.h +++ b/include/wx/meta/if.h @@ -57,7 +57,7 @@ struct wxIfImpl } // namespace wxPrivate -// wxIf<> template defines nested type "value" which is the same as +// wxIf<> template defines nested type "value" which is the same as // TTrue if the condition Cond (boolean compile-time constant) was met and // TFalse if it wasn't. // diff --git a/include/wx/meta/int2type.h b/include/wx/meta/int2type.h index 1f18ced67a..4de6493803 100644 --- a/include/wx/meta/int2type.h +++ b/include/wx/meta/int2type.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/meta/int2type.h -// Purpose: Generate a unique type from a constant integer +// Purpose: Generate a unique type from a constant integer // Author: Arne Steinarson // Created: 2008-01-10 // RCS-ID: $Id$ diff --git a/include/wx/mgl/dcmemory.h b/include/wx/mgl/dcmemory.h index c02989c3ce..9ec0e6fd0f 100644 --- a/include/wx/mgl/dcmemory.h +++ b/include/wx/mgl/dcmemory.h @@ -42,7 +42,7 @@ public: // implementation wxBitmap m_selected; - + wxBitmap GetSelectedObject() const { return m_selected; } protected: diff --git a/include/wx/mgl/dcscreen.h b/include/wx/mgl/dcscreen.h index bfc9985a7c..ccf1c218e9 100644 --- a/include/wx/mgl/dcscreen.h +++ b/include/wx/mgl/dcscreen.h @@ -31,7 +31,7 @@ public: static bool StartDrawingOnTop(wxWindow *WXUNUSED(window)) { return TRUE; } static bool StartDrawingOnTop(wxRect *WXUNUSED(rect) = NULL) { return TRUE; } static bool EndDrawingOnTop() { return TRUE; } - + private: DECLARE_DYNAMIC_CLASS(wxScreenDC) }; diff --git a/include/wx/mgl/font.h b/include/wx/mgl/font.h index a94a28c3ea..93802a8dd8 100644 --- a/include/wx/mgl/font.h +++ b/include/wx/mgl/font.h @@ -60,7 +60,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -72,7 +72,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, diff --git a/include/wx/mgl/popupwin.h b/include/wx/mgl/popupwin.h index 8d52418747..dea9211249 100644 --- a/include/wx/mgl/popupwin.h +++ b/include/wx/mgl/popupwin.h @@ -31,7 +31,7 @@ public: (flags & wxBORDER_MASK) | wxPOPUP_WINDOW); } -protected: +protected: DECLARE_DYNAMIC_CLASS(wxPopupWindow) }; diff --git a/include/wx/mimetype.h b/include/wx/mimetype.h index d7b49260da..e47eda9a3c 100644 --- a/include/wx/mimetype.h +++ b/include/wx/mimetype.h @@ -410,7 +410,7 @@ public: static void Set( wxMimeTypesManagerFactory *factory ); static wxMimeTypesManagerFactory *Get(); - + private: static wxMimeTypesManagerFactory *m_factory; }; diff --git a/include/wx/motif/font.h b/include/wx/motif/font.h index 80f86980ae..53f0c3a4d5 100644 --- a/include/wx/motif/font.h +++ b/include/wx/motif/font.h @@ -53,7 +53,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -65,7 +65,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h index dffa117b6a..e8205c4a21 100644 --- a/include/wx/msw/dc.h +++ b/include/wx/msw/dc.h @@ -215,7 +215,7 @@ public: virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, - wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest, diff --git a/include/wx/msw/dcclient.h b/include/wx/msw/dcclient.h index 166ace2792..6726151627 100644 --- a/include/wx/msw/dcclient.h +++ b/include/wx/msw/dcclient.h @@ -106,7 +106,7 @@ class WXDLLIMPEXP_CORE wxPaintDCEx : public wxPaintDC { public: wxPaintDCEx(wxWindow *canvas, WXHDC dc); - + DECLARE_CLASS(wxPaintDCEx) wxDECLARE_NO_COPY_CLASS(wxPaintDCEx); }; diff --git a/include/wx/msw/dcmemory.h b/include/wx/msw/dcmemory.h index 49c5475de2..01c0b5229d 100644 --- a/include/wx/msw/dcmemory.h +++ b/include/wx/msw/dcmemory.h @@ -27,7 +27,7 @@ public: virtual void DoGetSize(int* width, int* height) const; virtual void DoSelect(const wxBitmap& bitmap); - virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const + virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmapOfHDC(*subrect, GetHDC() );} protected: diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h index afadf95e08..a121282f89 100644 --- a/include/wx/msw/font.h +++ b/include/wx/msw/font.h @@ -47,7 +47,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, diff --git a/include/wx/msw/printdlg.h b/include/wx/msw/printdlg.h index 3845d20ff8..233ecdc603 100644 --- a/include/wx/msw/printdlg.h +++ b/include/wx/msw/printdlg.h @@ -30,18 +30,18 @@ class WXDLLIMPEXP_CORE wxWindowsPrintNativeData: public wxPrintNativeDataBase public: wxWindowsPrintNativeData(); virtual ~wxWindowsPrintNativeData(); - + virtual bool TransferTo( wxPrintData &data ); virtual bool TransferFrom( const wxPrintData &data ); - + virtual bool Ok() const { return IsOk(); } virtual bool IsOk() const; - + void* GetDevMode() const { return m_devMode; } void SetDevMode(void* data) { m_devMode = data; } void* GetDevNames() const { return m_devNames; } void SetDevNames(void* data) { m_devNames = data; } - + private: void* m_devMode; void* m_devNames; @@ -51,7 +51,7 @@ private: private: DECLARE_DYNAMIC_CLASS(wxWindowsPrintNativeData) }; - + // --------------------------------------------------------------------------- // wxWindowsPrintDialog: the MSW dialog for printing // --------------------------------------------------------------------------- @@ -76,11 +76,11 @@ private: wxPrinterDC* m_printerDC; bool m_destroyDC; wxWindow* m_dialogParent; - + private: bool ConvertToNative( wxPrintDialogData &data ); bool ConvertFromNative( wxPrintDialogData &data ); - + // holds MSW handle void* m_printDlg; @@ -90,7 +90,7 @@ private: }; // --------------------------------------------------------------------------- -// wxWindowsPageSetupDialog: the MSW page setup dialog +// wxWindowsPageSetupDialog: the MSW page setup dialog // --------------------------------------------------------------------------- class WXDLLIMPEXP_CORE wxWindowsPageSetupDialog: public wxPageSetupDialogBase @@ -110,7 +110,7 @@ public: private: wxPageSetupDialogData m_pageSetupData; wxWindow* m_dialogParent; - + // holds MSW handle void* m_pageDlg; diff --git a/include/wx/msw/spinctrl.h b/include/wx/msw/spinctrl.h index 551b632f28..01715a13c6 100644 --- a/include/wx/msw/spinctrl.h +++ b/include/wx/msw/spinctrl.h @@ -123,7 +123,7 @@ protected: WXHWND m_hwndBuddy; WXFARPROC m_wndProcBuddy; - // Block text update event after SetValue() + // Block text update event after SetValue() bool m_blockEvent; // all existing wxSpinCtrls - this allows to find the one corresponding to diff --git a/include/wx/msw/textctrl.h b/include/wx/msw/textctrl.h index 1da13fffd2..8f3f531615 100644 --- a/include/wx/msw/textctrl.h +++ b/include/wx/msw/textctrl.h @@ -108,7 +108,7 @@ public: // Implementation from now on // -------------------------- - + #if wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT virtual void SetDropTarget(wxDropTarget *dropTarget); #endif // wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT diff --git a/include/wx/msw/tglbtn.h b/include/wx/msw/tglbtn.h index b155af512b..803f9d8a32 100644 --- a/include/wx/msw/tglbtn.h +++ b/include/wx/msw/tglbtn.h @@ -59,12 +59,12 @@ public: protected: void Init(); - + wxBitmap m_bitmap; wxBitmap m_disabledBitmap; bool m_capturing; bool m_depressed,m_oldValue; - + void OnPaint(wxPaintEvent &event); void OnMouse(wxMouseEvent &event); void OnChar(wxKeyEvent &event); diff --git a/include/wx/msw/tooltip.h b/include/wx/msw/tooltip.h index 25ffd75738..c720ae3dc2 100644 --- a/include/wx/msw/tooltip.h +++ b/include/wx/msw/tooltip.h @@ -23,10 +23,10 @@ public: // ctor & dtor wxToolTip(const wxString &tip); virtual ~wxToolTip(); - + // ctor used by wxStatusBar to associate a tooltip to a portion of // the status bar window: - wxToolTip(wxWindow* win, unsigned int id, + wxToolTip(wxWindow* win, unsigned int id, const wxString &tip, const wxRect& rc); // accessors diff --git a/include/wx/msw/window.h b/include/wx/msw/window.h index 4026e7ea06..51a09d5579 100644 --- a/include/wx/msw/window.h +++ b/include/wx/msw/window.h @@ -444,9 +444,9 @@ public: // check if a native double-buffering applies for this window virtual bool IsDoubleBuffered() const; - + void SetDoubleBuffered(bool on); - + // synthesize a wxEVT_LEAVE_WINDOW event and set m_mouseInWindow to false void GenerateMouseLeave(); diff --git a/include/wx/msw/wrapwin.h b/include/wx/msw/wrapwin.h index f6e1a0f8a4..52347d1504 100644 --- a/include/wx/msw/wrapwin.h +++ b/include/wx/msw/wrapwin.h @@ -72,10 +72,10 @@ // #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 compatability // 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 +// 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 // overwrite them if there is a chance that they're not defined #if (!defined(_MSC_VER) || (_MSC_VER < 1300)) && !defined(__WIN64__) #define UINT_PTR unsigned int diff --git a/include/wx/os2/bitmap.h b/include/wx/os2/bitmap.h index b7d02925a0..818bb49071 100644 --- a/include/wx/os2/bitmap.h +++ b/include/wx/os2/bitmap.h @@ -165,7 +165,7 @@ public: ); virtual bool Create(const wxSize& sz, int depth = wxBITMAP_SCREEN_DEPTH) { return Create(sz.GetWidth(), sz.GetHeight(), depth); } - + virtual bool Create( const void* pData ,wxBitmapType lType ,int nWidth diff --git a/include/wx/os2/dcmemory.h b/include/wx/os2/dcmemory.h index 10ca985c09..a67943ccc7 100644 --- a/include/wx/os2/dcmemory.h +++ b/include/wx/os2/dcmemory.h @@ -26,7 +26,7 @@ public: virtual void DoGetSize(int* pWidth, int* pHeight) const; virtual void DoSelect(const wxBitmap& bitmap); - virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const + virtual wxBitmap DoGetAsBitmap(const wxRect* subrect) const { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect);} protected: diff --git a/include/wx/os2/font.h b/include/wx/os2/font.h index ef692625d2..3c14bf884b 100644 --- a/include/wx/os2/font.h +++ b/include/wx/os2/font.h @@ -50,7 +50,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -62,7 +62,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, diff --git a/include/wx/os2/listctrl.h b/include/wx/os2/listctrl.h index ddece5a697..6c3a69371e 100644 --- a/include/wx/os2/listctrl.h +++ b/include/wx/os2/listctrl.h @@ -1,9 +1,9 @@ /////////////////////////////////////////////////////////////////////////////// // Name: wx/os2/listctrl.h // Purpose: wxListCtrl class -// Author: +// Author: // Modified by: -// Created: +// Created: // RCS-ID: $Id$ // Copyright: (c) wxWidgets team // Licence: wxWindows licence @@ -507,7 +507,7 @@ protected: // // Return the icon for the given item. In report view, OnGetItemImage will - // only be called for the first column. See OnGetItemColumnImage for + // only be called for the first column. See OnGetItemColumnImage for // details. // virtual int OnGetItemImage(long lItem) const; diff --git a/include/wx/os2/sound.h b/include/wx/os2/sound.h index 2b6c07a54c..bef454b460 100644 --- a/include/wx/os2/sound.h +++ b/include/wx/os2/sound.h @@ -33,7 +33,7 @@ public: protected: bool Free(); - + bool DoPlay(unsigned flags) const; private: diff --git a/include/wx/osx/bmpbuttn.h b/include/wx/osx/bmpbuttn.h index df98620825..9cb9bb70ce 100644 --- a/include/wx/osx/bmpbuttn.h +++ b/include/wx/osx/bmpbuttn.h @@ -23,7 +23,7 @@ public: { SetMargins(wxDEFAULT_BUTTON_MARGIN, wxDEFAULT_BUTTON_MARGIN); } - + wxBitmapButton(wxWindow *parent, wxWindowID id, const wxBitmap& bitmap, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW, @@ -40,7 +40,7 @@ public: const wxString& name = wxButtonNameStr); protected: - virtual wxSize DoGetBestSize() const; + virtual wxSize DoGetBestSize() const; virtual void DoSetBitmap(const wxBitmap& bitmap, State which); diff --git a/include/wx/osx/carbon/chkconf.h b/include/wx/osx/carbon/chkconf.h index b88b06c73b..f9109f2bbf 100644 --- a/include/wx/osx/carbon/chkconf.h +++ b/include/wx/osx/carbon/chkconf.h @@ -27,8 +27,8 @@ #define wxOSX_USE_NATIVE_TOOLBAR 1 #endif -/* - * text rendering system +/* + * text rendering system */ #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 diff --git a/include/wx/osx/carbon/dataview.h b/include/wx/osx/carbon/dataview.h index 336c577f23..7f6962328d 100644 --- a/include/wx/osx/carbon/dataview.h +++ b/include/wx/osx/carbon/dataview.h @@ -41,7 +41,7 @@ public: { return this->m_PropertyID; } - + void SetPropertyID(DataBrowserPropertyID newPropertyID) { this->m_PropertyID = newPropertyID; @@ -189,7 +189,7 @@ public: OSStatus GetPropertyFlags (DataBrowserPropertyID propertyID, DataBrowserPropertyFlags *flags ) const; OSStatus GetPropertyID (DataBrowserItemDataRef itemData, DataBrowserPropertyID* propertyID) const; // returns for the passed item data reference the corresponding property ID OSStatus GetPropertyID (DataBrowserTableViewColumnIndex index, DataBrowserPropertyID* propertyID) const; // returns for the passed column index the corresponding property ID - + OSStatus IsUsedPropertyID(DataBrowserPropertyID propertyID) const; // checks if passed property id is used by the control; no error is returned if the id exists OSStatus RemoveColumnByProperty(DataBrowserTableViewColumnID propertyID); @@ -270,7 +270,7 @@ public: // container handling // OSStatus CloseContainer(DataBrowserItemID containerID); - + OSStatus OpenContainer(DataBrowserItemID containerID); protected : @@ -315,7 +315,7 @@ protected : // event handler for hit testing /// void* m_macDataViewCtrlEventHandler; - + private: // // wxWidget internal stuff diff --git a/include/wx/osx/carbon/private.h b/include/wx/osx/carbon/private.h index 19fafff74f..027d7a8a42 100644 --- a/include/wx/osx/carbon/private.h +++ b/include/wx/osx/carbon/private.h @@ -302,12 +302,12 @@ public : virtual bool IsVisible() const; virtual void Raise(); - + virtual void Lower(); virtual void ScrollRect( const wxRect *rect, int dx, int dy ); - virtual void GetContentArea( int &left , int &top , int &width , int &height ) const; + virtual void GetContentArea( int &left , int &top , int &width , int &height ) const; virtual void Move(int x, int y, int width, int height); virtual void GetPosition( int &x, int &y ) const; virtual void GetSize( int &width, int &height ) const; @@ -316,7 +316,7 @@ public : // where is in native window relative coordinates virtual void SetNeedsDisplay( const wxRect* where = NULL ); virtual bool GetNeedsDisplay() const; - + virtual bool CanFocus() const; // return true if successful virtual bool SetFocus(); @@ -324,7 +324,7 @@ public : void RemoveFromParent(); void Embed( wxWidgetImpl *parent ); - + void SetDefaultButton( bool isDefault ); void PerformClick(); void SetLabel( const wxString& title, wxFontEncoding encoding ); @@ -369,7 +369,7 @@ public : virtual wxInt32 GetMaximum() const; virtual wxInt32 GetMinimum() const; - + virtual void SetValueAndRange( SInt32 value , SInt32 minimum , SInt32 maximum ); virtual void SetRange( SInt32 minimum , SInt32 maximum ); @@ -451,7 +451,7 @@ public : virtual void GetFeatures( UInt32 *features ); - + // to be moved into a tab control class virtual OSStatus SetTabEnabled( SInt16 tabNo , bool enable ); @@ -640,7 +640,7 @@ public : } ; */ -class WXDLLIMPEXP_CORE wxMacDataItem +class WXDLLIMPEXP_CORE wxMacDataItem { public : wxMacDataItem(); @@ -817,7 +817,7 @@ protected : class WXDLLIMPEXP_CORE wxMacDataBrowserColumn : public wxListWidgetColumn { public : - wxMacDataBrowserColumn( DataBrowserPropertyID propertyId, DataBrowserPropertyType colType, bool editable ) + wxMacDataBrowserColumn( DataBrowserPropertyID propertyId, DataBrowserPropertyType colType, bool editable ) : m_property(propertyId), m_editable(editable), m_type( colType ) { } @@ -825,9 +825,9 @@ public : { } DataBrowserPropertyID GetProperty() const { return m_property ; } - + bool IsEditable() const { return m_editable; } - + DataBrowserPropertyType GetType() const { return m_type; } protected : @@ -844,12 +844,12 @@ class WXDLLIMPEXP_CORE wxMacDataBrowserCellValue : public wxListWidgetCellValue public : wxMacDataBrowserCellValue(DataBrowserItemDataRef data) : m_data(data) {} virtual ~wxMacDataBrowserCellValue() {} - + virtual void Set( CFStringRef value ); virtual void Set( const wxString& value ); virtual void Set( int value ) ; virtual void Check( bool check ); - + virtual int GetIntValue() const ; virtual wxString GetStringValue() const ; protected : @@ -868,10 +868,10 @@ public: wxListWidgetColumn* InsertTextColumn( unsigned int pos, const wxString& title, bool editable = false, wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) ; - wxListWidgetColumn* InsertCheckColumn( unsigned int pos , const wxString& title, bool editable = false, + wxListWidgetColumn* InsertCheckColumn( unsigned int pos , const wxString& title, bool editable = false, wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) ; - wxMacDataBrowserColumn* DoInsertColumn( unsigned int pos, DataBrowserPropertyID property, + wxMacDataBrowserColumn* DoInsertColumn( unsigned int pos, DataBrowserPropertyID property, const wxString& title, bool editable, DataBrowserPropertyType colType, SInt16 just, int width ); // add and remove @@ -1000,51 +1000,51 @@ public : wxNonOwnedWindowCarbonImpl( wxNonOwnedWindow* nonownedwnd) ; wxNonOwnedWindowCarbonImpl(); virtual ~wxNonOwnedWindowCarbonImpl(); - + virtual void Destroy() ; void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, long style, long extraStyle, const wxString& name ) ; - + WXWindow GetWXWindow() const; - void Raise(); + void Raise(); void Lower(); - bool Show(bool show); + bool Show(bool show); bool ShowWithEffect(bool show, wxShowEffect effect, unsigned timeout); - + void Update(); bool SetTransparent(wxByte alpha); bool SetBackgroundColour(const wxColour& col ); - void SetExtraStyle( long exStyle ); - bool SetBackgroundStyle(wxBackgroundStyle style); + void SetExtraStyle( long exStyle ); + bool SetBackgroundStyle(wxBackgroundStyle style); bool CanSetTransparent(); void MoveWindow(int x, int y, int width, int height); void GetPosition( int &x, int &y ) const; void GetSize( int &width, int &height ) const; - void GetContentArea( int &left , int &top , int &width , int &height ) const; + void GetContentArea( int &left , int &top , int &width , int &height ) const; bool SetShape(const wxRegion& region); virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) ; - + virtual bool IsMaximized() const; - + virtual bool IsIconized() const; - + virtual void Iconize( bool iconize ); - + virtual void Maximize(bool maximize); - + virtual bool IsFullScreen() const; - + virtual bool ShowFullScreen(bool show, long style); virtual void RequestUserAttention(int flags); - + virtual void ScreenToWindow( int *x, int *y ); - + virtual void WindowToScreen( int *x, int *y ); - + bool MacGetUnifiedAppearance() const ; void MacChangeWindowAttributes( wxUint32 attributesToSet , wxUint32 attributesToClear ) ; @@ -1052,18 +1052,18 @@ public : void MacSetMetalAppearance( bool set ) ; bool MacGetMetalAppearance() const ; void MacSetUnifiedAppearance( bool set ); - + WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; } wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } protected : void MacInstallTopLevelWindowEventHandler(); - + WXEVENTHANDLERREF m_macEventHandler ; WindowRef m_macWindow; void * m_macFullScreenData ; - DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCarbonImpl) -}; + DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCarbonImpl) +}; #endif // wxUSE_GUI diff --git a/include/wx/osx/carbon/private/overlay.h b/include/wx/osx/carbon/private/overlay.h index b3b7608b03..60dd892c06 100644 --- a/include/wx/osx/carbon/private/overlay.h +++ b/include/wx/osx/carbon/private/overlay.h @@ -21,34 +21,34 @@ class wxOverlayImpl public: wxOverlayImpl() ; ~wxOverlayImpl() ; - - + + // clears the overlay without restoring the former state // to be done eg when the window content has been changed and repainted void Reset(); - + // returns true if it has been setup bool IsOk(); - + void Init( wxDC* dc, int x , int y , int width , int height ); - + void BeginDrawing( wxDC* dc); - + void EndDrawing( wxDC* dc); - + void Clear( wxDC* dc); private: OSStatus CreateOverlayWindow(); - + void MacGetBounds( Rect *bounds ); - + WindowRef m_overlayWindow; WindowRef m_overlayParentWindow; CGContextRef m_overlayContext ; // we store the window in case we would have to issue a Refresh() wxWindow* m_window ; - + int m_x ; int m_y ; int m_width ; diff --git a/include/wx/osx/carbon/private/print.h b/include/wx/osx/carbon/private/print.h index a53482fd17..1babdfce0e 100644 --- a/include/wx/osx/carbon/private/print.h +++ b/include/wx/osx/carbon/private/print.h @@ -34,10 +34,10 @@ public: virtual void TransferFrom( wxPrintDialogData * ); virtual void TransferTo( wxPrintDialogData * ); - - PMPrintSession GetPrintSession() { return m_macPrintSession; } - PMPageFormat GetPageFormat() { return m_macPageFormat; } - PMPrintSettings GetPrintSettings() { return m_macPrintSettings; } + + PMPrintSession GetPrintSession() { return m_macPrintSession; } + PMPageFormat GetPageFormat() { return m_macPageFormat; } + PMPrintSettings GetPrintSettings() { return m_macPrintSettings; } protected : virtual void UpdateFromPMState(); virtual void UpdateToPMState(); diff --git a/include/wx/osx/carbon/statbmp.h b/include/wx/osx/carbon/statbmp.h index 17d38360f5..1a37192cfe 100644 --- a/include/wx/osx/carbon/statbmp.h +++ b/include/wx/osx/carbon/statbmp.h @@ -58,7 +58,7 @@ class WXDLLIMPEXP_CORE wxStaticBitmap: public wxStaticBitmapBase virtual wxSize DoGetBestSize() const; wxBitmap m_bitmap; - DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() }; #endif diff --git a/include/wx/osx/checkbox.h b/include/wx/osx/checkbox.h index 2751c3f8fa..871f1b9597 100644 --- a/include/wx/osx/checkbox.h +++ b/include/wx/osx/checkbox.h @@ -37,7 +37,7 @@ public: virtual void Command(wxCommandEvent& event); // osx specific event handling common for all osx-ports - + virtual bool OSXHandleClicked( double timestampsec ); protected: void DoSet3StateValue(wxCheckBoxState val); diff --git a/include/wx/osx/checklst.h b/include/wx/osx/checklst.h index 5e2fb9774b..5927fbabd3 100644 --- a/include/wx/osx/checklst.h +++ b/include/wx/osx/checklst.h @@ -81,7 +81,7 @@ protected: // the array containing the checked status of the items wxArrayInt m_checks; - + wxListWidgetColumn* m_checkColumn ; void Init(); diff --git a/include/wx/osx/chkconf.h b/include/wx/osx/chkconf.h index b353b1c034..243b9899e7 100644 --- a/include/wx/osx/chkconf.h +++ b/include/wx/osx/chkconf.h @@ -40,7 +40,7 @@ * we only use core graphics now on all builds, try to catch attempts * to configure the build otherwise and give error messages */ - + #if !wxUSE_GRAPHICS_CONTEXT || ( defined( wxMAC_USE_CORE_GRAPHICS ) && !wxMAC_USE_CORE_GRAPHICS ) # error "OS X builds use CoreGraphics in this wx version, you cannot turn back to QuickDraw completely" #endif @@ -48,7 +48,7 @@ /* * using mixins of cocoa functionality */ - + #ifdef __WXOSX_COCOA__ #define wxOSX_USE_COCOA 1 #else @@ -83,7 +83,7 @@ /* * combination flags */ - + #if wxOSX_USE_COCOA || wxOSX_USE_CARBON #define wxOSX_USE_COCOA_OR_CARBON 1 #else diff --git a/include/wx/osx/choice.h b/include/wx/osx/choice.h index c69ab66931..20421e046c 100644 --- a/include/wx/osx/choice.h +++ b/include/wx/osx/choice.h @@ -77,7 +77,7 @@ public: virtual wxString GetString(unsigned int n) const ; virtual void SetString(unsigned int pos, const wxString& s); // osx specific event handling common for all osx-ports - + virtual bool OSXHandleClicked( double timestampsec ); protected: diff --git a/include/wx/osx/cocoa/chkconf.h b/include/wx/osx/cocoa/chkconf.h index 868eeb5ca3..47717d721e 100644 --- a/include/wx/osx/cocoa/chkconf.h +++ b/include/wx/osx/cocoa/chkconf.h @@ -20,8 +20,8 @@ #define wxOSX_USE_NATIVE_TOOLBAR 1 #endif -/* - * text rendering system +/* + * text rendering system */ #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 diff --git a/include/wx/osx/cocoa/dataview.h b/include/wx/osx/cocoa/dataview.h index 25a60f38f3..5253770865 100644 --- a/include/wx/osx/cocoa/dataview.h +++ b/include/wx/osx/cocoa/dataview.h @@ -104,7 +104,7 @@ public: { return this->m_NativeColumnPtr; } - + void SetNativeColumnPtr(NSTableColumn* newNativeColumnPtr) { this->m_NativeColumnPtr = newNativeColumnPtr; @@ -235,11 +235,11 @@ private: NSMutableArray* children; // buffered children NSMutableSet* items; // stores all items that are in use by the control - + wxCocoaDataViewControl* implementation; - + wxDataViewModel* model; - + wxPointerObject* currentParentItem; // parent of the buffered children; the object is owned } @@ -338,11 +338,11 @@ private: @private CGFloat xImageShift; // shift for the image in x-direction from border CGFloat spaceImageText; // space between image and text ("belongs" to the image) - + NSImage* image; // the image itself - + NSSize imageSize; // largest size of the image; default size is (16, 16) - + NSTextAlignment cellAlignment; // the text alignment is used to align the whole // cell (image and text) } diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index ec69ce31d0..c8adede969 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -60,17 +60,17 @@ WXDLLIMPEXP_BASE wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname class WXDLLIMPEXP_CORE wxWidgetCocoaImpl : public wxWidgetImpl { public : - wxWidgetCocoaImpl( wxWindowMac* peer , WXWidget w, bool isRootControl = false ) ; - wxWidgetCocoaImpl() ; - ~wxWidgetCocoaImpl(); - + wxWidgetCocoaImpl( wxWindowMac* peer , WXWidget w, bool isRootControl = false ) ; + wxWidgetCocoaImpl() ; + ~wxWidgetCocoaImpl(); + void Init(); - + virtual bool IsVisible() const ; virtual void SetVisibility(bool); virtual void Raise(); - + virtual void Lower(); virtual void ScrollRect( const wxRect *rect, int dx, int dy ); @@ -124,11 +124,11 @@ public : void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); void InstallEventHandler( WXWidget control = NULL ); - - virtual bool DoHandleMouseEvent(NSEvent *event); + + virtual bool DoHandleMouseEvent(NSEvent *event); virtual bool DoHandleKeyEvent(NSEvent *event); virtual bool DoHandleCharEvent(NSEvent *event, NSString *text); - virtual void DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow); + virtual void DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow); void SetFlipped(bool flipped); virtual bool IsFlipped() const { return m_isFlipped; } @@ -149,7 +149,7 @@ public : virtual void resetCursorRects(WXWidget slf, void* _cmd); virtual bool isFlipped(WXWidget slf, void* _cmd); virtual void drawRect(void* rect, WXWidget slf, void* _cmd); - + virtual void controlAction(WXWidget slf, void* _cmd, void* sender); virtual void controlDoubleAction(WXWidget slf, void* _cmd, void *sender); @@ -158,9 +158,9 @@ protected: NSEvent* m_lastKeyDownEvent; bool m_isFlipped; // if it the control has an editor, that editor will already send some - // events, don't resend them + // events, don't resend them bool m_hasEditor; - + DECLARE_DYNAMIC_CLASS_NO_COPY(wxWidgetCocoaImpl) }; @@ -171,59 +171,59 @@ class wxNonOwnedWindowCocoaImpl : public wxNonOwnedWindowImpl public : wxNonOwnedWindowCocoaImpl( wxNonOwnedWindow* nonownedwnd) ; wxNonOwnedWindowCocoaImpl(); - + virtual ~wxNonOwnedWindowCocoaImpl(); - + virtual void Destroy() ; void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, long style, long extraStyle, const wxString& name ) ; - + WXWindow GetWXWindow() const; - void Raise(); + void Raise(); void Lower(); - bool Show(bool show); + bool Show(bool show); bool ShowWithEffect(bool show, wxShowEffect effect, unsigned timeout); - + void Update(); bool SetTransparent(wxByte alpha); bool SetBackgroundColour(const wxColour& col ); - void SetExtraStyle( long exStyle ); - bool SetBackgroundStyle(wxBackgroundStyle style); + void SetExtraStyle( long exStyle ); + bool SetBackgroundStyle(wxBackgroundStyle style); bool CanSetTransparent(); void MoveWindow(int x, int y, int width, int height); void GetPosition( int &x, int &y ) const; void GetSize( int &width, int &height ) const; - void GetContentArea( int &left , int &top , int &width , int &height ) const; + void GetContentArea( int &left , int &top , int &width , int &height ) const; bool SetShape(const wxRegion& region); - + virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) ; - + virtual bool IsMaximized() const; - + virtual bool IsIconized() const; - + virtual void Iconize( bool iconize ); - + virtual void Maximize(bool maximize); - + virtual bool IsFullScreen() const; - + virtual bool ShowFullScreen(bool show, long style); virtual void RequestUserAttention(int flags); - + virtual void ScreenToWindow( int *x, int *y ); - + virtual void WindowToScreen( int *x, int *y ); - + wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } protected : WX_wxNSWindow m_macWindow; void * m_macFullScreenData ; DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowCocoaImpl) -}; +}; #ifdef __OBJC__ @@ -231,16 +231,16 @@ protected : WXDLLIMPEXP_CORE wxRect wxFromNSRect( NSView* parent, const NSRect& rect ); WXDLLIMPEXP_CORE NSPoint wxToNSPoint( NSView* parent, const wxPoint& p ); WXDLLIMPEXP_CORE wxPoint wxFromNSPoint( NSView* parent, const NSPoint& p ); - - NSRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , + + NSRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin = true ); - + // used for many wxControls - + @interface wxNSButton : NSButton { } - + @end @interface wxNSBox : NSBox @@ -276,7 +276,7 @@ protected : @interface wxNSTextView : NSTextView { } - + @end @interface wxNSMenu : NSMenu @@ -287,7 +287,7 @@ protected : - (void) setImplementation:(wxMenuImpl*) item; - (wxMenuImpl*) implementation; - @end + @end @interface wxNSMenuItem : NSMenuItem { @@ -300,8 +300,8 @@ protected : - (void)clickedAction:(id)sender; - (BOOL)validateMenuItem:(NSMenuItem *)menuItem; - @end - + @end + void WXDLLIMPEXP_CORE wxOSXCocoaClassAddWXMethods(Class c); /* diff --git a/include/wx/osx/cocoa/private/textimpl.h b/include/wx/osx/cocoa/private/textimpl.h index 98962b3157..b405b19b1c 100644 --- a/include/wx/osx/cocoa/private/textimpl.h +++ b/include/wx/osx/cocoa/private/textimpl.h @@ -32,7 +32,7 @@ public : virtual void GetSelection( long* from, long* to) const ; virtual void SetSelection( long from , long to ); virtual void WriteText(const wxString& str) ; - + virtual void controlAction(WXWidget slf, void* _cmd, void *sender); protected : NSTextField* m_textField; diff --git a/include/wx/osx/config_xcode.h b/include/wx/osx/config_xcode.h index bacb7ee8ee..b861bc14a5 100644 --- a/include/wx/osx/config_xcode.h +++ b/include/wx/osx/config_xcode.h @@ -2,7 +2,7 @@ // Name: config_xcode.pch // Purpose: configurations for xcode builds // Author: Stefan Csomor -// Modified by: +// Modified by: // Created: 29.04.04 // RCS-ID: $Id$ // Copyright: (c) wxWidgets team @@ -135,7 +135,7 @@ #define HAVE_STDLIB_H 1 // OBSOLETE ? - + #define HAVE_COS 1 #define HAVE_FLOOR 1 #define HAVE_INTTYPES_H 1 diff --git a/include/wx/osx/core/cfdataref.h b/include/wx/osx/core/cfdataref.h index 8a9d7e8c81..8ae8417300 100644 --- a/include/wx/osx/core/cfdataref.h +++ b/include/wx/osx/core/cfdataref.h @@ -2,7 +2,7 @@ // Name: wx/mac/corefoundation/cfdata.h // Purpose: wxCFDataRef class // Author: Stefan Csomor -// Modified by: +// Modified by: // Created: 2007/05/10 // RCS-ID: $Id: cfdataref.h 46095 2007-05-18 07:29:49Z SC $ // Copyright: (c) 2007 Stefan Csomor @@ -33,7 +33,7 @@ public: {} typedef wxCFRef super_type; - + /*! @method wxCFDataRef @abstract Assumes ownership of p and creates a reference to it. @templatefield otherType Any type. @@ -65,7 +65,7 @@ public: @param data The raw data. @param length The data length. */ - wxCFDataRef(const UInt8* data, CFIndex length) + wxCFDataRef(const UInt8* data, CFIndex length) : super_type(CFDataCreate(kCFAllocatorDefault, data, length)) { } @@ -80,7 +80,7 @@ public: else return 0; } - + /*! @method GetBytes @abstract Copies the data into an external buffer @param range The desired range. diff --git a/include/wx/osx/core/cfstring.h b/include/wx/osx/core/cfstring.h index e60bb91548..60949ad65e 100644 --- a/include/wx/osx/core/cfstring.h +++ b/include/wx/osx/core/cfstring.h @@ -49,18 +49,18 @@ public: #if wxOSX_USE_COCOA_OR_IPHONE wxCFStringRef(NSString* ref) - : wxCFRef< CFStringRef >((CFStringRef) ref) + : wxCFRef< CFStringRef >((CFStringRef) ref) { } #endif wxCFStringRef(CFStringRef ref) - : wxCFRef< CFStringRef >(ref) + : wxCFRef< CFStringRef >(ref) { } wxCFStringRef(const wxCFStringRef& otherRef ) - : wxCFRef< CFStringRef >(otherRef) + : wxCFRef< CFStringRef >(otherRef) { } @@ -69,7 +69,7 @@ public: } wxString AsString( wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) const; - + static wxString AsString( CFStringRef ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; #if wxOSX_USE_COCOA_OR_IPHONE static wxString AsString( NSString* ref, wxFontEncoding encoding = wxFONTENCODING_DEFAULT ) ; diff --git a/include/wx/osx/core/dataview.h b/include/wx/osx/core/dataview.h index e5d4be4a79..c8af8cd05c 100644 --- a/include/wx/osx/core/dataview.h +++ b/include/wx/osx/core/dataview.h @@ -22,7 +22,7 @@ typedef wxWidgetImpl wxWidgetImplType; // --------------------------------------------------------- // Helper functions for dataview implementation on OSX // --------------------------------------------------------- -wxWidgetImplType* CreateDataView(wxWindowMac* wxpeer, wxWindowMac* parent, wxWindowID id, +wxWidgetImplType* CreateDataView(wxWindowMac* wxpeer, wxWindowMac* parent, wxWindowID id, wxPoint const& pos, wxSize const& size, long style, long extraStyle); wxString ConcatenateDataViewItemValues(wxDataViewCtrl const* dataViewCtrlPtr, wxDataViewItem const& dataViewItem); // concatenates all data of the visible columns of the passed control diff --git a/include/wx/osx/core/mimetype.h b/include/wx/osx/core/mimetype.h index 46058b070f..d3bc55f5ed 100644 --- a/include/wx/osx/core/mimetype.h +++ b/include/wx/osx/core/mimetype.h @@ -79,7 +79,7 @@ protected: wxString GetCommand(const wxString &verb, size_t nIndex) const; - // Read XDG *.desktop file + // Read XDG *.desktop file void LoadXDGApp(const wxString& filename); // Scan XDG directory void LoadXDGAppsFilesFromDir(const wxString& dirname); diff --git a/include/wx/osx/core/private.h b/include/wx/osx/core/private.h index 0c3a9fb3ec..b6df304840 100644 --- a/include/wx/osx/core/private.h +++ b/include/wx/osx/core/private.h @@ -62,7 +62,7 @@ private: class WXDLLIMPEXP_CORE wxDeferredObjectDeleter : public wxObject { public : - wxDeferredObjectDeleter( wxObject* obj ) : m_obj(obj) + wxDeferredObjectDeleter( wxObject* obj ) : m_obj(obj) { } virtual ~wxDeferredObjectDeleter() @@ -104,20 +104,20 @@ typedef wxWidgetImpl wxWidgetImplType; #endif #if wxUSE_MENUS -class wxMenuItemImpl : public wxObject +class wxMenuItemImpl : public wxObject { public : wxMenuItemImpl( wxMenuItem* peer ) : m_peer(peer) { } - + virtual ~wxMenuItemImpl() ; virtual void SetBitmap( const wxBitmap& bitmap ) = 0; virtual void Enable( bool enable ) = 0; virtual void Check( bool check ) = 0; virtual void SetLabel( const wxString& text, wxAcceleratorEntry *entry ) = 0; virtual void Hide( bool hide = true ) = 0; - + virtual void * GetHMenuItem() = 0; wxMenuItem* GetWXPeer() { return m_peer ; } @@ -132,27 +132,27 @@ public : protected : wxMenuItem* m_peer; - + DECLARE_ABSTRACT_CLASS(wxMenuItemImpl) } ; -class wxMenuImpl : public wxObject +class wxMenuImpl : public wxObject { public : wxMenuImpl( wxMenu* peer ) : m_peer(peer) { } - - virtual ~wxMenuImpl() ; - virtual void InsertOrAppend(wxMenuItem *pItem, size_t pos) = 0; + + virtual ~wxMenuImpl() ; + virtual void InsertOrAppend(wxMenuItem *pItem, size_t pos) = 0; virtual void Remove( wxMenuItem *pItem ) = 0; - + virtual void MakeRoot() = 0; virtual void SetTitle( const wxString& text ) = 0; virtual WXHMENU GetHMenu() = 0; - + wxMenu* GetWXPeer() { return m_peer ; } virtual void PopUp( wxWindow *win, int x, int y ) = 0; @@ -161,7 +161,7 @@ public : static wxMenuImpl* CreateRootMenu( wxMenu* peer ); protected : wxMenu* m_peer; - + DECLARE_ABSTRACT_CLASS(wxMenuItemImpl) } ; #endif @@ -179,7 +179,7 @@ public : bool IsRootControl() const { return m_isRootControl; } wxWindowMac* GetWXPeer() const { return m_wxPeer; } - + bool IsOk() const { return GetWXWidget() != NULL; } // not only the control itself, but also all its parents must be visible @@ -189,13 +189,13 @@ public : virtual void SetVisibility( bool visible ) = 0; virtual void Raise() = 0; - + virtual void Lower() = 0; virtual void ScrollRect( const wxRect *rect, int dx, int dy ) = 0; virtual WXWidget GetWXWidget() const = 0; - + virtual void SetBackgroundColour( const wxColour& col ) = 0; // all coordinates in native parent widget relative coordinates @@ -221,10 +221,10 @@ public : // return true if successful virtual bool SetFocus() = 0; virtual bool HasFocus() const = 0; - + virtual void RemoveFromParent() = 0; virtual void Embed( wxWidgetImpl *parent ) = 0; - + virtual void SetDefaultButton( bool isDefault ) = 0; virtual void PerformClick() = 0; virtual void SetLabel( const wxString& title, wxFontEncoding encoding ) = 0; @@ -254,202 +254,202 @@ public : // is the clicked event sent AFTER the state already changed, so no additional // state changing logic is required from the outside virtual bool ButtonClickDidStateChange() = 0; - + virtual void InstallEventHandler( WXWidget control = NULL ) = 0; // static methods for associating native controls and their implementations - static wxWidgetImpl* + static wxWidgetImpl* FindFromWXWidget(WXWidget control); - + static void RemoveAssociations( wxWidgetImpl* impl); - + static void Associate( WXWidget control, wxWidgetImpl *impl ); - + static WXWidget FindFocus(); - + // static creation methods, must be implemented by all toolkits - - static wxWidgetImplType* CreateUserPane( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxPoint& pos, + + static wxWidgetImplType* CreateUserPane( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle) ; static wxWidgetImplType* CreateContentView( wxNonOwnedWindow* now ) ; - static wxWidgetImplType* CreateButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxString& label, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle) ; - static wxWidgetImplType* CreateDisclosureTriangle( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateDisclosureTriangle( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxString& label, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle) ; - - static wxWidgetImplType* CreateStaticLine( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxPoint& pos, + + static wxWidgetImplType* CreateStaticLine( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle) ; - static wxWidgetImplType* CreateGroupBox( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateGroupBox( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxString& label, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle) ; - static wxWidgetImplType* CreateStaticText( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateStaticText( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxString& label, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle) ; - static wxWidgetImplType* CreateTextControl( wxTextCtrl* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateTextControl( wxTextCtrl* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxString& content, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle) ; - static wxWidgetImplType* CreateSearchControl( wxTextCtrl* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateSearchControl( wxTextCtrl* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxString& content, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle) ; - static wxWidgetImplType* CreateCheckBox( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateCheckBox( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxString& label, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - - static wxWidgetImplType* CreateRadioButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + + static wxWidgetImplType* CreateRadioButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxString& label, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - static wxWidgetImplType* CreateToggleButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateToggleButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxString& label, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - static wxWidgetImplType* CreateBitmapToggleButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateBitmapToggleButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - static wxWidgetImplType* CreateBitmapButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateBitmapButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - static wxWidgetImplType* CreateTabView( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxPoint& pos, + static wxWidgetImplType* CreateTabView( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - static wxWidgetImplType* CreateGauge( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateGauge( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, wxInt32 value, wxInt32 minimum, wxInt32 maximum, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - static wxWidgetImplType* CreateSlider( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateSlider( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, wxInt32 value, wxInt32 minimum, wxInt32 maximum, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - static wxWidgetImplType* CreateSpinButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateSpinButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, wxInt32 value, wxInt32 minimum, wxInt32 maximum, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - static wxWidgetImplType* CreateScrollBar( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxPoint& pos, + static wxWidgetImplType* CreateScrollBar( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - static wxWidgetImplType* CreateChoice( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateChoice( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, wxMenu* menu, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); - static wxWidgetImplType* CreateListBox( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, - const wxPoint& pos, + static wxWidgetImplType* CreateListBox( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID id, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); // converts from Toplevel-Content relative to local @@ -467,7 +467,7 @@ protected : // the interface to be implemented eg by a listbox // -class WXDLLIMPEXP_CORE wxListWidgetColumn +class WXDLLIMPEXP_CORE wxListWidgetColumn { public : virtual ~wxListWidgetColumn() {} @@ -478,12 +478,12 @@ class WXDLLIMPEXP_CORE wxListWidgetCellValue public : wxListWidgetCellValue() {} virtual ~wxListWidgetCellValue() {} - + virtual void Set( CFStringRef value ) = 0; virtual void Set( const wxString& value ) = 0; virtual void Set( int value ) = 0; virtual void Check( bool check ); - + virtual bool IsChecked() const; virtual int GetIntValue() const = 0; virtual wxString GetStringValue() const = 0; @@ -494,12 +494,12 @@ class WXDLLIMPEXP_CORE wxListWidgetImpl public: wxListWidgetImpl() {} virtual ~wxListWidgetImpl() { } - - virtual wxListWidgetColumn* InsertTextColumn( unsigned pos, const wxString& title, bool editable = false, + + virtual wxListWidgetColumn* InsertTextColumn( unsigned pos, const wxString& title, bool editable = false, wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) = 0 ; - virtual wxListWidgetColumn* InsertCheckColumn( unsigned pos , const wxString& title, bool editable = false, + virtual wxListWidgetColumn* InsertCheckColumn( unsigned pos , const wxString& title, bool editable = false, wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) = 0 ; - + // add and remove // TODO will be replaced @@ -514,7 +514,7 @@ public: virtual int ListGetSelection() const = 0; virtual int ListGetSelections( wxArrayInt& aSelections ) const = 0; virtual bool ListIsSelected( unsigned int n ) const = 0; - + // display virtual void ListScrollTo( unsigned int n ) = 0; @@ -618,21 +618,21 @@ public : virtual ~wxNonOwnedWindowImpl() { } - - virtual void Destroy() + + virtual void Destroy() { } virtual void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, long style, long extraStyle, const wxString& name ) = 0; - - + + virtual WXWindow GetWXWindow() const = 0; - + virtual void Raise() { } - + virtual void Lower() { } @@ -641,12 +641,12 @@ public : { return false; } - + virtual bool ShowWithEffect(bool show, wxShowEffect WXUNUSED(effect), unsigned WXUNUSED(timeout)) { return Show(show); } - + virtual void Update() { } @@ -664,18 +664,18 @@ public : virtual void SetExtraStyle( long WXUNUSED(exStyle) ) { } - + virtual bool SetBackgroundStyle(wxBackgroundStyle WXUNUSED(style)) - { + { return false ; } - + bool CanSetTransparent() { return false; } - virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0; + virtual void GetContentArea( int &left , int &top , int &width , int &height ) const = 0; virtual void MoveWindow(int x, int y, int width, int height) = 0; virtual void GetPosition( int &x, int &y ) const = 0; virtual void GetSize( int &width, int &height ) const = 0; @@ -684,31 +684,31 @@ public : { return false; } - + virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) = 0; - + virtual bool IsMaximized() const = 0; - + virtual bool IsIconized() const= 0; - + virtual void Iconize( bool iconize )= 0; - + virtual void Maximize(bool maximize) = 0; - + virtual bool IsFullScreen() const= 0; - + virtual bool ShowFullScreen(bool show, long style)= 0; virtual void RequestUserAttention(int flags) = 0; - - virtual void ScreenToWindow( int *x, int *y ) = 0; - + + virtual void ScreenToWindow( int *x, int *y ) = 0; + virtual void WindowToScreen( int *x, int *y ) = 0; - + wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } - + // static creation methods, must be implemented by all toolkits - + static wxNonOwnedWindowImpl* CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, const wxPoint& pos, const wxSize& size, long style, long extraStyle, const wxString& name ) ; diff --git a/include/wx/osx/dataobj2.h b/include/wx/osx/dataobj2.h index 8caa5b4e6d..9b5d2e2dca 100644 --- a/include/wx/osx/dataobj2.h +++ b/include/wx/osx/dataobj2.h @@ -68,7 +68,7 @@ public: // ---------------------------------- void AddFile( const wxString &filename ); - + virtual size_t GetDataSize() const; virtual bool GetDataHere(void *buf) const; virtual bool SetData(size_t len, const void *buf); diff --git a/include/wx/osx/dataview.h b/include/wx/osx/dataview.h index ac85176733..679e229ba2 100644 --- a/include/wx/osx/dataview.h +++ b/include/wx/osx/dataview.h @@ -32,7 +32,7 @@ public: // constructors / destructor // wxDataViewRenderer(wxString const& varianttype, wxDataViewCellMode mode=wxDATAVIEW_CELL_INERT, int align=wxDVR_DEFAULT_ALIGNMENT); - + virtual ~wxDataViewRenderer(void); // @@ -400,7 +400,7 @@ public: { return this->m_NativeDataPtr; } - + void SetNativeData(wxDataViewColumnNativeData* newNativeDataPtr); // class takes ownership of pointer void SetWidthVariable(int NewWidth) { diff --git a/include/wx/osx/dcmemory.h b/include/wx/osx/dcmemory.h index 382d79b01c..52a501715e 100644 --- a/include/wx/osx/dcmemory.h +++ b/include/wx/osx/dcmemory.h @@ -19,12 +19,12 @@ class WXDLLIMPEXP_CORE wxMemoryDCImpl: public wxPaintDCImpl public: wxMemoryDCImpl( wxMemoryDC *owner ); wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ); - wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); - + wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ); + virtual ~wxMemoryDCImpl(); virtual void DoGetSize( int *width, int *height ) const; - virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const + virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); } virtual void DoSelect(const wxBitmap& bitmap); @@ -32,12 +32,12 @@ public: { return m_selected; } virtual wxBitmap& GetSelectedBitmap() { return m_selected; } - + private: void Init(); wxBitmap m_selected; - + DECLARE_CLASS(wxMemoryDCImpl) wxDECLARE_NO_COPY_CLASS(wxMemoryDCImpl); }; diff --git a/include/wx/osx/dcscreen.h b/include/wx/osx/dcscreen.h index f23c4a6f76..50e8221d86 100644 --- a/include/wx/osx/dcscreen.h +++ b/include/wx/osx/dcscreen.h @@ -24,7 +24,7 @@ public: virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const; private: void* m_overlayWindow; - + private: DECLARE_CLASS(wxScreenDCImpl) wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl); diff --git a/include/wx/osx/dnd.h b/include/wx/osx/dnd.h index b956c42e32..f4762f2b03 100644 --- a/include/wx/osx/dnd.h +++ b/include/wx/osx/dnd.h @@ -55,7 +55,7 @@ class WXDLLIMPEXP_CORE wxDropTarget: public wxDropTargetBase virtual bool OnDrop(wxCoord x, wxCoord y); virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def); virtual bool GetData(); - // NOTE: This is needed by the generic wxDataViewCtrl, not sure how to implement. + // NOTE: This is needed by the generic wxDataViewCtrl, not sure how to implement. virtual wxDataFormat GetMatchingPair(); bool CurrentDragHasSupportedFormat() ; diff --git a/include/wx/osx/font.h b/include/wx/osx/font.h index 79fb78b7c4..6f379089c0 100644 --- a/include/wx/osx/font.h +++ b/include/wx/osx/font.h @@ -60,7 +60,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -72,7 +72,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, @@ -91,7 +91,7 @@ public: bool Create(const wxNativeFontInfo& info); bool CreateSystemFont(wxOSXSystemFont font); - + virtual ~wxFont(); // implement base class pure virtuals diff --git a/include/wx/osx/frame.h b/include/wx/osx/frame.h index be5e40f6ee..666fb3bf52 100644 --- a/include/wx/osx/frame.h +++ b/include/wx/osx/frame.h @@ -23,7 +23,7 @@ class WXDLLIMPEXP_FWD_CORE wxMenuBar; class WXDLLIMPEXP_FWD_CORE wxStatusBar; class WXDLLIMPEXP_FWD_CORE wxMacToolTip ; -class WXDLLIMPEXP_CORE wxFrame: public wxFrameBase +class WXDLLIMPEXP_CORE wxFrame: public wxFrameBase { public: // construction diff --git a/include/wx/osx/glcanvas.h b/include/wx/osx/glcanvas.h index 8dfde849eb..62b5c001be 100644 --- a/include/wx/osx/glcanvas.h +++ b/include/wx/osx/glcanvas.h @@ -40,7 +40,7 @@ public: // Mac-specific WXGLContext GetWXGLContext() const { return m_glContext; } - + private: WXGLContext m_glContext; @@ -139,7 +139,7 @@ public: virtual void MacVisibilityChanged(); void MacUpdateView(); - + GLint GetAglBufferName() const { return m_bufferName; } #endif diff --git a/include/wx/osx/imaglist.h b/include/wx/osx/imaglist.h index 10e96b588d..b56242db12 100644 --- a/include/wx/osx/imaglist.h +++ b/include/wx/osx/imaglist.h @@ -27,10 +27,10 @@ public: virtual ~wxImageList(); bool Create( int width, int height, bool mask = true, int initialCount = 1 ); bool Create(); - + virtual int GetImageCount() const; virtual bool GetSize( int index, int &width, int &height ) const; - + int Add( const wxIcon& bitmap ); int Add( const wxBitmap& bitmap ); int Add( const wxBitmap& bitmap, const wxBitmap& mask ); @@ -42,17 +42,17 @@ public: bool Replace( int index, const wxBitmap &bitmap, const wxBitmap &mask ); bool Remove( int index ); bool RemoveAll(); - + virtual bool Draw(int index, wxDC& dc, int x, int y, int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = false); - + private: wxList m_images; - + int m_width; int m_height; - + DECLARE_DYNAMIC_CLASS(wxImageList) }; diff --git a/include/wx/osx/iphone/chkconf.h b/include/wx/osx/iphone/chkconf.h index aa9d375edb..91892e86bc 100644 --- a/include/wx/osx/iphone/chkconf.h +++ b/include/wx/osx/iphone/chkconf.h @@ -22,7 +22,7 @@ #define wxOSX_USE_CORE_TEXT 0 #define wxOSX_USE_ATSU_TEXT 0 -#define wxHAS_OPENGL_ES +#define wxHAS_OPENGL_ES /* * turning off capabilities that don't work under iphone yet @@ -85,21 +85,21 @@ #define wxUSE_COMBOBOX 0 #endif -#undef wxUSE_SCROLLBAR +#undef wxUSE_SCROLLBAR #define wxUSE_SCROLLBAR 0 -#undef wxUSE_STATUSBAR -#undef wxUSE_NATIVE_STATUSBAR -#undef wxUSE_TEXTCTRL -#undef wxUSE_ABOUTDLG -#undef wxUSE_STATTEXT -#undef wxUSE_STATLINE -#undef wxUSE_COLLPANE -#undef wxUSE_STATBMP -#undef wxUSE_STATBOX +#undef wxUSE_STATUSBAR +#undef wxUSE_NATIVE_STATUSBAR +#undef wxUSE_TEXTCTRL +#undef wxUSE_ABOUTDLG +#undef wxUSE_STATTEXT +#undef wxUSE_STATLINE +#undef wxUSE_COLLPANE +#undef wxUSE_STATBMP +#undef wxUSE_STATBOX #undef wxUSE_CHECKBOX -#undef wxUSE_RADIOBTN -#undef wxUSE_RADIOBOX +#undef wxUSE_RADIOBTN +#undef wxUSE_RADIOBOX #undef wxUSE_TOGGLEBTN @@ -117,45 +117,45 @@ #define wxUSE_RADIOBOX 0 #define wxUSE_TOGGLEBTN 0 -#undef wxUSE_TOOLBAR -#undef wxUSE_HTML +#undef wxUSE_TOOLBAR +#undef wxUSE_HTML #define wxUSE_TOOLBAR 0 #define wxUSE_HTML 0 -#undef wxUSE_RICHTEXT +#undef wxUSE_RICHTEXT #define wxUSE_RICHTEXT 0 -#undef wxUSE_ANIMATIONCTRL -#undef wxUSE_CALENDARCTRL -#undef wxUSE_COMBOCTRL -#undef wxUSE_ODCOMBOBOX -#undef wxUSE_BITMAPCOMBOBOX -#undef wxUSE_BMPBUTTON -#undef wxUSE_CHECKLISTBOX -#undef wxUSE_GAUGE -#undef wxUSE_GRID -#undef wxUSE_LISTBOX -#undef wxUSE_LISTCTRL -#undef wxUSE_NOTEBOOK -#undef wxUSE_SLIDER -#undef wxUSE_SPINBTN -#undef wxUSE_SPINCTRL -#undef wxUSE_TREECTRL -#undef wxUSE_DATEPICKCTRL -#undef wxUSE_DATAVIEWCTRL -#undef wxUSE_EDITABLELISTBOX -#undef wxUSE_FILEPICKERCTRL -#undef wxUSE_DIRPICKERCTRL -#undef wxUSE_FILECTRL -#undef wxUSE_COLOURPICKERCTRL -#undef wxUSE_FONTPICKERCTRL -#undef wxUSE_DEBUGREPORT -#undef wxUSE_HYPERLINKCTRL -#undef wxUSE_STC +#undef wxUSE_ANIMATIONCTRL +#undef wxUSE_CALENDARCTRL +#undef wxUSE_COMBOCTRL +#undef wxUSE_ODCOMBOBOX +#undef wxUSE_BITMAPCOMBOBOX +#undef wxUSE_BMPBUTTON +#undef wxUSE_CHECKLISTBOX +#undef wxUSE_GAUGE +#undef wxUSE_GRID +#undef wxUSE_LISTBOX +#undef wxUSE_LISTCTRL +#undef wxUSE_NOTEBOOK +#undef wxUSE_SLIDER +#undef wxUSE_SPINBTN +#undef wxUSE_SPINCTRL +#undef wxUSE_TREECTRL +#undef wxUSE_DATEPICKCTRL +#undef wxUSE_DATAVIEWCTRL +#undef wxUSE_EDITABLELISTBOX +#undef wxUSE_FILEPICKERCTRL +#undef wxUSE_DIRPICKERCTRL +#undef wxUSE_FILECTRL +#undef wxUSE_COLOURPICKERCTRL +#undef wxUSE_FONTPICKERCTRL +#undef wxUSE_DEBUGREPORT +#undef wxUSE_HYPERLINKCTRL +#undef wxUSE_STC #undef wxUSE_AUI -#undef wxUSE_BUSYINFO -#undef wxUSE_SEARCHCTRL +#undef wxUSE_BUSYINFO +#undef wxUSE_SEARCHCTRL #define wxUSE_ANIMATIONCTRL 0 #define wxUSE_CALENDARCTRL 0 @@ -188,27 +188,27 @@ #define wxUSE_BUSYINFO 0 #define wxUSE_SEARCHCTRL 0 -#undef wxUSE_LOGWINDOW -#undef wxUSE_LOG_DIALOG -#undef wxUSE_LISTBOOK -#undef wxUSE_CHOICEBOOK -#undef wxUSE_TREEBOOK -#undef wxUSE_TOOLBOOK -#undef wxUSE_CHOICEDLG -#undef wxUSE_HELP -#undef wxUSE_PROGRESSDLG -#undef wxUSE_FONTDLG -#undef wxUSE_FILEDLG -#undef wxUSE_CHOICEDLG -#undef wxUSE_NUMBERDLG -#undef wxUSE_TEXTDLG -#undef wxUSE_DIRDLG -#undef wxUSE_STARTUP_TIPS -#undef wxUSE_WIZARDDLG -#undef wxUSE_TOOLBAR_NATIVE -#undef wxUSE_FINDREPLDLG -#undef wxUSE_TASKBARICON -#undef wxUSE_REARRANGECTRL +#undef wxUSE_LOGWINDOW +#undef wxUSE_LOG_DIALOG +#undef wxUSE_LISTBOOK +#undef wxUSE_CHOICEBOOK +#undef wxUSE_TREEBOOK +#undef wxUSE_TOOLBOOK +#undef wxUSE_CHOICEDLG +#undef wxUSE_HELP +#undef wxUSE_PROGRESSDLG +#undef wxUSE_FONTDLG +#undef wxUSE_FILEDLG +#undef wxUSE_CHOICEDLG +#undef wxUSE_NUMBERDLG +#undef wxUSE_TEXTDLG +#undef wxUSE_DIRDLG +#undef wxUSE_STARTUP_TIPS +#undef wxUSE_WIZARDDLG +#undef wxUSE_TOOLBAR_NATIVE +#undef wxUSE_FINDREPLDLG +#undef wxUSE_TASKBARICON +#undef wxUSE_REARRANGECTRL #define wxUSE_LOGWINDOW 0 #define wxUSE_LOG_DIALOG 0 diff --git a/include/wx/osx/iphone/private.h b/include/wx/osx/iphone/private.h index 252b26c10e..b4c25709a5 100644 --- a/include/wx/osx/iphone/private.h +++ b/include/wx/osx/iphone/private.h @@ -32,17 +32,17 @@ WX_UIImage WXDLLIMPEXP_CORE wxOSXCreateUIImageFromCGImage( CGImageRef image ); class WXDLLIMPEXP_CORE wxWidgetIPhoneImpl : public wxWidgetImpl { public : - wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, bool isRootControl = false ) ; - wxWidgetIPhoneImpl() ; - ~wxWidgetIPhoneImpl(); - + wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, bool isRootControl = false ) ; + wxWidgetIPhoneImpl() ; + ~wxWidgetIPhoneImpl(); + void Init(); - + virtual bool IsVisible() const ; virtual void SetVisibility( bool visible ); - + virtual void Raise(); - + virtual void Lower(); virtual void ScrollRect( const wxRect *rect, int dx, int dy ); @@ -67,7 +67,7 @@ public : void RemoveFromParent(); void Embed( wxWidgetImpl *parent ); - + void SetDefaultButton( bool isDefault ); void PerformClick(); virtual void SetLabel(const wxString& title, wxFontEncoding encoding); @@ -82,7 +82,7 @@ public : virtual wxBitmap GetBitmap() const; virtual void SetBitmap( const wxBitmap& bitmap ); virtual void SetBitmapPosition( wxDirection dir ); - + void SetupTabs( const wxNotebook ¬ebook ); void GetBestRect( wxRect *r ) const; bool IsEnabled() const; @@ -98,18 +98,18 @@ public : void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); void InstallEventHandler( WXWidget control = NULL ); - - virtual void DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow); + + virtual void DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* otherWindow); // thunk connected calls - + virtual void drawRect(CGRect* rect, WXWidget slf, void* _cmd); virtual void touchEvent(WX_NSSet touches, WX_UIEvent event, WXWidget slf, void* _cmd); virtual bool becomeFirstResponder(WXWidget slf, void* _cmd); virtual bool resignFirstResponder(WXWidget slf, void* _cmd); // action - + virtual void touchUpInsideAction(void* sender, WX_UIEvent evt, WXWidget slf, void* _cmd); protected: @@ -122,59 +122,59 @@ class wxNonOwnedWindowIPhoneImpl : public wxNonOwnedWindowImpl public : wxNonOwnedWindowIPhoneImpl( wxNonOwnedWindow* nonownedwnd) ; wxNonOwnedWindowIPhoneImpl(); - + virtual ~wxNonOwnedWindowIPhoneImpl(); - + virtual void Destroy() ; void Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, long style, long extraStyle, const wxString& name ) ; - + WXWindow GetWXWindow() const; - void Raise(); + void Raise(); void Lower(); - bool Show(bool show); + bool Show(bool show); bool ShowWithEffect(bool show, wxShowEffect effect, unsigned timeout); - + void Update(); bool SetTransparent(wxByte alpha); bool SetBackgroundColour(const wxColour& col ); - void SetExtraStyle( long exStyle ); - bool SetBackgroundStyle(wxBackgroundStyle style); + void SetExtraStyle( long exStyle ); + bool SetBackgroundStyle(wxBackgroundStyle style); bool CanSetTransparent(); void MoveWindow(int x, int y, int width, int height); void GetPosition( int &x, int &y ) const; void GetSize( int &width, int &height ) const; - void GetContentArea( int &left , int &top , int &width , int &height ) const; + void GetContentArea( int &left , int &top , int &width , int &height ) const; bool SetShape(const wxRegion& region); - + virtual void SetTitle( const wxString& title, wxFontEncoding encoding ) ; - + virtual bool IsMaximized() const; - + virtual bool IsIconized() const; - + virtual void Iconize( bool iconize ); - + virtual void Maximize(bool maximize); - + virtual bool IsFullScreen() const; - + virtual bool ShowFullScreen(bool show, long style); virtual void RequestUserAttention(int flags); - + virtual void ScreenToWindow( int *x, int *y ); - + virtual void WindowToScreen( int *x, int *y ); - + wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } protected : WX_UIWindow m_macWindow; void * m_macFullScreenData ; DECLARE_DYNAMIC_CLASS_NO_COPY(wxNonOwnedWindowIPhoneImpl) -}; +}; #ifdef __OBJC__ @@ -182,14 +182,14 @@ protected : WXDLLIMPEXP_CORE wxRect wxFromNSRect( UIView* parent, const CGRect& rect ); WXDLLIMPEXP_CORE CGPoint wxToNSPoint( UIView* parent, const wxPoint& p ); WXDLLIMPEXP_CORE wxPoint wxFromNSPoint( UIView* parent, const CGPoint& p ); - - CGRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , + + CGRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin = true ); @interface wxUIButton : UIButton { } - + @end void WXDLLIMPEXP_CORE wxOSXIPhoneClassAddWXMethods(Class c); diff --git a/include/wx/osx/listbox.h b/include/wx/osx/listbox.h index bf01a78fec..bb0e176251 100644 --- a/include/wx/osx/listbox.h +++ b/include/wx/osx/listbox.h @@ -90,7 +90,7 @@ public: const wxString& name = wxListBoxNameStr); virtual ~wxListBox(); - + // implement base class pure virtuals virtual void Refresh(bool eraseBack = true, const wxRect *rect = NULL); @@ -102,7 +102,7 @@ public: // data callbacks virtual void GetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value ); virtual void SetValueCallback( unsigned int n, wxListWidgetColumn* col , wxListWidgetCellValue& value ); - + virtual bool IsSelected(int n) const; virtual int GetSelection() const; virtual int GetSelections(wxArrayInt& aSelections) const; @@ -119,7 +119,7 @@ public: GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); wxListWidgetImpl* GetListPeer() const; - + bool MacGetBlockEvents() const { return m_blockEvents; } virtual void HandleLineEvent( unsigned int n, bool doubleClick ); @@ -151,11 +151,11 @@ protected: virtual wxSize DoGetBestSize() const; bool m_blockEvents; - + wxListWidgetColumn* m_textColumn; - + // data storage (copied from univ) - + // the array containing all items (it is sorted if the listbox has // wxLB_SORT style) union @@ -166,7 +166,7 @@ protected: // and this one the client data (either void or wxClientData) wxArrayPtrVoid m_itemsClientData; - + private: DECLARE_DYNAMIC_CLASS(wxListBox) DECLARE_EVENT_TABLE() diff --git a/include/wx/osx/menu.h b/include/wx/osx/menu.h index bac68f21b5..7ddd112170 100644 --- a/include/wx/osx/menu.h +++ b/include/wx/osx/menu.h @@ -58,20 +58,20 @@ public: void HandleMenuClosed(); wxMenuImpl* GetPeer() { return m_peer; } - + // make sure we can veto void SetAllowRearrange( bool allow ); bool AllowRearrange() const { return m_allowRearrange; } - + // if a menu is used purely for internal implementation reasons (eg wxChoice) // we don't want native menu events being triggered void SetNoEventsMode( bool noEvents ); bool GetNoEventsMode() const { return m_noEventsMode; } protected: // hide special menu items like exit, preferences etc - // that are expected in the app menu + // that are expected in the app menu void DoRearrange() ; - + bool DoHandleMenuEvent( wxEvent& evt ); virtual wxMenuItem* DoAppend(wxMenuItem *item); virtual wxMenuItem* DoInsert(size_t pos, wxMenuItem *item); @@ -92,13 +92,13 @@ private: // in this menu rearranging of menu items (esp hiding) is allowed bool m_allowRearrange; - + // 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) @@ -187,7 +187,7 @@ protected: private: static wxMenuBar* s_macInstalledMenuBar ; static wxMenuBar* s_macCommonMenuBar ; - + wxMenu* m_rootMenu; wxMenu* m_appleMenu; diff --git a/include/wx/osx/menuitem.h b/include/wx/osx/menuitem.h index 8e9e82da31..3e7c246bf7 100644 --- a/include/wx/osx/menuitem.h +++ b/include/wx/osx/menuitem.h @@ -75,7 +75,7 @@ private: wxBitmap m_bitmap; // Bitmap for menuitem, if any void* m_menu ; // the appropriate menu , may also be a system menu - + wxMenuItemImpl* m_peer; DECLARE_DYNAMIC_CLASS(wxMenuItem) diff --git a/include/wx/osx/nonownedwnd.h b/include/wx/osx/nonownedwnd.h index 77f328f2af..6df0dbe286 100644 --- a/include/wx/osx/nonownedwnd.h +++ b/include/wx/osx/nonownedwnd.h @@ -2,7 +2,7 @@ // Name: wx/mac/nonownedwnd.h // Purpose: declares wxNonOwnedWindow class // Author: Stefan Csomor -// Modified by: +// Modified by: // Created: 2008-03-24 // RCS-ID: $Id: nonownedwnd.h 46993 2007-06-28 08:46:04Z VS $ // Copyright: (c) 2008 Stefan Csomor @@ -65,7 +65,7 @@ public: virtual bool CanSetTransparent(); virtual bool SetBackgroundStyle(wxBackgroundStyle style); - + virtual void Update(); WXWindow GetWXWindow() const ; @@ -94,16 +94,16 @@ public: virtual void SetExtraStyle(long exStyle) ; virtual bool SetBackgroundColour( const wxColour &colour ); - + wxNonOwnedWindowImpl* GetNonOwnedPeer() const { return m_nowpeer; } - + // osx specific event handling common for all osx-ports - + virtual void HandleActivated( double timestampsec, bool didActivate ); virtual void HandleResized( double timestampsec ); virtual void HandleMoved( double timestampsec ); virtual void HandleResizing( double timestampsec, wxRect* rect ); - + protected: // common part of all ctors void Init(); diff --git a/include/wx/osx/notebook.h b/include/wx/osx/notebook.h index ff60922e2a..3be36587ad 100644 --- a/include/wx/osx/notebook.h +++ b/include/wx/osx/notebook.h @@ -82,7 +82,7 @@ public: // hit test virtual int HitTest(const wxPoint& pt, long *flags = NULL) const; - + // calculate size for wxNotebookSizer wxSize CalcSizeFromPage(const wxSize& sizePage) const; wxRect GetPageRect() const ; @@ -118,7 +118,7 @@ public: // ------------------- virtual void Command(wxCommandEvent& event); // osx specific event handling common for all osx-ports - + virtual bool OSXHandleClicked( double timestampsec ); protected: diff --git a/include/wx/osx/pnghand.h b/include/wx/osx/pnghand.h index de27a024d9..a91fd69c85 100644 --- a/include/wx/osx/pnghand.h +++ b/include/wx/osx/pnghand.h @@ -2,7 +2,7 @@ // Name: pnghand.h // Purpose: PNG bitmap handler // Author: Julian Smart -// Modified by: +// Modified by: // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart diff --git a/include/wx/osx/popupwin.h b/include/wx/osx/popupwin.h index 3bf458ef15..4ecdc4ffbb 100644 --- a/include/wx/osx/popupwin.h +++ b/include/wx/osx/popupwin.h @@ -3,7 +3,7 @@ // Purpose: wxPopupWindow class for wxMac // Author: Stefan Csomor // Modified by: -// Created: +// Created: // RCS-ID: $Id$ // Copyright: (c) 2006 Stefan Csomor // Licence: wxWindows licence diff --git a/include/wx/osx/printdlg.h b/include/wx/osx/printdlg.h index d6ec1ce09b..dc1cf5c72a 100644 --- a/include/wx/osx/printdlg.h +++ b/include/wx/osx/printdlg.h @@ -18,7 +18,7 @@ #include "wx/cmndata.h" #include "wx/printdlg.h" #include "wx/prntbase.h" - + /* * wxMacPrintDialog * The Mac dialog for printing @@ -45,7 +45,7 @@ private: wxDC* m_printerDC; bool m_destroyDC; wxWindow* m_dialogParent; - + private: DECLARE_DYNAMIC_CLASS(wxPrintDialog) }; @@ -62,14 +62,14 @@ public: virtual ~wxMacPageSetupDialog(); virtual wxPageSetupData& GetPageSetupDialogData(); - + bool Create(wxWindow *parent, wxPageSetupData *data = NULL); virtual int ShowModal(); - + private: wxPageSetupData m_pageSetupData; wxWindow* m_dialogParent; - + private: DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageSetupDialog) }; @@ -93,17 +93,17 @@ public: private: wxPageSetupData* m_pageSetupDialogData; - + wxPoint m_MinMarginTopLeft; wxPoint m_MinMarginBottomRight; wxTextCtrl *m_LeftMargin; wxTextCtrl *m_TopMargin; wxTextCtrl *m_RightMargin; wxTextCtrl *m_BottomMargin; - + void GetMinMargins(); bool CheckValue(wxTextCtrl* textCtrl, int *value, int minValue, const wxString& name); - + private: DECLARE_DYNAMIC_CLASS_NO_COPY(wxMacPageMarginsDialog) }; diff --git a/include/wx/osx/printmac.h b/include/wx/osx/printmac.h index 776d6643c1..5d39109a0d 100644 --- a/include/wx/osx/printmac.h +++ b/include/wx/osx/printmac.h @@ -17,7 +17,7 @@ /* * Represents the printer: manages printing a wxPrintout object */ - + class WXDLLIMPEXP_CORE wxMacPrinter: public wxPrinterBase { DECLARE_DYNAMIC_CLASS(wxMacPrinter) @@ -38,7 +38,7 @@ class WXDLLIMPEXP_CORE wxMacPrinter: public wxPrinterBase * wxPrintPreview * Programmer creates an object of this class to preview a wxPrintout. */ - + class WXDLLIMPEXP_CORE wxMacPrintPreview: public wxPrintPreviewBase { DECLARE_CLASS(wxMacPrintPreview) diff --git a/include/wx/osx/radiobut.h b/include/wx/osx/radiobut.h index 6cf506ec36..54e4fa34d6 100644 --- a/include/wx/osx/radiobut.h +++ b/include/wx/osx/radiobut.h @@ -39,18 +39,18 @@ public: virtual void SetValue(bool val); virtual bool GetValue() const ; - // implementation - + // implementation + void Command(wxCommandEvent& event); wxRadioButton *AddInCycle(wxRadioButton *cycle); void RemoveFromCycle(); inline wxRadioButton *NextInCycle() {return m_cycle;} - + // osx specific event handling common for all osx-ports - + virtual bool OSXHandleClicked( double timestampsec ); protected: - + wxRadioButton *m_cycle; }; diff --git a/include/wx/osx/slider.h b/include/wx/osx/slider.h index b70ae451b0..535d61c22e 100644 --- a/include/wx/osx/slider.h +++ b/include/wx/osx/slider.h @@ -76,7 +76,7 @@ public: void Command(wxCommandEvent& event); // osx specific event handling common for all osx-ports - + virtual bool OSXHandleClicked( double timestampsec ); virtual void TriggerScrollEvent( wxEventType scrollEvent ) ; diff --git a/include/wx/osx/sound.h b/include/wx/osx/sound.h index 670b170b9e..d581290fc4 100644 --- a/include/wx/osx/sound.h +++ b/include/wx/osx/sound.h @@ -32,7 +32,7 @@ public: static bool IsPlaying(); void* GetHandle(); -protected: +protected: bool DoPlay(unsigned flags) const; private: diff --git a/include/wx/osx/spinbutt.h b/include/wx/osx/spinbutt.h index 8f5ffdedff..e6668e2efc 100644 --- a/include/wx/osx/spinbutt.h +++ b/include/wx/osx/spinbutt.h @@ -57,11 +57,11 @@ public: virtual void SetValue(int val); // implementation - + virtual void TriggerScrollEvent( wxEventType scrollEvent ) ; // osx specific event handling common for all osx-ports - + virtual bool OSXHandleClicked( double timestampsec ); protected: diff --git a/include/wx/osx/srchctrl.h b/include/wx/osx/srchctrl.h index a883134422..6166be7dda 100644 --- a/include/wx/osx/srchctrl.h +++ b/include/wx/osx/srchctrl.h @@ -69,7 +69,7 @@ protected: void Init(); wxMenu *m_menu; - + wxString m_descriptiveText; private: diff --git a/include/wx/osx/statbox.h b/include/wx/osx/statbox.h index b7b86b08a9..ccd66cab42 100644 --- a/include/wx/osx/statbox.h +++ b/include/wx/osx/statbox.h @@ -44,7 +44,7 @@ class WXDLLIMPEXP_CORE wxStaticBox: public wxControl virtual void ProcessCommand(wxCommandEvent& WXUNUSED(event)) {}; virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; - + virtual bool AcceptsFocus() const { return false; } // protect native font of box diff --git a/include/wx/osx/taskbarosx.h b/include/wx/osx/taskbarosx.h index 0d48721613..8d8f395053 100644 --- a/include/wx/osx/taskbarosx.h +++ b/include/wx/osx/taskbarosx.h @@ -26,8 +26,8 @@ public: #if wxOSX_USE_COCOA , CUSTOM_STATUSITEM #endif -// , STATUSITEM -// , MENUEXTRA +// , STATUSITEM +// , MENUEXTRA , DEFAULT_TYPE = DOCK }; @@ -42,7 +42,7 @@ public: bool PopupMenu(wxMenu *menu); protected: - class wxTaskBarIconImpl* m_impl; + class wxTaskBarIconImpl* m_impl; friend class wxTaskBarIconImpl; }; #endif diff --git a/include/wx/osx/textctrl.h b/include/wx/osx/textctrl.h index 5692278383..76f52edf97 100644 --- a/include/wx/osx/textctrl.h +++ b/include/wx/osx/textctrl.h @@ -185,10 +185,10 @@ protected: unsigned long m_maxLength; virtual void EnableTextChangedEvents(bool enable) - { + { m_triggerUpdateEvents = enable; } - + bool m_triggerUpdateEvents ; private : diff --git a/include/wx/osx/tglbtn.h b/include/wx/osx/tglbtn.h index 1babd554b7..0eee6f3239 100644 --- a/include/wx/osx/tglbtn.h +++ b/include/wx/osx/tglbtn.h @@ -53,7 +53,7 @@ private: int m_marginX, m_marginY; - + protected: virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } virtual wxSize DoGetBestSize() const; diff --git a/include/wx/osx/toplevel.h b/include/wx/osx/toplevel.h index f544bf99de..3cc75c4820 100644 --- a/include/wx/osx/toplevel.h +++ b/include/wx/osx/toplevel.h @@ -44,12 +44,12 @@ public: const wxString& name = wxFrameNameStr); virtual ~wxTopLevelWindowMac(); - + virtual bool Destroy(); virtual wxPoint GetClientAreaOrigin() const; - virtual bool SetShape(const wxRegion& region) + virtual bool SetShape(const wxRegion& region) { return DoSetShape(region); } // Attracts the users attention to this window if the application is @@ -71,7 +71,7 @@ public: virtual void SetTitle( const wxString& title); virtual wxString GetTitle() const; - + protected: // common part of all ctors void Init(); diff --git a/include/wx/osx/window.h b/include/wx/osx/window.h index 49d6e54a49..6614febe9a 100644 --- a/include/wx/osx/window.h +++ b/include/wx/osx/window.h @@ -156,7 +156,7 @@ public: // this should not be overriden in classes above wxWindowMac // because it is called from its destructor via DeleteChildren virtual void RemoveChild( wxWindowBase *child ); - + virtual bool MacDoRedraw( long time ) ; virtual void MacPaintChildrenBorders(); virtual void MacPaintBorders( int left , int top ) ; @@ -235,12 +235,12 @@ public: // the 'true' OS level control for this wxWindow wxOSXWidgetImpl* GetPeer() const { return m_peer ; } - + void * MacGetCGContextRef() { return m_cgContextRef ; } void MacSetCGContextRef(void * cg) { m_cgContextRef = cg ; } // osx specific event handling common for all osx-ports - + virtual bool OSXHandleClicked( double timestampsec ); virtual bool OSXHandleKeyEvent( wxKeyEvent& event ); protected: diff --git a/include/wx/palmos/font.h b/include/wx/palmos/font.h index 716fd9a247..736e7bd812 100644 --- a/include/wx/palmos/font.h +++ b/include/wx/palmos/font.h @@ -47,7 +47,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, diff --git a/include/wx/palmos/listctrl.h b/include/wx/palmos/listctrl.h index 91a6eaf5e4..e1f6df59e6 100644 --- a/include/wx/palmos/listctrl.h +++ b/include/wx/palmos/listctrl.h @@ -377,7 +377,7 @@ protected: virtual wxString OnGetItemText(long item, long column) const; // return the icon for the given item. In report view, OnGetItemImage will - // only be called for the first column. See OnGetItemColumnImage for + // only be called for the first column. See OnGetItemColumnImage for // details. virtual int OnGetItemImage(long item) const; diff --git a/include/wx/palmos/missing.h b/include/wx/palmos/missing.h index 111f2fd19e..0d0105fb2f 100644 --- a/include/wx/palmos/missing.h +++ b/include/wx/palmos/missing.h @@ -3,7 +3,7 @@ * Purpose: the missing declarations for wxPalm * Author: Yunhui Fu * Created: 2007-10-18 - * Modified by: + * Modified by: * RCS-ID: $Id$ * Copyright: (c) 2007 Yunhui Fu * Licence: wxWindows licence @@ -305,13 +305,13 @@ union __dmath unsigned long i[2]; double d; }; - + union __fmath { unsigned long i[1]; float f; }; - + union __ldmath { unsigned long i[4]; @@ -337,9 +337,9 @@ union __ldmath #else /* !gcc >= 3.3 */ - /* No builtins. Use floating-point unions instead. Declare as an array - without bounds so no matter what small data support a port and/or - library has, the reference will be via the general method for accessing + /* No builtins. Use floating-point unions instead. Declare as an array + without bounds so no matter what small data support a port and/or + library has, the reference will be via the general method for accessing globals. */ #ifndef HUGE_VAL @@ -417,9 +417,9 @@ extern int eof(int fd); extern int access(const char *path, int amode); extern off_t lseek(int fildes, off_t offset, int whence); -//TxtCharIsAlNum +//TxtCharIsAlNum //#define isalpha(a) TxtCharIsAlpha(a) -//TxtCharIsCntrl TxtCharIsDelim TxtCharIsDigit TxtCharIsGraph TxtCharIsHardKey TxtCharIsHex TxtCharIsLower TxtCharIsPrint TxtCharIsPunct TxtCharIsSpace TxtCharIsUpper +//TxtCharIsCntrl TxtCharIsDelim TxtCharIsDigit TxtCharIsGraph TxtCharIsHardKey TxtCharIsHex TxtCharIsLower TxtCharIsPrint TxtCharIsPunct TxtCharIsSpace TxtCharIsUpper #include "pfall.h" diff --git a/include/wx/palmos/textctrl.h b/include/wx/palmos/textctrl.h index 4d9fc4c414..be27ddbaa8 100644 --- a/include/wx/palmos/textctrl.h +++ b/include/wx/palmos/textctrl.h @@ -138,7 +138,7 @@ public: // Implementation from now on // -------------------------- - + #if wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT virtual void SetDropTarget(wxDropTarget *dropTarget); #endif // wxUSE_DRAG_AND_DROP && wxUSE_RICHEDIT diff --git a/include/wx/platform.h b/include/wx/platform.h index 6e07657e07..abb2278afb 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -38,7 +38,7 @@ #define __WXOSX_CARBON__ 1 #endif -#if defined(__WXOSX_CARBON__) || defined(__WXOSX_COCOA__) || defined(__WXOSX_IPHONE__) +#if defined(__WXOSX_CARBON__) || defined(__WXOSX_COCOA__) || defined(__WXOSX_IPHONE__) # define __WXOSX__ 1 #endif @@ -49,7 +49,7 @@ # endif /* setup precise defines according to sdk used */ # include -# if defined(__WXOSX_IPHONE__) +# if defined(__WXOSX_IPHONE__) # if !( defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE ) # error "incorrect SDK for an iPhone build" # endif @@ -678,21 +678,21 @@ #endif /* also the 32/64 bit universal builds must be handled accordingly */ #ifdef __DARWIN__ -# ifdef __LP64__ -# undef SIZEOF_VOID_P -# undef SIZEOF_LONG -# undef SIZEOF_SIZE_T -# define SIZEOF_VOID_P 8 -# define SIZEOF_LONG 8 -# define SIZEOF_SIZE_T 8 -# else -# undef SIZEOF_VOID_P -# undef SIZEOF_LONG -# undef SIZEOF_SIZE_T -# define SIZEOF_VOID_P 4 -# define SIZEOF_LONG 4 -# define SIZEOF_SIZE_T 4 -# endif +# ifdef __LP64__ +# undef SIZEOF_VOID_P +# undef SIZEOF_LONG +# undef SIZEOF_SIZE_T +# define SIZEOF_VOID_P 8 +# define SIZEOF_LONG 8 +# define SIZEOF_SIZE_T 8 +# else +# undef SIZEOF_VOID_P +# undef SIZEOF_LONG +# undef SIZEOF_SIZE_T +# define SIZEOF_VOID_P 4 +# define SIZEOF_LONG 4 +# define SIZEOF_SIZE_T 4 +# endif #endif /* check the consistency of the settings in setup.h: note that this must be diff --git a/include/wx/platinfo.h b/include/wx/platinfo.h index cb2de2f3fd..cca996b27f 100644 --- a/include/wx/platinfo.h +++ b/include/wx/platinfo.h @@ -121,15 +121,15 @@ struct wxLinuxDistributionInfo wxString Release; wxString CodeName; wxString Description; - + bool operator==(const wxLinuxDistributionInfo& ldi) const - { + { return Id == ldi.Id && Release == ldi.Release && CodeName == ldi.CodeName && Description == ldi.Description; } - + bool operator!=(const wxLinuxDistributionInfo& ldi) const { return !(*this == ldi); } }; @@ -186,7 +186,7 @@ public: static wxString GetArchName(wxArchitecture arch); static wxString GetEndiannessName(wxEndianness end); - + // getters // ----------------- @@ -251,11 +251,11 @@ public: { return m_osDesc; } wxString GetDesktopEnvironment() const { return m_desktopEnv; } - + static wxString GetOperatingSystemDirectory(); // doesn't make sense to store inside wxPlatformInfo the OS directory, // thus this function is static; note that this function simply calls - // wxGetOSDirectory() and is here just to make it easier for the user to + // wxGetOSDirectory() and is here just to make it easier for the user to // find it that feature (global functions can be difficult to find in the docs) // setters @@ -276,7 +276,7 @@ public: { m_arch = n; } void SetEndianness(wxEndianness n) { m_endian = n; } - + void SetDesktopEnvironment(const wxString& de) { m_desktopEnv = de; } void SetLinuxDistributionInfo(const wxLinuxDistributionInfo& di) @@ -293,9 +293,9 @@ public: !m_osDesc.IsEmpty() && m_tkVersionMajor != -1 && m_tkVersionMinor != -1 && m_port != wxPORT_UNKNOWN && - m_arch != wxARCH_INVALID && + m_arch != wxARCH_INVALID && m_endian != wxENDIAN_INVALID; - + // do not check linux-specific info; it's ok to have them empty } @@ -319,14 +319,14 @@ protected: // Operating system ID. wxOperatingSystemId m_os; - + // Operating system description. wxString m_osDesc; - - + + // linux-specific // ----------------- - + wxString m_desktopEnv; wxLinuxDistributionInfo m_ldi; diff --git a/include/wx/printdlg.h b/include/wx/printdlg.h index 757f822eed..cd21282f13 100644 --- a/include/wx/printdlg.h +++ b/include/wx/printdlg.h @@ -36,11 +36,11 @@ public: const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE); - + virtual wxPrintDialogData& GetPrintDialogData() = 0; virtual wxPrintData& GetPrintData() = 0; virtual wxDC *GetPrintDC() = 0; - + private: DECLARE_ABSTRACT_CLASS(wxPrintDialogBase) wxDECLARE_NO_COPY_CLASS(wxPrintDialogBase); @@ -62,10 +62,10 @@ public: virtual wxPrintDialogData& GetPrintDialogData(); virtual wxPrintData& GetPrintData(); virtual wxDC *GetPrintDC(); - + private: wxPrintDialogBase *m_pimpl; - + private: DECLARE_DYNAMIC_CLASS(wxPrintDialog) wxDECLARE_NO_COPY_CLASS(wxPrintDialog); @@ -110,7 +110,7 @@ public: private: wxPageSetupDialogBase *m_pimpl; - + private: DECLARE_DYNAMIC_CLASS(wxPageSetupDialog) wxDECLARE_NO_COPY_CLASS(wxPageSetupDialog); diff --git a/include/wx/process.h b/include/wx/process.h index 12d1dcce7c..2f1027ae64 100644 --- a/include/wx/process.h +++ b/include/wx/process.h @@ -106,7 +106,7 @@ public: // implementation only - don't use! // -------------------------------- - + // needs to be public since it needs to be used from wxExecute() global func void SetPid(long pid) { m_pid = pid; } diff --git a/include/wx/propgrid/advprops.h b/include/wx/propgrid/advprops.h index e2f3adea9a..45a60693b0 100644 --- a/include/wx/propgrid/advprops.h +++ b/include/wx/propgrid/advprops.h @@ -432,7 +432,7 @@ protected: Supported special attributes: - "DateFormat": Determines displayed date format. - "PickerStyle": Determines window style used with wxDatePickerCtrl. - Default is wxDP_DEFAULT | wxDP_SHOWCENTURY. Using wxDP_ALLOWNONE + Default is wxDP_DEFAULT | wxDP_SHOWCENTURY. Using wxDP_ALLOWNONE enables additional support for unspecified property value. */ class WXDLLIMPEXP_PROPGRID wxDateProperty : public wxPGProperty diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index a6a55f0bc2..bddf659f98 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -731,7 +731,7 @@ private: Helper class for managing choices of wxPropertyGrid properties. Each entry can have label, value, bitmap, text colour, and background colour. - + wxPGChoices uses reference counting, similar to other wxWidgets classes. This means that assignment operator and copy constructor only copy the reference and not the actual data. Use Copy() member function to create a diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index 120c6b308b..b33c55ed36 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -248,7 +248,7 @@ wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES = 0x00400000, /** Hides page selection buttons from toolbar. */ wxPG_EX_HIDE_PAGE_BUTTONS = 0x01000000, - + /** Allows multiple properties to be selected by user (by pressing SHIFT when clicking on a property, or by dragging with left mouse button down). diff --git a/include/wx/sckstrm.h b/include/wx/sckstrm.h index c9c19f284b..5ee90ae3dd 100644 --- a/include/wx/sckstrm.h +++ b/include/wx/sckstrm.h @@ -29,9 +29,9 @@ protected: size_t OnSysWrite(const void *buffer, size_t bufsize); // socket streams are both un-seekable and size-less streams: - wxFileOffset OnSysTell() const + wxFileOffset OnSysTell() const { return wxInvalidOffset; } - wxFileOffset OnSysSeek(wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode)) + wxFileOffset OnSysSeek(wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode)) { return wxInvalidOffset; } wxDECLARE_NO_COPY_CLASS(wxSocketOutputStream); @@ -50,9 +50,9 @@ protected: // socket streams are both un-seekable and size-less streams: - wxFileOffset OnSysTell() const + wxFileOffset OnSysTell() const { return wxInvalidOffset; } - wxFileOffset OnSysSeek(wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode)) + wxFileOffset OnSysSeek(wxFileOffset WXUNUSED(pos), wxSeekMode WXUNUSED(mode)) { return wxInvalidOffset; } wxDECLARE_NO_COPY_CLASS(wxSocketInputStream); diff --git a/include/wx/setup_gccxml.h b/include/wx/setup_gccxml.h index c356c8cb1c..baa6cbd96f 100644 --- a/include/wx/setup_gccxml.h +++ b/include/wx/setup_gccxml.h @@ -10,13 +10,13 @@ /* This file is included by wx/platform.h when gccxml is detected. - - Here we fix some of the things declared in the real setup.h which gccxml doesn't + + Here we fix some of the things declared in the real setup.h which gccxml doesn't like. */ -// gccxml 0.9.0 doesn't like the fcntl2.h which is part of GNU C library +// gccxml 0.9.0 doesn't like the fcntl2.h which is part of GNU C library // (at least it doesn't on x86_64 systems!) #define _FCNTL_H int open (const char *__path, int __oflag, ...); diff --git a/include/wx/srchctrl.h b/include/wx/srchctrl.h index 948aa2c0ce..9b08f60a14 100644 --- a/include/wx/srchctrl.h +++ b/include/wx/srchctrl.h @@ -17,7 +17,7 @@ #include "wx/textctrl.h" -#if !defined(__WXUNIVERSAL__) && defined(__WXMAC__) +#if !defined(__WXUNIVERSAL__) && defined(__WXMAC__) // search control was introduced in Mac OS X 10.3 Panther #define wxUSE_NATIVE_SEARCH_CONTROL 1 diff --git a/include/wx/string.h b/include/wx/string.h index 9ed73f5b82..9ab7f3f10a 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -2273,7 +2273,7 @@ public: // convert to a double bool ToCDouble(double *val) const; #endif - + #ifndef wxNEEDS_WXSTRING_PRINTF_MIXIN // formatted input/output // as sprintf(), returns the number of characters written or < 0 on error diff --git a/include/wx/toplevel.h b/include/wx/toplevel.h index 8d6b5eef26..a5fb510039 100644 --- a/include/wx/toplevel.h +++ b/include/wx/toplevel.h @@ -170,7 +170,7 @@ public: virtual wxString GetTitle() const = 0; // enable/disable close button [x] - virtual bool EnableCloseButton(bool WXUNUSED(enable) ) { return false; } + virtual bool EnableCloseButton(bool WXUNUSED(enable) ) { return false; } // Set the shape of the window to the given region. // Returns true if the platform supports this feature (and the diff --git a/include/wx/univ/choice.h b/include/wx/univ/choice.h index 27d3fbd022..b598e8874f 100644 --- a/include/wx/univ/choice.h +++ b/include/wx/univ/choice.h @@ -15,7 +15,7 @@ #include "wx/combobox.h" // VS: This is only a *temporary* implementation, real wxChoice should not -// derive from wxComboBox and may have different l&f +// derive from wxComboBox and may have different l&f class WXDLLIMPEXP_CORE wxChoice : public wxComboBox { public: @@ -52,10 +52,10 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxChoiceNameStr); - + private: void OnComboBox(wxCommandEvent &event); - + DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxChoice) }; diff --git a/include/wx/univ/textctrl.h b/include/wx/univ/textctrl.h index 087dbe59af..6646ad91c7 100644 --- a/include/wx/univ/textctrl.h +++ b/include/wx/univ/textctrl.h @@ -83,7 +83,7 @@ public: long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxTextCtrlNameStr) - : wxScrollHelper(this) + : wxScrollHelper(this) { Init(); diff --git a/include/wx/unix/mimetype.h b/include/wx/unix/mimetype.h index 76a27cc59b..fdff54437c 100644 --- a/include/wx/unix/mimetype.h +++ b/include/wx/unix/mimetype.h @@ -79,7 +79,7 @@ protected: wxString GetCommand(const wxString &verb, size_t nIndex) const; - // Read XDG *.desktop file + // Read XDG *.desktop file void LoadXDGApp(const wxString& filename); // Scan XDG directory void LoadXDGAppsFilesFromDir(const wxString& dirname); diff --git a/include/wx/vms_x_fix.h b/include/wx/vms_x_fix.h index 9b8998448d..8d34abd7e6 100644 --- a/include/wx/vms_x_fix.h +++ b/include/wx/vms_x_fix.h @@ -689,7 +689,7 @@ #define XtCallCallbackList XTCALLCALLBACKLIST #define XtCallCallbacks XTCALLCALLBACKS #define XtCallConverter XTCALLCONVERTER -#define XtCalloc XTCALLOC +#define XtCalloc XTCALLOC #ifndef NOXTDISPLAY #define XtClass XTCLASS #endif @@ -798,7 +798,7 @@ #define XtSetTypeConverter XTSETTYPECONVERTER #define XtSetValues XTSETVALUES #define XtShellStrings XTSHELLSTRINGS -#define XtStringConversionWarning XTSTRINGCONVERSIONWARNING +#define XtStringConversionWarning XTSTRINGCONVERSIONWARNING #define XtStrings XTSTRINGS #define XtToolkitInitialize XTTOOLKITINITIALIZE #define XtTranslateCoords XTTRANSLATECOORDS @@ -837,11 +837,11 @@ #define _XEatData _XEATDATA #define _XFlush _XFLUSH #define _XFreeTemp _XFREETEMP -#define _XGetAsyncReply _XGETASYNCREPLY +#define _XGetAsyncReply _XGETASYNCREPLY #define _XInitImageFuncPtrs _XINITIMAGEFUNCPTRS #define _XRead _XREAD #define _XReadPad _XREADPAD -#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE +#define _XRegisterFilterByType _XREGISTERFILTERBYTYPE #define _XReply _XREPLY #define _XSend _XSEND #define _XUnregisterFilter _XUNREGISTERFILTER @@ -1193,7 +1193,7 @@ #define xmToggleButtonGadgetClass XMTOGGLEBUTTONGADGETCLASS #define xmToggleButtonWidgetClass XMTOGGLEBUTTONWIDGETCLASS -#if (__VMS_VER < 80200000) +#if (__VMS_VER < 80200000) # define SetReqLen(req,n,badlen) \ if ((req->length + n) > (unsigned)65535) { \ n = badlen; \ diff --git a/include/wx/vscroll.h b/include/wx/vscroll.h index d2ebbdc508..bfb1b252af 100644 --- a/include/wx/vscroll.h +++ b/include/wx/vscroll.h @@ -840,7 +840,7 @@ public: long style = 0, const wxString& name = wxPanelNameStr) : wxPanel(), - wxVarHVScrollHelper(this) + wxVarHVScrollHelper(this) { (void)Create(parent, id, pos, size, style, name); } diff --git a/include/wx/wx_cwcocoa_cm.h b/include/wx/wx_cwcocoa_cm.h index 0386d299dd..df94434a3e 100644 --- a/include/wx/wx_cwcocoa_cm.h +++ b/include/wx/wx_cwcocoa_cm.h @@ -77,7 +77,7 @@ */ #elif defined( __WXCOCOA__) //tommy #if defined(__OBJC__) - #include "CocoaHeaders.m" + #include "CocoaHeaders.m" #endif //defined(__OBJC__) #endif diff --git a/include/wx/wxcrtbase.h b/include/wx/wxcrtbase.h index 5f665b878e..d8a5248003 100644 --- a/include/wx/wxcrtbase.h +++ b/include/wx/wxcrtbase.h @@ -26,7 +26,7 @@ NB: don't include any wxWidgets headers here because almost all of them include this one! - + NB2: User code should include wx/crt.h instead of including this header directly. diff --git a/include/wx/wxprec.h b/include/wx/wxprec.h index 7feefa2bd3..a00b4a7b1e 100644 --- a/include/wx/wxprec.h +++ b/include/wx/wxprec.h @@ -20,7 +20,7 @@ defined(__MWERKS__) || \ defined(__WATCOMC__) || \ defined(__BORLANDC__) - + // If user did not request NOCPH and we're not building using configure // then assume user wants precompiled headers. diff --git a/include/wx/x11/bitmap.h b/include/wx/x11/bitmap.h index e60874f815..2a272f92c2 100644 --- a/include/wx/x11/bitmap.h +++ b/include/wx/x11/bitmap.h @@ -68,7 +68,7 @@ public: wxBitmap() {} wxBitmap( int width, int height, int depth = -1 ) { Create( width, height, depth ); } wxBitmap( const wxSize& sz, int depth = -1 ) { Create( sz, depth ); } - + wxBitmap( const char bits[], int width, int height, int depth = 1 ); wxBitmap( const char* const* bits ); #ifdef wxNEEDS_CHARPP diff --git a/include/wx/x11/dataform.h b/include/wx/x11/dataform.h index 56a956093f..3c3152c732 100644 --- a/include/wx/x11/dataform.h +++ b/include/wx/x11/dataform.h @@ -17,15 +17,15 @@ class WXDLLIMPEXP_CORE wxDataFormat public: // the clipboard formats under Xt are Atoms typedef Atom NativeFormat; - + wxDataFormat(); wxDataFormat( wxDataFormatId type ); wxDataFormat( const wxString &id ); wxDataFormat( NativeFormat format ); - + wxDataFormat& operator=(NativeFormat format) { SetId(format); return *this; } - + // comparison (must have both versions) bool operator==(NativeFormat format) const { return m_format == (NativeFormat)format; } @@ -35,27 +35,27 @@ public: { return m_type == (wxDataFormatId)format; } bool operator!=(wxDataFormatId format) const { return m_type != (wxDataFormatId)format; } - + // explicit and implicit conversions to NativeFormat which is one of // standard data types (implicit conversion is useful for preserving the // compatibility with old code) NativeFormat GetFormatId() const { return m_format; } operator NativeFormat() const { return m_format; } - + void SetId( NativeFormat format ); - + // string ids are used for custom types - this SetId() must be used for // application-specific formats wxString GetId() const; void SetId( const wxString& id ); - + // implementation wxDataFormatId GetType() const; - + private: wxDataFormatId m_type; NativeFormat m_format; - + void PrepareFormats(); void SetType( wxDataFormatId type ); }; diff --git a/include/wx/x11/dataobj.h b/include/wx/x11/dataobj.h index 6ec1bcad39..068cedbbf0 100644 --- a/include/wx/x11/dataobj.h +++ b/include/wx/x11/dataobj.h @@ -18,7 +18,7 @@ class WXDLLIMPEXP_CORE wxDataObject : public wxDataObjectBase { public: wxDataObject(); - + #ifdef __DARWIN__ virtual ~wxDataObject() { } #endif diff --git a/include/wx/x11/dcclient.h b/include/wx/x11/dcclient.h index e3a52fe81c..951c030b12 100644 --- a/include/wx/x11/dcclient.h +++ b/include/wx/x11/dcclient.h @@ -32,7 +32,7 @@ class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxX11DCImpl public: wxWindowDCImpl( wxDC *owner ); wxWindowDCImpl( wxDC *owner, wxWindow *win ); - + virtual ~wxWindowDCImpl(); virtual bool CanDrawBitmap() const { return true; } @@ -40,7 +40,7 @@ public: protected: virtual void DoGetSize(int *width, int *height) const; - virtual bool DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, + virtual bool DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, wxFloodFillStyle style = wxFLOOD_SURFACE ); virtual bool DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const; @@ -70,7 +70,7 @@ protected: virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, wxCoord xsrc, wxCoord ysrc, - wxRasterOperationMode rop = wxCOPY, bool useMask = false, + wxRasterOperationMode rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1); virtual void DoSetClippingRegion(wxCoord x, wxCoord y, diff --git a/include/wx/x11/dcmemory.h b/include/wx/x11/dcmemory.h index 687fea8ffa..30ed3ab846 100644 --- a/include/wx/x11/dcmemory.h +++ b/include/wx/x11/dcmemory.h @@ -26,7 +26,7 @@ public: virtual const wxBitmap& GetSelectedBitmap() const; virtual wxBitmap& GetSelectedBitmap(); - + // implementation wxBitmap m_selected; diff --git a/include/wx/x11/dnd.h b/include/wx/x11/dnd.h index db9bb5b992..69ab60ddeb 100644 --- a/include/wx/x11/dnd.h +++ b/include/wx/x11/dnd.h @@ -39,19 +39,19 @@ class WXDLLIMPEXP_FWD_CORE wxDropSource; class WXDLLIMPEXP_CORE wxDropTarget: public wxObject { public: - + wxDropTarget(); virtual ~wxDropTarget(); - + virtual void OnEnter() { } virtual void OnLeave() { } virtual bool OnDrop( long x, long y, const void *data, size_t size ) = 0; - - // Override these to indicate what kind of data you support: - + + // Override these to indicate what kind of data you support: + virtual size_t GetFormatCount() const = 0; virtual wxDataFormat GetFormat(size_t n) const = 0; - + // implementation }; @@ -62,13 +62,13 @@ public: class WXDLLIMPEXP_CORE wxTextDropTarget: public wxDropTarget { public: - + wxTextDropTarget() {}; virtual bool OnDrop( long x, long y, const void *data, size_t size ); virtual bool OnDropText( long x, long y, const char *psz ); - + protected: - + virtual size_t GetFormatCount() const; virtual wxDataFormat GetFormat(size_t n) const; }; @@ -80,26 +80,26 @@ protected: class WXDLLIMPEXP_CORE wxPrivateDropTarget: public wxDropTarget { public: - + wxPrivateDropTarget(); - + // you have to override OnDrop to get at the data - + // the string ID identifies the format of clipboard or DnD data. a word // processor would e.g. add a wxTextDataObject and a wxPrivateDataObject // to the clipboard - the latter with the Id "WXWORD_FORMAT". - + void SetId( const wxString& id ) { m_id = id; } - + wxString GetId() { return m_id; } - + private: - + virtual size_t GetFormatCount() const; virtual wxDataFormat GetFormat(size_t n) const; - + wxString m_id; }; @@ -110,15 +110,15 @@ private: class WXDLLIMPEXP_CORE wxFileDropTarget: public wxDropTarget { public: - + wxFileDropTarget() {}; - + virtual bool OnDrop( long x, long y, const void *data, size_t size ); - virtual bool OnDropFiles( long x, long y, + virtual bool OnDropFiles( long x, long y, size_t nFiles, const char * const aszFiles[] ); - + protected: - + virtual size_t GetFormatCount() const; virtual wxDataFormat GetFormat(size_t n) const; }; @@ -139,26 +139,26 @@ enum wxDragResult class WXDLLIMPEXP_CORE wxDropSource: public wxObject { public: - + wxDropSource( wxWindow *win ); wxDropSource( wxDataObject &data, wxWindow *win ); - + virtual ~wxDropSource(void); - + void SetData( wxDataObject &data ); wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly); - + virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; }; - + // implementation #if 0 void RegisterWindow(void); void UnregisterWindow(void); - + wxWindow *m_window; wxDragResult m_retValue; wxDataObject *m_data; - + wxCursor m_defaultCursor; wxCursor m_goaheadCursor; #endif @@ -168,6 +168,6 @@ public: // wxUSE_DRAG_AND_DROP -#endif +#endif //_WX_DND_H_ diff --git a/include/wx/x11/font.h b/include/wx/x11/font.h index bfe33ee3e0..ac9710472d 100644 --- a/include/wx/x11/font.h +++ b/include/wx/x11/font.h @@ -44,7 +44,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -56,7 +56,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, diff --git a/include/wx/x11/nanox/X11/Xlib.h b/include/wx/x11/nanox/X11/Xlib.h index d0c299ff78..0e3aed4d23 100644 --- a/include/wx/x11/nanox/X11/Xlib.h +++ b/include/wx/x11/nanox/X11/Xlib.h @@ -44,7 +44,7 @@ typedef struct { #define CWStackMode (1<<6) /* Values */ - + typedef struct { int x, y; int width, height; diff --git a/include/wx/x11/popupwin.h b/include/wx/x11/popupwin.h index 1524e80c5d..69feea7844 100644 --- a/include/wx/x11/popupwin.h +++ b/include/wx/x11/popupwin.h @@ -27,7 +27,7 @@ public: wxPopupWindow(wxWindow *parent, int flags = wxBORDER_NONE) { (void)Create(parent, flags); } - + bool Create(wxWindow *parent, int flags = wxBORDER_NONE); virtual bool Show( bool show = TRUE ); @@ -37,7 +37,7 @@ protected: virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags = wxSIZE_AUTO); - + private: DECLARE_EVENT_TABLE() DECLARE_DYNAMIC_CLASS(wxPopupWindow) diff --git a/include/wx/x11/privx.h b/include/wx/x11/privx.h index 36f5ac2ce7..4767a9431d 100644 --- a/include/wx/x11/privx.h +++ b/include/wx/x11/privx.h @@ -167,7 +167,7 @@ public: int m_visualRedPrec; int m_visualGreenPrec; int m_visualBluePrec; - + unsigned char *m_colorCube; }; diff --git a/include/wx/x11/reparent.h b/include/wx/x11/reparent.h index b32d43f71c..e1121be4eb 100644 --- a/include/wx/x11/reparent.h +++ b/include/wx/x11/reparent.h @@ -39,7 +39,7 @@ protected: bool ProcessXEvent(WXEvent* event); WXWindow FindAClientWindow(WXWindow window, const wxString& name); - + static bool sm_done; static wxAdoptedWindow* sm_toReparent; static wxWindow* sm_newParent; diff --git a/include/wx/xlocale.h b/include/wx/xlocale.h index bf8f8daf07..936e3fc39e 100644 --- a/include/wx/xlocale.h +++ b/include/wx/xlocale.h @@ -18,7 +18,7 @@ using decimal point &c. TODO: Currently only the character classification and transformation - functions and number <-> string functions, are implemented, + functions and number <-> string functions, are implemented, we also need at least - formatted IO: scanf_l(), printf_l() &c - time: strftime_l(), strptime_l() @@ -246,7 +246,7 @@ extern WXDLLIMPEXP_DATA_BASE(wxXLocale) wxNullXLocale; { return wxCRT_Strtoul_lA(c, endptr, base, loc.Get()); } #if wxUSE_UNICODE - + // ctype functions #define wxCRT_Isalnum_lW wxXLOCALE_IDENT(iswalnum_l) #define wxCRT_Isalpha_lW wxXLOCALE_IDENT(iswalpha_l) @@ -329,7 +329,7 @@ extern WXDLLIMPEXP_DATA_BASE(wxXLocale) wxNullXLocale; unsigned long WXDLLIMPEXP_BASE wxStrtoul_l(const char* str, char **endptr, int base, const wxXLocale& loc); #endif // wxHAS_XLOCALE_SUPPORT/!wxHAS_XLOCALE_SUPPORT - + #endif // wxUSE_XLOCALE #endif // _WX_XLOCALE_H_ diff --git a/include/wx/xpmdecod.h b/include/wx/xpmdecod.h index 1bd8f1c7f1..db2f2ef15b 100644 --- a/include/wx/xpmdecod.h +++ b/include/wx/xpmdecod.h @@ -32,17 +32,17 @@ public: // Is the stream XPM file? // NOTE: this function modifies the current stream position bool CanRead(wxInputStream& stream); - + // Read XPM file from the stream, parse it and create image from it wxImage ReadFile(wxInputStream& stream); #endif // Read directly from XPM data (as passed to wxBitmap ctor): wxImage ReadData(const char* const* xpm_data); - + #ifdef __BORLANDC__ // needed for Borland 5.5 - wxImage ReadData(char** xpm_data) + wxImage ReadData(char** xpm_data) { return ReadData(const_cast(xpm_data)); } #endif }; diff --git a/include/wx/xrc/xh_spin.h b/include/wx/xrc/xh_spin.h index 1182a33f03..a6cf9fc27f 100644 --- a/include/wx/xrc/xh_spin.h +++ b/include/wx/xrc/xh_spin.h @@ -13,7 +13,7 @@ #include "wx/xrc/xmlres.h" -#if wxUSE_XRC +#if wxUSE_XRC #if wxUSE_SPINBTN diff --git a/include/wx/xti.h b/include/wx/xti.h index c5b650f2b6..45e474fa7c 100644 --- a/include/wx/xti.h +++ b/include/wx/xti.h @@ -2027,7 +2027,7 @@ private : (int) sizeof(name), \ (wxObjectConstructorFn) wxConstructorFor##name , \ name::GetPropertiesStatic(),name::GetHandlersStatic(),name::ms_constructor , name::ms_constructorProperties , \ - name::ms_constructorPropertiesCount , wxVariantOfPtrToObjectConverter##name , NULL , wxObjectToVariantConverter##name , callback); + name::ms_constructorPropertiesCount , wxVariantOfPtrToObjectConverter##name , NULL , wxObjectToVariantConverter##name , callback); #define IMPLEMENT_DYNAMIC_CLASS2( name , basename , basename2) \ _IMPLEMENT_DYNAMIC_CLASS2( name , basename , basename2 , "", NULL) \ diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index f9cb18352d..0d8462de1d 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -3446,7 +3446,7 @@ void wxAuiNotebook::SetSelectionToWindow(wxWindow *win) // to the child tab in the SetSelection call below // (the child focus event will also let wxAuiManager, if any, // know that the notebook control has been activated) - + wxWindow* parent = GetParent(); if (parent) { diff --git a/src/aui/dockart.cpp b/src/aui/dockart.cpp index 55b5e89258..52f2d41833 100644 --- a/src/aui/dockart.cpp +++ b/src/aui/dockart.cpp @@ -261,15 +261,15 @@ wxAuiDefaultDockArt::wxAuiDefaultDockArt() #else static unsigned char close_bits[]={ // reduced height, symmetric - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xf3, 0x9f, 0xf9, - 0x3f, 0xfc, 0x7f, 0xfe, 0x3f, 0xfc, 0x9f, 0xf9, 0xcf, 0xf3, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xcf, 0xf3, 0x9f, 0xf9, + 0x3f, 0xfc, 0x7f, 0xfe, 0x3f, 0xfc, 0x9f, 0xf9, 0xcf, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; /* // same height as maximize/restore - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xe7, 0xcf, 0xf3, 0x9f, 0xf9, - 0x3f, 0xfc, 0x7f, 0xfe, 0x3f, 0xfc, 0x9f, 0xf9, 0xcf, 0xf3, 0xe7, 0xe7, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xe7, 0xcf, 0xf3, 0x9f, 0xf9, + 0x3f, 0xfc, 0x7f, 0xfe, 0x3f, 0xfc, 0x9f, 0xf9, 0xcf, 0xf3, 0xe7, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; - */ + */ #endif static unsigned char maximize_bits[] = { diff --git a/src/aui/framemanager.cpp b/src/aui/framemanager.cpp index 583f82847e..940ecfdad4 100644 --- a/src/aui/framemanager.cpp +++ b/src/aui/framemanager.cpp @@ -568,7 +568,7 @@ class wxAuiProportionalBoxSizer : public wxBoxSizer { public: wxAuiProportionalBoxSizer(int orientation) : wxBoxSizer(orientation) { } - + void RecalcSizes() { if (m_children.GetCount() == 0) @@ -578,18 +578,18 @@ public: int fixed_width = 0; int stretchable = 0; wxSizerItemList::compatibility_iterator node; - + // find fixed width and height, as well // as the total stretchable proportions node = m_children.GetFirst(); while (node) { wxSizerItem *item = node->GetData(); - + if (item->IsShown()) { stretchable += item->GetProportion(); - + wxSize size(item->GetMinSizeWithBorder()); if (item->GetProportion() == 0) { @@ -605,7 +605,7 @@ public: } } } - + node = node->GetNext(); } @@ -676,7 +676,7 @@ public: child_pos.y += (m_size.y - size.y) / 2; item->SetDimension(child_pos, child_size); - + pt.x += width; } } @@ -4181,7 +4181,7 @@ bool wxAuiManager::DoEndResizeAction(wxMouseEvent& event) int used_width = 0, used_height = 0; wxSize client_size = m_frame->GetClientSize(); - + size_t dock_i, dock_count = m_docks.GetCount(); for (dock_i = 0; dock_i < dock_count; ++dock_i) { @@ -4199,12 +4199,12 @@ bool wxAuiManager::DoEndResizeAction(wxMouseEvent& event) if (dock.resizable) used_width += sash_size; } - - + + int available_width = client_size.GetWidth() - used_width; int available_height = client_size.GetHeight() - used_height; - - + + #if wxUSE_STATUSBAR // if there's a status control, the available // height decreases accordingly @@ -4219,13 +4219,13 @@ bool wxAuiManager::DoEndResizeAction(wxMouseEvent& event) } } #endif - + wxRect& rect = m_action_part->dock->rect; wxPoint new_pos(event.m_x - m_action_offset.x, event.m_y - m_action_offset.y); int new_size, old_size = m_action_part->dock->size; - + switch (m_action_part->dock->dock_direction) { case wxAUI_DOCK_LEFT: @@ -4358,7 +4358,7 @@ bool wxAuiManager::DoEndResizeAction(wxMouseEvent& event) m_action = actionNone; return false; } - + // calculate the new proportion of the pane int new_proportion = (new_pixsize*total_proportion)/dock_pixels; @@ -4421,7 +4421,7 @@ bool wxAuiManager::DoEndResizeAction(wxMouseEvent& event) prop_borrow -= prop_diff; } - + dock.panes.Item(borrow_pane)->dock_proportion = prop_borrow; pane.dock_proportion = new_proportion; @@ -4568,7 +4568,7 @@ void wxAuiManager::OnMotion(wxMouseEvent& event) DrawResizeHint(dc, m_action_hintrect); m_action_hintrect = wxRect(); } - + // draw new resize hint, if it's inside the managed frame wxRect frame_screen_rect = m_frame->GetScreenRect(); if (frame_screen_rect.Contains(rect)) diff --git a/src/cocoa/data.cpp b/src/cocoa/data.cpp index c2dac0b6eb..6880f7295c 100644 --- a/src/cocoa/data.cpp +++ b/src/cocoa/data.cpp @@ -6,6 +6,6 @@ // Created: ??/??/98 // RCS-ID: $Id$ // Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/src/common/artstd.cpp b/src/common/artstd.cpp index c4e34e7912..7cd6a7df43 100644 --- a/src/common/artstd.cpp +++ b/src/common/artstd.cpp @@ -209,7 +209,7 @@ wxBitmap wxDefaultArtProvider::CreateBitmap(const wxArtID& id, if ((bmp_h < bestSize.x) && (bmp_w < bestSize.y)) { - // the caller wants default size, which is larger than + // the caller wants default size, which is larger than // the image we have; to avoid degrading it visually by // scaling it up, paste it into transparent image instead: wxPoint offset((bestSize.x - bmp_w)/2, (bestSize.y - bmp_h)/2); diff --git a/src/common/cairo.cpp b/src/common/cairo.cpp index 474a05899b..fbee7a236c 100644 --- a/src/common/cairo.cpp +++ b/src/common/cairo.cpp @@ -35,7 +35,7 @@ wxCairoLibrary *wxCairoLibrary::ms_lib = NULL; wxCairoLibrary::wxCairoLibrary() { wxLogNull log; - + m_libCairo.Load("libcairo.so.2"); m_ok = m_libCairo.IsLoaded(); if ( !m_ok ) @@ -67,7 +67,7 @@ wxCairoLibrary::~wxCairoLibrary() ms_lib = NULL; } } - + return ms_lib; } diff --git a/src/common/config.cpp b/src/common/config.cpp index c3a5e8b8ce..488aa3b118 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -393,7 +393,7 @@ wxString wxExpandEnvVars(const wxString& str) while ( m < str.length() && (wxIsalnum(str[m]) || str[m] == wxT('_')) ) m++; - + wxString strVarName(str.c_str() + n + 1, m - n - 1); #ifdef __WXWINCE__ diff --git a/src/common/ctrlsub.cpp b/src/common/ctrlsub.cpp index d668d66503..d0a197da1f 100644 --- a/src/common/ctrlsub.cpp +++ b/src/common/ctrlsub.cpp @@ -123,7 +123,7 @@ void wxItemContainer::Delete(unsigned int pos) } // ---------------------------------------------------------------------------- -// +// // ---------------------------------------------------------------------------- int wxItemContainer::DoInsertItemsInLoop(const wxArrayStringsAdapter& items, diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 63244de2fe..66982abf7a 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -706,7 +706,7 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la m_editorCtrl = CreateEditorCtrl( dv_ctrl->GetMainWindow(), labelRect, value ); - // there might be no editor control for the given item + // there might be no editor control for the given item if(!m_editorCtrl) return false; diff --git a/src/common/dcgraph.cpp b/src/common/dcgraph.cpp index df722ea5d9..8de2da6817 100644 --- a/src/common/dcgraph.cpp +++ b/src/common/dcgraph.cpp @@ -72,7 +72,7 @@ static bool TranslateRasterOp(wxRasterOperationMode function, wxCompositionMode case wxXOR: // src XOR dst *op = wxCOMPOSITION_XOR; break; - + case wxAND: // src AND dst case wxAND_INVERT: // (NOT src) AND dst case wxAND_REVERSE:// src AND (NOT dst) @@ -451,7 +451,7 @@ void wxGCDCImpl::SetFont( const wxFont &font ) f.SetPointSize( /*LogicalToDeviceYRel*/(font.GetPointSize())); m_graphicContext->SetFont( f, m_textForegroundColour ); #if defined(__WXGTK__) || defined(__WXOSX__) - if ( m_font.IsOk() && m_font.GetNoAntiAliasing() ) + if ( m_font.IsOk() && m_font.GetNoAntiAliasing() ) { m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE); } @@ -499,12 +499,12 @@ void wxGCDCImpl::SetLogicalFunction( wxRasterOperationMode function ) return; m_logicalFunction = function; - + wxCompositionMode mode; m_logicalFunctionSupported = TranslateRasterOp( function, &mode); if (m_logicalFunctionSupported) m_logicalFunctionSupported = m_graphicContext->SetCompositionMode(mode); - + if (mode == wxCOMPOSITION_XOR) m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE); else @@ -512,7 +512,7 @@ void wxGCDCImpl::SetLogicalFunction( wxRasterOperationMode function ) } bool wxGCDCImpl::DoFloodFill(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y), - const wxColour& WXUNUSED(col), + const wxColour& WXUNUSED(col), wxFloodFillStyle WXUNUSED(style)) { return false; @@ -851,7 +851,7 @@ bool wxGCDCImpl::CanDrawBitmap() const bool wxGCDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, - wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxDC *source, wxCoord xsrc, wxCoord ysrc, wxRasterOperationMode logical_func , bool useMask, wxCoord xsrcMask, wxCoord ysrcMask ) { @@ -871,7 +871,7 @@ bool wxGCDCImpl::DoStretchBlit( if ( logical_func == wxNO_OP ) return true; - + wxCompositionMode mode; if ( !TranslateRasterOp(logical_func, &mode) ) { @@ -880,7 +880,7 @@ bool wxGCDCImpl::DoStretchBlit( } bool retval = true; - + wxCompositionMode formerMode = m_graphicContext->GetCompositionMode(); if (m_graphicContext->SetCompositionMode(mode)) { @@ -889,7 +889,7 @@ bool wxGCDCImpl::DoStretchBlit( { m_graphicContext->SetAntialiasMode(wxANTIALIAS_NONE); } - + if (xsrcMask == -1 && ysrcMask == -1) { xsrcMask = xsrc; @@ -926,7 +926,7 @@ bool wxGCDCImpl::DoStretchBlit( wxFAIL_MSG( wxT("Cannot Blit. Unable to get contents of DC as bitmap.") ); retval = false; } - + if (mode == wxCOMPOSITION_XOR) { m_graphicContext->SetAntialiasMode(formerAa); diff --git a/src/common/dlgcmn.cpp b/src/common/dlgcmn.cpp index d152896a54..8cae975656 100644 --- a/src/common/dlgcmn.cpp +++ b/src/common/dlgcmn.cpp @@ -465,7 +465,7 @@ void wxDialogBase::OnButton(wxCommandEvent& event) } // ---------------------------------------------------------------------------- -// compatibility methods for supporting the modality API +// compatibility methods for supporting the modality API // ---------------------------------------------------------------------------- wxDEFINE_EVENT( wxEVT_WINDOW_MODAL_DIALOG_CLOSED , wxWindowModalDialogEvent ); @@ -483,7 +483,7 @@ void wxDialogBase::SendWindowModalDialogEvent ( wxEventType type ) { wxCommandEvent event ( type, GetId()); event.SetEventObject(this); - + if ( !GetEventHandler()->ProcessEvent(event) ) { // the event is not propagated upwards to the parent automatically @@ -491,7 +491,7 @@ void wxDialogBase::SendWindowModalDialogEvent ( wxEventType type ) // in 9 cases of 10 the message must be processed by the dialog // owner and not the dialog itself (void)GetParent()->GetEventHandler()->ProcessEvent(event); - } + } } diff --git a/src/common/ffile.cpp b/src/common/ffile.cpp index c9210559aa..0ca910ed08 100644 --- a/src/common/ffile.cpp +++ b/src/common/ffile.cpp @@ -121,7 +121,7 @@ bool wxFFile::ReadAll(wxString *str, const wxMBConv& conv) // realLen = fileLen - numOfLinesInTheFile) length = fread(buf.data(), sizeof(char), length, m_fp); - if ( Error() ) + if ( Error() ) { wxLogSysError(_("Read error on file '%s'"), m_name.c_str()); diff --git a/src/common/fileback.cpp b/src/common/fileback.cpp index 6e4253c0f7..5544ee7b54 100644 --- a/src/common/fileback.cpp +++ b/src/common/fileback.cpp @@ -293,7 +293,7 @@ wxFileOffset wxBackedInputStream::FindLength() const return len; } - + size_t wxBackedInputStream::OnSysRead(void *buffer, size_t size) { if (!IsOk()) diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 2ae9c2dfd3..1e3740864e 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -120,15 +120,15 @@ wxString wxFileSystemHandler::GetMimeTypeFromExt(const wxString& location) wxTheMimeTypesManager->AddFallbacks(fallbacks); s_MinimalMimeEnsured = true; } - + wxFileType *ft = wxTheMimeTypesManager->GetFileTypeFromExtension(ext); if ( !ft || !ft -> GetMimeType(&mime) ) { mime = wxEmptyString; } - + delete ft; - + return mime; } else diff --git a/src/common/fmapbase.cpp b/src/common/fmapbase.cpp index 34cbea0d21..c7acc6c850 100644 --- a/src/common/fmapbase.cpp +++ b/src/common/fmapbase.cpp @@ -101,7 +101,7 @@ static wxFontEncoding gs_encodings[] = wxFONTENCODING_GB2312, wxFONTENCODING_ISO2022_JP, - wxFONTENCODING_MACROMAN, + wxFONTENCODING_MACROMAN, wxFONTENCODING_MACJAPANESE, wxFONTENCODING_MACCHINESETRAD, wxFONTENCODING_MACKOREAN, @@ -306,7 +306,7 @@ static const wxChar* gs_encodingNames[WXSIZEOF(gs_encodingDescs)][9] = { wxT( "GB2312" ), NULL }, { wxT( "ISO-2022-JP" ), NULL }, - + { wxT( "MacRoman" ), NULL }, { wxT( "MacJapanese" ), NULL }, { wxT( "MacChineseTrad" ), NULL }, diff --git a/src/common/fontcmn.cpp b/src/common/fontcmn.cpp index 4010d6b7bc..0725335a58 100644 --- a/src/common/fontcmn.cpp +++ b/src/common/fontcmn.cpp @@ -214,7 +214,7 @@ void wxFontBase::SetPixelSize( const wxSize& pixelSize ) // NOTE: this algorithm for adjusting the font size is used by all // implementations of wxFont except under wxMSW and wxGTK where // native support to font creation using pixel-size is provided. - + int largestGood = 0; int smallestBad = 0; @@ -804,7 +804,7 @@ bool wxNativeFontInfo::FromUserString(const wxString& s) token.Trim(true).Trim(false).MakeLower(); if (insideQuotes) { - if (token.StartsWith("'") || + if (token.StartsWith("'") || token.EndsWith("'")) { insideQuotes = false; @@ -910,7 +910,7 @@ bool wxNativeFontInfo::FromUserString(const wxString& s) family = wxFONTFAMILY_TELETYPE; else return false; - + SetFamily(family); } // NB: the check on the facename is implemented in wxFontBase::SetFaceName diff --git a/src/common/fontenumcmn.cpp b/src/common/fontenumcmn.cpp index b555500710..bc2b96ce9d 100644 --- a/src/common/fontenumcmn.cpp +++ b/src/common/fontenumcmn.cpp @@ -84,9 +84,9 @@ bool wxFontEnumerator::IsValidFacename(const wxString &facename) #ifdef __WXMSW__ // Quoting the MSDN: - // "MS Shell Dlg is a mapping mechanism that enables - // U.S. English Microsoft Windows NT, and Microsoft Windows 2000 to - // support locales that have characters that are not contained in code + // "MS Shell Dlg is a mapping mechanism that enables + // U.S. English Microsoft Windows NT, and Microsoft Windows 2000 to + // support locales that have characters that are not contained in code // page 1252. It is not a font but a face name for a nonexistent font." // Thus we need to consider "Ms Shell Dlg" and "Ms Shell Dlg 2" as valid // font face names even if they are not enumerated by wxFontEnumerator diff --git a/src/common/fs_inet.cpp b/src/common/fs_inet.cpp index 2ed1f2e865..9339de6720 100644 --- a/src/common/fs_inet.cpp +++ b/src/common/fs_inet.cpp @@ -152,7 +152,7 @@ class wxFileSystemInternetModule : public wxModule return true; } - virtual void OnExit() + virtual void OnExit() { delete wxFileSystem::RemoveHandler(m_handler); } diff --git a/src/common/gbsizer.cpp b/src/common/gbsizer.cpp index 7369b1b145..66c27e8299 100644 --- a/src/common/gbsizer.cpp +++ b/src/common/gbsizer.cpp @@ -583,7 +583,7 @@ void wxGridBagSizer::RecalcSizes() void wxGridBagSizer::AdjustForOverflow() { int row, col; - + for (row=0; row<(int)m_rowHeights.GetCount(); row++) { int rowExtra=INT_MAX; @@ -597,7 +597,7 @@ void wxGridBagSizer::AdjustForOverflow() int endrow, endcol; item->GetEndPos(endrow, endcol); - + // If the item starts in this position and doesn't span rows, then // just look at the whole item height if ( item->GetPos() == pos && endrow == row ) @@ -617,7 +617,7 @@ void wxGridBagSizer::AdjustForOverflow() if ( itemHeight < 0 ) itemHeight = 0; - + // and check how much is left rowExtra = wxMin(rowExtra, rowHeight - itemHeight); } @@ -640,7 +640,7 @@ void wxGridBagSizer::AdjustForOverflow() int endrow, endcol; item->GetEndPos(endrow, endcol); - + if ( item->GetPos() == pos && endcol == col ) { int itemWidth = item->CalcMin().GetWidth(); @@ -656,7 +656,7 @@ void wxGridBagSizer::AdjustForOverflow() if ( itemWidth < 0 ) itemWidth = 0; - + colExtra = wxMin(colExtra, colWidth - itemWidth); } } @@ -664,7 +664,7 @@ void wxGridBagSizer::AdjustForOverflow() m_colWidths[col] -= colExtra; } - + } //--------------------------------------------------------------------------- diff --git a/src/common/glcmn.cpp b/src/common/glcmn.cpp index e7dc25865c..675f512a4d 100644 --- a/src/common/glcmn.cpp +++ b/src/common/glcmn.cpp @@ -62,7 +62,7 @@ bool wxGLCanvasBase::SetCurrent(const wxGLContext& context) const return context.SetCurrent(*static_cast(this)); } -#ifndef wxHAS_OPENGL_ES +#ifndef wxHAS_OPENGL_ES bool wxGLCanvasBase::SetColour(const wxString& colour) { wxColour col = wxTheColourDatabase->Find(colour); diff --git a/src/common/graphcmn.cpp b/src/common/graphcmn.cpp index aa286cc58a..4c2f0879c6 100644 --- a/src/common/graphcmn.cpp +++ b/src/common/graphcmn.cpp @@ -501,7 +501,7 @@ void wxGraphicsPathData::AddArcToPoint( wxDouble x1, wxDouble y1 , wxDouble x2, IMPLEMENT_ABSTRACT_CLASS(wxGraphicsContext, wxObject) -wxGraphicsContext::wxGraphicsContext(wxGraphicsRenderer* renderer) : +wxGraphicsContext::wxGraphicsContext(wxGraphicsRenderer* renderer) : wxGraphicsObject(renderer), m_antialias(wxANTIALIAS_DEFAULT), m_composition(wxCOMPOSITION_OVER) diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index c50ddff713..3e7a128d10 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -1320,7 +1320,7 @@ bool wxICOHandler::DoLoadFile(wxImage *image, wxInputStream& stream, stream.Read(&IconDir, sizeof(IconDir)); wxUint16 nIcons = wxUINT16_SWAP_ON_BE(IconDir.idCount); - + // nType is 1 for Icons, 2 for Cursors: wxUint16 nType = wxUINT16_SWAP_ON_BE(IconDir.idType); @@ -1333,11 +1333,11 @@ bool wxICOHandler::DoLoadFile(wxImage *image, wxInputStream& stream, // remember how many bytes we read from the stream: wxFileOffset alreadySeeked = sizeof(IconDir); - + for (unsigned int i = 0; i < nIcons; i++ ) { alreadySeeked += stream.Read(pCurrentEntry, sizeof(ICONDIRENTRY)).LastRead(); - + // bHeight and bColorCount are wxUint8 if ( pCurrentEntry->bWidth >= wMax ) { @@ -1351,7 +1351,7 @@ bool wxICOHandler::DoLoadFile(wxImage *image, wxInputStream& stream, colmax = pCurrentEntry->bColorCount; } } - + pCurrentEntry++; } @@ -1371,13 +1371,13 @@ bool wxICOHandler::DoLoadFile(wxImage *image, wxInputStream& stream, { // seek to selected icon: pCurrentEntry = pIconDirEntry + iSel; - + // NOTE: seeking a positive amount in wxFromCurrent mode allows us to // load even non-seekable streams (see wxInputStream::SeekI docs)! wxFileOffset offset = wxUINT32_SWAP_ON_BE(pCurrentEntry->dwImageOffset) - alreadySeeked; if (offset != 0 && stream.SeekI(offset, wxFromCurrent) == wxInvalidOffset) return false; - + bResult = LoadDib(image, stream, true, IsBmp); bool bIsCursorType = (this->GetType() == wxBITMAP_TYPE_CUR) || (this->GetType() == wxBITMAP_TYPE_ANI); if ( bResult && bIsCursorType && nType == 2 ) @@ -1387,9 +1387,9 @@ bool wxICOHandler::DoLoadFile(wxImage *image, wxInputStream& stream, image->SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, wxUINT16_SWAP_ON_BE(pCurrentEntry->wBitCount)); } } - + delete [] pIconDirEntry; - + return bResult; } @@ -1400,7 +1400,7 @@ int wxICOHandler::DoGetImageCount(wxInputStream& stream) if (stream.Read(&IconDir, sizeof(IconDir)).LastRead() != sizeof(IconDir)) // it's ok to modify the stream position here return 0; - + return (int)wxUINT16_SWAP_ON_BE(IconDir.idCount); } diff --git a/src/common/image.cpp b/src/common/image.cpp index 5ae109c97a..70fe52e707 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -2698,7 +2698,7 @@ bool wxImageHandler::CallDoCanRead(wxInputStream& stream) { // NOTE: this code is the same of wxAnimationDecoder::CanRead and // wxImageHandler::GetImageCount - + if ( !stream.IsSeekable() ) return false; // can't test unseekable stream diff --git a/src/common/imaggif.cpp b/src/common/imaggif.cpp index 7c7ef7c8e3..fdb9a4971d 100644 --- a/src/common/imaggif.cpp +++ b/src/common/imaggif.cpp @@ -109,7 +109,7 @@ int wxGIFHandler::DoGetImageCount( wxInputStream& stream ) wxGIFErrorCode error = decod.LoadGIF(stream); if ( (error != wxGIF_OK) && (error != wxGIF_TRUNCATED) ) return -1; - + // NOTE: this function modifies the current stream position but it's ok // (see wxImageHandler::GetImageCount) diff --git a/src/common/imagiff.cpp b/src/common/imagiff.cpp index 3dd0f7f392..428219853c 100644 --- a/src/common/imagiff.cpp +++ b/src/common/imagiff.cpp @@ -98,10 +98,10 @@ public: // constructor, destructor, etc. wxIFFDecoder(wxInputStream *s); ~wxIFFDecoder() { Destroy(); } - + // NOTE: this function modifies the current stream position bool CanRead(); - + int ReadIFF(); bool ConvertToImage(wxImage *image) const; }; diff --git a/src/common/imagjpeg.cpp b/src/common/imagjpeg.cpp index 3dbadbe1cf..1f3ed86da6 100644 --- a/src/common/imagjpeg.cpp +++ b/src/common/imagjpeg.cpp @@ -28,7 +28,7 @@ // A hack based on one from tif_jpeg.c to overcome the problem on Windows // of rpcndr.h defining boolean with a different type to the jpeg headers. -// +// // This hack is only necessary for an external jpeg library, the builtin one // usually used on Windows doesn't use the type boolean, so always works. // diff --git a/src/common/imagtiff.cpp b/src/common/imagtiff.cpp index 68bfd86c0f..0e90db2a5f 100644 --- a/src/common/imagtiff.cpp +++ b/src/common/imagtiff.cpp @@ -448,7 +448,7 @@ int wxTIFFHandler::DoGetImageCount( wxInputStream& stream ) } while (TIFFReadDirectory(tif)); TIFFClose( tif ); - + // NOTE: this function modifies the current stream position but it's ok // (see wxImageHandler::GetImageCount) diff --git a/src/common/intl.cpp b/src/common/intl.cpp index e031315b21..ff680307af 100644 --- a/src/common/intl.cpp +++ b/src/common/intl.cpp @@ -2614,8 +2614,8 @@ static wxString TranslateFromUnicodeFormat(const wxString& fmt) char chLast = '\0'; size_t lastCount = 0; - - const char* formatchars = + + const char* formatchars = "dghHmMsSy" #ifdef __WXMSW__ "t" @@ -2811,7 +2811,7 @@ static wxString TranslateFromUnicodeFormat(const wxString& fmt) // strftime() doesn't have era string, // ignore this format wxASSERT_MSG( lastCount <= 2, "too many 'g's" ); - + break; #ifndef __WXMSW__ case 'a': diff --git a/src/common/log.cpp b/src/common/log.cpp index da627fec24..6731ccb9d2 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -109,7 +109,7 @@ WX_DEFINE_LOG_CS(BackgroundLog); // this one is used for protecting ms_aTraceMasks from concurrent access WX_DEFINE_LOG_CS(TraceMask); -// and this one is used for GetComponentLevels() +// and this one is used for GetComponentLevels() WX_DEFINE_LOG_CS(Levels); } // anonymous namespace diff --git a/src/common/persist.cpp b/src/common/persist.cpp index 64b5957c7c..7f8898f327 100644 --- a/src/common/persist.cpp +++ b/src/common/persist.cpp @@ -152,6 +152,6 @@ wxPERSIST_DEFINE_SAVE_RESTORE_FOR(int) wxPERSIST_DEFINE_SAVE_RESTORE_FOR(long) wxPERSIST_DEFINE_SAVE_RESTORE_FOR(wxString) -#undef wxPERSIST_DEFINE_SAVE_RESTORE_FOR +#undef wxPERSIST_DEFINE_SAVE_RESTORE_FOR #endif // wxUSE_CONFIG diff --git a/src/common/pickerbase.cpp b/src/common/pickerbase.cpp index ec7d0a2cee..1d3dbbc30d 100644 --- a/src/common/pickerbase.cpp +++ b/src/common/pickerbase.cpp @@ -66,13 +66,13 @@ bool wxPickerBase::CreateBase(wxWindow *parent, // remove any border style from our style as wxPickerBase's window must be // invisible (user styles must be set on the textctrl or the platform-dependent picker) style &= ~wxBORDER_MASK; - + if (!wxControl::Create(parent, id, pos, size, style | wxNO_BORDER | wxTAB_TRAVERSAL, validator, name)) return false; - + SetMinSize( size ); - + m_sizer = new wxBoxSizer(wxHORIZONTAL); if (HasFlag(wxPB_USE_TEXTCTRL)) @@ -113,7 +113,7 @@ bool wxPickerBase::CreateBase(wxWindow *parent, // the text control's proportion values defaults to 2 m_sizer->Add(m_text, 2, GetDefaultTextCtrlFlag(), 5); } - + return true; } @@ -124,7 +124,7 @@ void wxPickerBase::PostCreation() m_sizer->Add(m_picker, HasTextCtrl() ? 0 : 1, GetDefaultPickerCtrlFlag(), 5); SetSizer(m_sizer); - + SetInitialSize( GetMinSize() ); } diff --git a/src/common/platinfo.cpp b/src/common/platinfo.cpp index a1baeb1017..aab51c2298 100644 --- a/src/common/platinfo.cpp +++ b/src/common/platinfo.cpp @@ -192,7 +192,7 @@ void wxPlatformInfo::InitForCurrentPlatform() m_osDesc = wxGetOsDescription(); m_endian = wxIsPlatformLittleEndian() ? wxENDIAN_LITTLE : wxENDIAN_BIG; m_arch = wxIsPlatform64Bit() ? wxARCH_64 : wxARCH_32; - + #ifdef __LINUX__ m_ldi = wxGetLinuxDistributionInfo(); #endif diff --git a/src/common/prntbase.cpp b/src/common/prntbase.cpp index 8ab0c0d002..05d4d729a1 100644 --- a/src/common/prntbase.cpp +++ b/src/common/prntbase.cpp @@ -587,7 +587,7 @@ void wxPrintout::FitThisSizeToPaper(const wxSize& imageSize) float scaleX = ((float(paperRect.width) * w) / (float(pw) * imageSize.x)); float scaleY = ((float(paperRect.height) * h) / (float(ph) * imageSize.y)); float actualScale = wxMin(scaleX, scaleY); - m_printoutDC->SetUserScale(actualScale, actualScale); + m_printoutDC->SetUserScale(actualScale, actualScale); m_printoutDC->SetDeviceOrigin(0, 0); wxRect logicalPaperRect = GetLogicalPaperRect(); SetLogicalOrigin(logicalPaperRect.x, logicalPaperRect.y); @@ -604,7 +604,7 @@ void wxPrintout::FitThisSizeToPage(const wxSize& imageSize) float scaleX = float(w) / imageSize.x; float scaleY = float(h) / imageSize.y; float actualScale = wxMin(scaleX, scaleY); - m_printoutDC->SetUserScale(actualScale, actualScale); + m_printoutDC->SetUserScale(actualScale, actualScale); m_printoutDC->SetDeviceOrigin(0, 0); } @@ -632,7 +632,7 @@ void wxPrintout::FitThisSizeToPageMargins(const wxSize& imageSize, const wxPageS float scaleX = (float(pageMarginsRect.width) * w) / (float(pw) * imageSize.x); float scaleY = (float(pageMarginsRect.height) * h) / (float(ph) * imageSize.y); float actualScale = wxMin(scaleX, scaleY); - m_printoutDC->SetUserScale(actualScale, actualScale); + m_printoutDC->SetUserScale(actualScale, actualScale); m_printoutDC->SetDeviceOrigin(0, 0); wxRect logicalPageMarginsRect = GetLogicalPageMarginsRect(pageSetupData); SetLogicalOrigin(logicalPageMarginsRect.x, logicalPageMarginsRect.y); @@ -655,16 +655,16 @@ void wxPrintout::MapScreenSizeToPage() // Set the DC scale and origin so that an image on the screen is the same // size on the paper and the origin is at the top left of the printable area. if (!m_printoutDC) return; - int ppiScreenX, ppiScreenY; - GetPPIScreen(&ppiScreenX, &ppiScreenY); - int ppiPrinterX, ppiPrinterY; - GetPPIPrinter(&ppiPrinterX, &ppiPrinterY); - int w, h; - m_printoutDC->GetSize(&w, &h); - int pageSizePixelsX, pageSizePixelsY; - GetPageSizePixels(&pageSizePixelsX, &pageSizePixelsY); - float userScaleX = (float(ppiPrinterX) * w) / (float(ppiScreenX) * pageSizePixelsX); - float userScaleY = (float(ppiPrinterY) * h) / (float(ppiScreenY) * pageSizePixelsY); + int ppiScreenX, ppiScreenY; + GetPPIScreen(&ppiScreenX, &ppiScreenY); + int ppiPrinterX, ppiPrinterY; + GetPPIPrinter(&ppiPrinterX, &ppiPrinterY); + int w, h; + m_printoutDC->GetSize(&w, &h); + int pageSizePixelsX, pageSizePixelsY; + GetPageSizePixels(&pageSizePixelsX, &pageSizePixelsY); + float userScaleX = (float(ppiPrinterX) * w) / (float(ppiScreenX) * pageSizePixelsX); + float userScaleY = (float(ppiPrinterY) * h) / (float(ppiScreenY) * pageSizePixelsY); m_printoutDC->SetUserScale(userScaleX, userScaleY); m_printoutDC->SetDeviceOrigin(0, 0); } @@ -685,12 +685,12 @@ void wxPrintout::MapScreenSizeToDevice() // Set the DC scale so that a screen pixel is the same size as a device // pixel and the origin is at the top left of the printable area. if (!m_printoutDC) return; - int w, h; - m_printoutDC->GetSize(&w, &h); - int pageSizePixelsX, pageSizePixelsY; - GetPageSizePixels(&pageSizePixelsX, &pageSizePixelsY); - float userScaleX = float(w) / pageSizePixelsX; - float userScaleY = float(h) / pageSizePixelsY; + int w, h; + m_printoutDC->GetSize(&w, &h); + int pageSizePixelsX, pageSizePixelsY; + GetPageSizePixels(&pageSizePixelsX, &pageSizePixelsY); + float userScaleX = float(w) / pageSizePixelsX; + float userScaleY = float(h) / pageSizePixelsY; m_printoutDC->SetUserScale(userScaleX, userScaleY); m_printoutDC->SetDeviceOrigin(0, 0); } @@ -706,17 +706,17 @@ wxRect wxPrintout::GetLogicalPaperRect() const m_printoutDC->GetSize(&w, &h); if (w == pw && h == ph) { // this DC matches the printed page, so no scaling - return wxRect(m_printoutDC->DeviceToLogicalX(paperRect.x), - m_printoutDC->DeviceToLogicalY(paperRect.y), - m_printoutDC->DeviceToLogicalXRel(paperRect.width), + return wxRect(m_printoutDC->DeviceToLogicalX(paperRect.x), + m_printoutDC->DeviceToLogicalY(paperRect.y), + m_printoutDC->DeviceToLogicalXRel(paperRect.width), m_printoutDC->DeviceToLogicalYRel(paperRect.height)); } // This DC doesn't match the printed page, so we have to scale. float scaleX = float(w) / pw; float scaleY = float(h) / ph; - return wxRect(m_printoutDC->DeviceToLogicalX(wxRound(paperRect.x * scaleX)), - m_printoutDC->DeviceToLogicalY(wxRound(paperRect.y * scaleY)), - m_printoutDC->DeviceToLogicalXRel(wxRound(paperRect.width * scaleX)), + return wxRect(m_printoutDC->DeviceToLogicalX(wxRound(paperRect.x * scaleX)), + m_printoutDC->DeviceToLogicalY(wxRound(paperRect.y * scaleY)), + m_printoutDC->DeviceToLogicalXRel(wxRound(paperRect.width * scaleX)), m_printoutDC->DeviceToLogicalYRel(wxRound(paperRect.height * scaleY))); } @@ -726,9 +726,9 @@ wxRect wxPrintout::GetLogicalPageRect() const // area. int w, h; m_printoutDC->GetSize(&w, &h); - return wxRect(m_printoutDC->DeviceToLogicalX(0), - m_printoutDC->DeviceToLogicalY(0), - m_printoutDC->DeviceToLogicalXRel(w), + return wxRect(m_printoutDC->DeviceToLogicalX(0), + m_printoutDC->DeviceToLogicalY(0), + m_printoutDC->DeviceToLogicalXRel(w), m_printoutDC->DeviceToLogicalYRel(h)); } @@ -737,7 +737,7 @@ wxRect wxPrintout::GetLogicalPageMarginsRect(const wxPageSetupDialogData& pageSe // Return the rectangle in logical units that corresponds to the region // within the page margins as specified by the given wxPageSetupDialogData // object. - + // We get the paper size in device units and the margins in mm, // so we need to calculate the conversion with this trick wxCoord pw, ph; @@ -747,38 +747,38 @@ wxRect wxPrintout::GetLogicalPageMarginsRect(const wxPageSetupDialogData& pageSe float mmToDeviceX = float(pw) / mw; float mmToDeviceY = float(ph) / mh; - // paper size in device units + // paper size in device units wxRect paperRect = GetPaperRectPixels(); - + // margins in mm wxPoint topLeft = pageSetupData.GetMarginTopLeft(); wxPoint bottomRight = pageSetupData.GetMarginBottomRight(); - + // calculate margins in device units wxRect pageMarginsRect( paperRect.x + wxRound(mmToDeviceX * topLeft.x), paperRect.y + wxRound(mmToDeviceY * topLeft.y), paperRect.width - wxRound(mmToDeviceX * (topLeft.x + bottomRight.x)), paperRect.height - wxRound(mmToDeviceY * (topLeft.y + bottomRight.y))); - + wxCoord w, h; m_printoutDC->GetSize(&w, &h); - if (w == pw && h == ph) + if (w == pw && h == ph) { // this DC matches the printed page, so no scaling return wxRect( - m_printoutDC->DeviceToLogicalX(pageMarginsRect.x), - m_printoutDC->DeviceToLogicalY(pageMarginsRect.y), - m_printoutDC->DeviceToLogicalXRel(pageMarginsRect.width), + m_printoutDC->DeviceToLogicalX(pageMarginsRect.x), + m_printoutDC->DeviceToLogicalY(pageMarginsRect.y), + m_printoutDC->DeviceToLogicalXRel(pageMarginsRect.width), m_printoutDC->DeviceToLogicalYRel(pageMarginsRect.height)); } - + // This DC doesn't match the printed page, so we have to scale. float scaleX = float(w) / pw; float scaleY = float(h) / ph; - return wxRect(m_printoutDC->DeviceToLogicalX(wxRound(pageMarginsRect.x * scaleX)), - m_printoutDC->DeviceToLogicalY(wxRound(pageMarginsRect.y * scaleY)), - m_printoutDC->DeviceToLogicalXRel(wxRound(pageMarginsRect.width * scaleX)), + return wxRect(m_printoutDC->DeviceToLogicalX(wxRound(pageMarginsRect.x * scaleX)), + m_printoutDC->DeviceToLogicalY(wxRound(pageMarginsRect.y * scaleY)), + m_printoutDC->DeviceToLogicalXRel(wxRound(pageMarginsRect.width * scaleX)), m_printoutDC->DeviceToLogicalYRel(wxRound(pageMarginsRect.height * scaleY))); } @@ -786,19 +786,19 @@ void wxPrintout::SetLogicalOrigin(wxCoord x, wxCoord y) { // Set the device origin by specifying a point in logical coordinates. m_printoutDC->SetDeviceOrigin( - m_printoutDC->LogicalToDeviceX(x), + m_printoutDC->LogicalToDeviceX(x), m_printoutDC->LogicalToDeviceY(y) ); } - + void wxPrintout::OffsetLogicalOrigin(wxCoord xoff, wxCoord yoff) { // Offset the device origin by a specified distance in device coordinates. wxPoint dev_org = m_printoutDC->GetDeviceOrigin(); m_printoutDC->SetDeviceOrigin( - dev_org.x + m_printoutDC->LogicalToDeviceXRel(xoff), + dev_org.x + m_printoutDC->LogicalToDeviceXRel(xoff), dev_org.y + m_printoutDC->LogicalToDeviceYRel(yoff) ); } - + //---------------------------------------------------------------------------- // wxPreviewCanvas @@ -1512,7 +1512,7 @@ bool wxPrintPreviewBase::PaintPage(wxPreviewCanvas *canvas, wxDC& dc) wxMemoryDC temp_dc; temp_dc.SelectObject(*m_previewBitmap); - dc.Blit(pageRect.x, pageRect.y, + dc.Blit(pageRect.x, pageRect.y, m_previewBitmap->GetWidth(), m_previewBitmap->GetHeight(), &temp_dc, 0, 0); temp_dc.SelectObject(wxNullBitmap); @@ -1643,7 +1643,7 @@ bool wxPrintPreviewBase::DrawBlankPage(wxPreviewCanvas *canvas, wxDC& dc) // Draw blank page allowing for 1-pixel border AROUND the actual paper dc.SetPen(*wxBLACK_PEN); dc.SetBrush(*wxWHITE_BRUSH); - dc.DrawRectangle(paperRect.x - 2, paperRect.y - 1, + dc.DrawRectangle(paperRect.x - 2, paperRect.y - 1, paperRect.width + 3, paperRect.height + 2); return true; diff --git a/src/common/process.cpp b/src/common/process.cpp index ec9686c965..db5eb5efad 100644 --- a/src/common/process.cpp +++ b/src/common/process.cpp @@ -104,7 +104,7 @@ void wxProcess::Detach() { // we just detach from the next handler of the chain (i.e. our "parent" -- see ctor) // not also from the previous handler like wxEvtHandler::Unlink() would do: - + if (m_nextHandler) m_nextHandler->SetPreviousHandler(m_previousHandler); diff --git a/src/common/regex.cpp b/src/common/regex.cpp index f97d0727bc..f81154d510 100644 --- a/src/common/regex.cpp +++ b/src/common/regex.cpp @@ -520,7 +520,7 @@ int wxRegExImpl::Replace(wxString *text, textstr + matchStart, #else textstr.data() + matchStart, -#endif +#endif countRepl ? wxRE_NOTBOL : 0 WXREGEX_IF_NEED_LEN(textlen - matchStart)) ) { @@ -566,13 +566,14 @@ int wxRegExImpl::Replace(wxString *text, } else { + textNew += wxString( #ifndef WXREGEX_CONVERT_TO_MB - textNew += wxString(textstr + matchStart + start, + textstr #else - textNew += wxString(textstr.data() + matchStart + - start, + textstr.data() #endif - *wxConvCurrent, len); + + matchStart + start, + *wxConvCurrent, len); mayHaveBackrefs = true; } @@ -601,8 +602,7 @@ int wxRegExImpl::Replace(wxString *text, #ifndef WXREGEX_CONVERT_TO_MB result.append(*text, matchStart, start); #else - result.append(wxString(textstr.data() + matchStart, *wxConvCurrent, - start)); + result.append(wxString(textstr.data() + matchStart, *wxConvCurrent, start)); #endif matchStart += start; result.append(textNew); diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index 3d94c8bce8..31ca5342f5 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -2198,12 +2198,12 @@ void wxStaticBoxSizer::RecalcSizes() #if defined( __WXGTK20__ ) // if the wxStaticBox has created a wxPizza to contain its children // (see wxStaticBox::AddChild) then we need to place the items it contains - // in the wxBoxSizer::RecalcSizes() call below using coordinates relative + // in the wxBoxSizer::RecalcSizes() call below using coordinates relative // to the top-left corner of the staticbox: m_position.x = m_position.y = 0; #else // if the wxStaticBox has childrens, then these windows must be placed - // by the wxBoxSizer::RecalcSizes() call below using coordinates relative + // by the wxBoxSizer::RecalcSizes() call below using coordinates relative // to the top-left corner of the staticbox (but unlike wxGTK, we need // to keep in count the static borders here!): m_position.x = other_border; diff --git a/src/common/sstream.cpp b/src/common/sstream.cpp index 24e09f1be3..80091ed143 100644 --- a/src/common/sstream.cpp +++ b/src/common/sstream.cpp @@ -37,7 +37,7 @@ // ---------------------------------------------------------------------------- // TODO: Do we want to include the null char in the stream? If so then -// just add +1 to m_len in the ctor +// just add +1 to m_len in the ctor wxStringInputStream::wxStringInputStream(const wxString& s) #if wxUSE_UNICODE // FIXME-UTF8: use wxCharBufferWithLength if we have it @@ -56,9 +56,9 @@ wxStringInputStream::wxStringInputStream(const wxString& s) // getlength // ---------------------------------------------------------------------------- -wxFileOffset wxStringInputStream::GetLength() const -{ - return m_len; +wxFileOffset wxStringInputStream::GetLength() const +{ + return m_len; } // ---------------------------------------------------------------------------- diff --git a/src/common/stream.cpp b/src/common/stream.cpp index a3142a2843..241d1c07b2 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -943,17 +943,17 @@ wxFileOffset wxInputStream::SeekI(wxFileOffset pos, wxSeekMode mode) bytes_read = Read(buf, WXSIZEOF(buf)).LastRead(); if ( m_lasterror != wxSTREAM_NO_ERROR ) return wxInvalidOffset; - + wxASSERT(bytes_read == WXSIZEOF(buf)); } - + // read the last 'pos' bytes bytes_read = Read(buf, (size_t)pos).LastRead(); if ( m_lasterror != wxSTREAM_NO_ERROR ) return wxInvalidOffset; - + wxASSERT(bytes_read == (size_t)pos); - + // we should now have seeked to the right position... return TellI(); } diff --git a/src/common/variant.cpp b/src/common/variant.cpp index 3da37a3a83..b1c8838981 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -1455,7 +1455,7 @@ protected: bool wxVariantDataLongLong::Eq(wxVariantData& data) const { - wxASSERT_MSG( (data.GetType() == wxS("longlong")), + wxASSERT_MSG( (data.GetType() == wxS("longlong")), "wxVariantDataLongLong::Eq: argument mismatch" ); wxVariantDataLongLong& otherData = (wxVariantDataLongLong&) data; @@ -1616,7 +1616,7 @@ protected: bool wxVariantDataULongLong::Eq(wxVariantData& data) const { - wxASSERT_MSG( (data.GetType() == wxS("ulonglong")), + wxASSERT_MSG( (data.GetType() == wxS("ulonglong")), "wxVariantDataULongLong::Eq: argument mismatch" ); wxVariantDataULongLong& otherData = (wxVariantDataULongLong&) data; diff --git a/src/common/wxcrt.cpp b/src/common/wxcrt.cpp index 0362f8f28e..05909433d2 100644 --- a/src/common/wxcrt.cpp +++ b/src/common/wxcrt.cpp @@ -65,9 +65,9 @@ using namespace std ; #endif #if defined(__DARWIN__) - #include "wx/osx/core/cfref.h" - #include - #include "wx/osx/core/cfstring.h" + #include "wx/osx/core/cfref.h" + #include + #include "wx/osx/core/cfstring.h" #include #endif @@ -643,7 +643,7 @@ int wxVsprintf(wchar_t *str, const wxString& format, va_list argptr) #if wxUSE_UNICODE_WCHAR #ifdef __DMC__ /* -This fails with a bug similar to +This fails with a bug similar to http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=c++.beta&artnum=680 in DMC 8.49 and 8.50 I don't see it being used in the wxWidgets sources at present (oct 2007) CE @@ -797,17 +797,17 @@ WXDLLIMPEXP_BASE wchar_t * wxCRT_StrdupW(const wchar_t *pwz) #endif // wxCRT_StrdupW #ifndef wxWCHAR_T_IS_WXCHAR16 -size_t wxStrlen(const wxChar16 *s ) -{ - if (!s) return 0; - size_t i=0; - while (*s!=0) { ++i; ++s; }; +size_t wxStrlen(const wxChar16 *s ) +{ + if (!s) return 0; + size_t i=0; + while (*s!=0) { ++i; ++s; }; return i; } wxChar16* wxStrdup(const wxChar16* s) -{ - size_t size = (wxStrlen(s) + 1) * sizeof(wxChar16); +{ + size_t size = (wxStrlen(s) + 1) * sizeof(wxChar16); wxChar16 *ret = (wxChar16*) malloc(size); memcpy(ret, s, size); return ret; @@ -815,17 +815,17 @@ wxChar16* wxStrdup(const wxChar16* s) #endif #ifndef wxWCHAR_T_IS_WXCHAR32 -size_t wxStrlen(const wxChar32 *s ) -{ - if (!s) return 0; - size_t i=0; - while (*s!=0) { ++i; ++s; }; +size_t wxStrlen(const wxChar32 *s ) +{ + if (!s) return 0; + size_t i=0; + while (*s!=0) { ++i; ++s; }; return i; } wxChar32* wxStrdup(const wxChar32* s) -{ - size_t size = (wxStrlen(s) + 1) * sizeof(wxChar32); +{ + size_t size = (wxStrlen(s) + 1) * sizeof(wxChar32); wxChar32 *ret = (wxChar32*) malloc(size); memcpy(ret, s, size); return ret; diff --git a/src/common/xlocale.cpp b/src/common/xlocale.cpp index 96c8a558ca..2f71cbc879 100644 --- a/src/common/xlocale.cpp +++ b/src/common/xlocale.cpp @@ -153,7 +153,7 @@ void wxXLocale::Init(const char *loc) m_locale = newlocale(LC_ALL_MASK, buf2.c_str(), NULL); } } - + // TODO: wxLocale performs many more manipulations of the given locale // string in the attempt to set a valid locale; reusing that code // (changing it to take a generic wxTryLocale callback) would be nice @@ -313,7 +313,7 @@ double wxStrtod_l(const char* str, char **endptr, const wxXLocale& loc) } long wxStrtol_l(const wchar_t* str, wchar_t **endptr, int base, const wxXLocale& loc) -{ +{ IMPLEMENT_STRTOX_L_START long ret = wxStrtol(str, endptr, base); IMPLEMENT_STRTOX_L_END diff --git a/src/common/zstream.cpp b/src/common/zstream.cpp index cb2ba6c4fa..8283811fbb 100644 --- a/src/common/zstream.cpp +++ b/src/common/zstream.cpp @@ -88,13 +88,13 @@ wxGzipClassFactory::wxGzipClassFactory() const wxChar * const * wxGzipClassFactory::GetProtocols(wxStreamProtocolType type) const { - static const wxChar *protos[] = + static const wxChar *protos[] = { wxT("gzip"), NULL }; - static const wxChar *mimes[] = + static const wxChar *mimes[] = { wxT("application/gzip"), wxT("application/x-gzip"), NULL }; - static const wxChar *encs[] = + static const wxChar *encs[] = { wxT("gzip"), NULL }; - static const wxChar *exts[] = + static const wxChar *exts[] = { wxT(".gz"), wxT(".gzip"), NULL }; static const wxChar *empty[] = { NULL }; diff --git a/src/generic/animateg.cpp b/src/generic/animateg.cpp index 60f79e557c..aa531dc103 100644 --- a/src/generic/animateg.cpp +++ b/src/generic/animateg.cpp @@ -595,7 +595,7 @@ void wxAnimationCtrl::DisposeToBackground() } void wxAnimationCtrl::DisposeToBackground(wxDC& dc) -{ +{ wxColour col = IsUsingWindowBackgroundColour() ? GetBackgroundColour() : m_animation.GetBackgroundColour(); @@ -628,7 +628,7 @@ void wxAnimationCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) if ( m_backingStore.IsOk() ) { // NOTE: we draw the bitmap explicitely ignoring the mask (if any); - // i.e. we don't want to combine the backing store with the + // i.e. we don't want to combine the backing store with the // possibly wrong preexisting contents of the window! dc.DrawBitmap(m_backingStore, 0, 0, false /* no mask */); } @@ -681,9 +681,9 @@ void wxAnimationCtrl::OnSize(wxSizeEvent &WXUNUSED(event)) // when using them inside sizers. if (m_animation.IsOk()) { - // be careful to change the backing store *only* if we are - // playing the animation as otherwise we may be displaying - // the inactive bitmap and overwriting the backing store + // be careful to change the backing store *only* if we are + // playing the animation as otherwise we may be displaying + // the inactive bitmap and overwriting the backing store // with the last played frame is wrong in this case if (IsPlaying()) { diff --git a/src/generic/bmpcboxg.cpp b/src/generic/bmpcboxg.cpp index 010132792f..bf88843844 100644 --- a/src/generic/bmpcboxg.cpp +++ b/src/generic/bmpcboxg.cpp @@ -337,7 +337,7 @@ void wxBitmapComboBox::OnDrawItem(wxDC& dc, { text = GetString(item); } - + wxBitmapComboBoxBase::DrawItem(dc, rect, item, text, flags); } diff --git a/src/generic/combog.cpp b/src/generic/combog.cpp index 7f354a8f3c..3c07f3da36 100644 --- a/src/generic/combog.cpp +++ b/src/generic/combog.cpp @@ -280,7 +280,7 @@ void wxGenericComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) ) // clear main background dc.DrawRectangle(rect); - + if ( !m_btn ) { // Standard button rendering diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 7887465b1c..9b6c2759cb 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -2081,7 +2081,7 @@ bool wxDataViewMainWindow::ItemDeleted(const wxDataViewItem& parent, wxDataViewVirtualListModel *list_model = (wxDataViewVirtualListModel*) GetOwner()->GetModel(); m_count = list_model->GetCount(); - + if( m_currentRow > GetRowCount() ) m_currentRow = m_count - 1; @@ -3192,7 +3192,7 @@ wxRect wxDataViewMainWindow::GetItemRect( const wxDataViewItem & item, { wxDataViewTreeNode* node = GetTreeNodeByRow(row); indent = GetOwner()->GetIndent() * node->GetIndentLevel(); - indent = indent + m_lineHeight; // use m_lineHeight as the width of the expander + indent = indent + m_lineHeight; // use m_lineHeight as the width of the expander if(!node->HasChildren()) delete node; @@ -3215,7 +3215,7 @@ int wxDataViewMainWindow::RecalculateCount() { wxDataViewVirtualListModel *list_model = (wxDataViewVirtualListModel*) GetOwner()->GetModel(); - + return list_model->GetCount(); } else diff --git a/src/generic/dcpsg.cpp b/src/generic/dcpsg.cpp index 7148eef2d1..13af995249 100644 --- a/src/generic/dcpsg.cpp +++ b/src/generic/dcpsg.cpp @@ -1935,7 +1935,7 @@ bool wxPostScriptDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord fwidth, wxCoord fheight, wxDC *source, wxCoord xsrc, wxCoord ysrc, - wxRasterOperationMode rop, + wxRasterOperationMode rop, bool WXUNUSED(useMask), wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask) ) { wxCHECK_MSG( m_ok, false, wxT("invalid postscript dc") ); diff --git a/src/generic/graphicc.cpp b/src/generic/graphicc.cpp index dd64d2706e..af0031b536 100644 --- a/src/generic/graphicc.cpp +++ b/src/generic/graphicc.cpp @@ -346,7 +346,7 @@ public: virtual void BeginLayer(wxDouble opacity); virtual void EndLayer(); - + virtual void StrokePath( const wxGraphicsPath& p ); virtual void FillPath( const wxGraphicsPath& p , wxPolygonFillMode fillStyle = wxWINDING_RULE ); @@ -380,7 +380,7 @@ private: void Init(cairo_t *context); cairo_t* m_context; - + wxVector m_layerOpacities; wxDECLARE_NO_COPY_CLASS(wxCairoContext); @@ -1437,8 +1437,8 @@ void wxCairoContext::DoDrawText(const wxString& str, wxDouble x, wxDouble y) wxCairoFontData* font_data = (wxCairoFontData*) m_font.GetRefData(); pango_layout_set_font_description( layout, font_data->GetFont()); pango_layout_set_text(layout, data, datalen); - - if (font_data->GetUnderlined()) + + if (font_data->GetUnderlined()) { PangoAttrList *attrs = pango_attr_list_new(); PangoAttribute *attr = pango_attr_underline_new(PANGO_UNDERLINE_SINGLE); @@ -1564,7 +1564,7 @@ bool wxCairoContext::SetAntialiasMode(wxAntialiasMode antialias) return true; m_antialias = antialias; - + cairo_antialias_t antialiasMode; switch (antialias) { @@ -1585,7 +1585,7 @@ bool wxCairoContext::SetCompositionMode(wxCompositionMode op) { if ( m_composition == op ) return true; - + m_composition = op; cairo_operator_t cop; switch (op) @@ -1649,7 +1649,7 @@ void wxCairoContext::EndLayer() cairo_pop_group_to_source(m_context); cairo_paint_with_alpha(m_context,opacity); } - + //----------------------------------------------------------------------------- // wxCairoRenderer declaration //----------------------------------------------------------------------------- diff --git a/src/generic/gridctrl.cpp b/src/generic/gridctrl.cpp index 50a265d8c7..e4d2608d21 100644 --- a/src/generic/gridctrl.cpp +++ b/src/generic/gridctrl.cpp @@ -24,7 +24,7 @@ #include "wx/textctrl.h" #include "wx/dc.h" #include "wx/combobox.h" - #include "wx/settings.h" + #include "wx/settings.h" #include "wx/log.h" #include "wx/checkbox.h" #endif // WX_PRECOMP diff --git a/src/generic/headerctrlg.cpp b/src/generic/headerctrlg.cpp index ac50c2e173..88f63ed867 100644 --- a/src/generic/headerctrlg.cpp +++ b/src/generic/headerctrlg.cpp @@ -482,7 +482,7 @@ void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) { int w, h; GetClientSize(&w, &h); - + #ifdef __WXGTK__ // int vw; // GetVirtualSize(&vw, NULL); @@ -528,7 +528,7 @@ void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) { state = wxCONTROL_DISABLED; } - + if (i == 0) state |= wxCONTROL_SPECIAL; @@ -536,7 +536,7 @@ void wxHeaderCtrl::OnPaint(wxPaintEvent& WXUNUSED(event)) params.m_labelText = col.GetTitle(); params.m_labelBitmap = col.GetBitmap(); params.m_labelAlignment = col.GetAlignment(); - + #ifdef __WXGTK__ if (i == count-1) { diff --git a/src/generic/hyperlinkg.cpp b/src/generic/hyperlinkg.cpp index 07b9b2468f..4e81ddad9f 100644 --- a/src/generic/hyperlinkg.cpp +++ b/src/generic/hyperlinkg.cpp @@ -195,7 +195,7 @@ void wxGenericHyperlinkCtrl::OnLeftDown(wxMouseEvent& event) void wxGenericHyperlinkCtrl::OnLeftUp(wxMouseEvent& event) { // the click must be started and ended in the hyperlink rect - if (!m_clicking || !GetLabelRect().Contains(event.GetPosition())) + if (!m_clicking || !GetLabelRect().Contains(event.GetPosition())) return; SetForegroundColour(m_visitedColour); diff --git a/src/generic/paletteg.cpp b/src/generic/paletteg.cpp index 5b89e26230..a30275fb18 100644 --- a/src/generic/paletteg.cpp +++ b/src/generic/paletteg.cpp @@ -82,8 +82,8 @@ int wxPalette::GetColoursCount() const { if (m_refData) return M_PALETTEDATA->m_count; - - return 0; + + return 0; } bool wxPalette::Create(int n, diff --git a/src/generic/prntdlgg.cpp b/src/generic/prntdlgg.cpp index 54458cd201..a05eca8d07 100644 --- a/src/generic/prntdlgg.cpp +++ b/src/generic/prntdlgg.cpp @@ -145,7 +145,7 @@ END_EVENT_TABLE() wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintDialogData* data) - : wxPrintDialogBase(GetParentForModalDialog(parent), + : wxPrintDialogBase(GetParentForModalDialog(parent), wxID_ANY, _("Print"), wxPoint(0,0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE | @@ -159,7 +159,7 @@ wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxGenericPrintDialog::wxGenericPrintDialog(wxWindow *parent, wxPrintData* data) - : wxPrintDialogBase(GetParentForModalDialog(parent), + : wxPrintDialogBase(GetParentForModalDialog(parent), wxID_ANY, _("Print"), wxPoint(0,0), wxSize(600, 600), wxDEFAULT_DIALOG_STYLE | @@ -462,9 +462,9 @@ static const char * check_xpm[] = { /* width height ncolors chars_per_pixel */ "16 16 3 1", /* colors */ -" s None c None", -"X c #000000", -". c #808080", +" s None c None", +"X c #000000", +". c #808080", /* pixels */ " ", " ", diff --git a/src/generic/regiong.cpp b/src/generic/regiong.cpp index 6c358e10ad..fc29ab59fd 100644 --- a/src/generic/regiong.cpp +++ b/src/generic/regiong.cpp @@ -271,7 +271,7 @@ wxRegionGeneric::wxRegionGeneric(const wxPoint& topLeft, const wxPoint& bottomRi m_refData = new wxRegionRefData(topLeft, bottomRight); } -wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp) +wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp) { wxFAIL_MSG("NOT IMPLEMENTED: wxRegionGeneric::wxRegionGeneric(const wxBitmap& bmp)"); } diff --git a/src/generic/statusbr.cpp b/src/generic/statusbr.cpp index 3169ef6612..740df48eed 100644 --- a/src/generic/statusbr.cpp +++ b/src/generic/statusbr.cpp @@ -75,7 +75,7 @@ gboolean statusbar_query_tooltip(GtkWidget* WXUNUSED(widget), const wxString& str = statbar->GetStatusText(n); if (str.empty()) return FALSE; - + gtk_tooltip_set_text(tooltip, wxGTK_CONV_SYS(str)); return TRUE; } @@ -129,14 +129,14 @@ bool wxStatusBarGeneric::Create(wxWindow *parent, SetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, height); SetFieldsCount(1); - + #if defined( __WXGTK20__ ) #if GTK_CHECK_VERSION(2,12,0) if (HasFlag(wxSTB_SHOW_TIPS) && !gtk_check_version(2,12,0)) { - g_object_set(m_widget, "has-tooltip", TRUE, NULL); - g_signal_connect(m_widget, "query-tooltip", - G_CALLBACK(statusbar_query_tooltip), this); + g_object_set(m_widget, "has-tooltip", TRUE, NULL); + g_signal_connect(m_widget, "query-tooltip", + G_CALLBACK(statusbar_query_tooltip), this); } #endif #endif @@ -228,7 +228,7 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int } // eventually ellipsize the text so that it fits the field width - + wxEllipsizeMode ellmode = (wxEllipsizeMode)-1; if (HasFlag(wxSTB_ELLIPSIZE_START)) ellmode = wxELLIPSIZE_START; else if (HasFlag(wxSTB_ELLIPSIZE_MIDDLE)) ellmode = wxELLIPSIZE_MIDDLE; @@ -251,8 +251,8 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int wxELLIPSIZE_EXPAND_TAB); // Ellipsize() will do something only if necessary - // update the ellipsization status for this pane; this is used later to - // decide whether a tooltip should be shown or not for this pane + // update the ellipsization status for this pane; this is used later to + // decide whether a tooltip should be shown or not for this pane // (if we have wxSTB_SHOW_TIPS) SetEllipsizedFlag(i, text != GetStatusText(i)); } @@ -264,7 +264,7 @@ void wxStatusBarGeneric::DrawFieldText(wxDC& dc, const wxRect& rect, int i, int // draw the text dc.DrawText(text, xpos, ypos); - + if (ellmode == (wxEllipsizeMode)-1) dc.DestroyClippingRegion(); } @@ -347,7 +347,7 @@ int wxStatusBarGeneric::GetFieldFromPoint(const wxPoint& pt) const // NOTE: we explicitely don't take in count the borders since they are only // useful when rendering the status text, not for hit-test computations - + if (pt.y <= 0 || pt.y >= m_lastClientHeight) return wxNOT_FOUND; @@ -356,7 +356,7 @@ int wxStatusBarGeneric::GetFieldFromPoint(const wxPoint& pt) const { if (pt.x > x && pt.x < x+m_widthsAbs[i]) return i; - + x += m_widthsAbs[i]; } diff --git a/src/generic/vscroll.cpp b/src/generic/vscroll.cpp index a98c29da79..7ce1079c42 100644 --- a/src/generic/vscroll.cpp +++ b/src/generic/vscroll.cpp @@ -936,7 +936,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxHVScrolledWindow, wxPanel) // wxVarVScrollLegacyAdaptor // =========================================================================== -size_t wxVarVScrollLegacyAdaptor::GetFirstVisibleLine() const +size_t wxVarVScrollLegacyAdaptor::GetFirstVisibleLine() const { return GetVisibleRowsBegin(); } size_t wxVarVScrollLegacyAdaptor::GetLastVisibleLine() const @@ -953,13 +953,13 @@ void wxVarVScrollLegacyAdaptor::RefreshLine(size_t line) void wxVarVScrollLegacyAdaptor::RefreshLines(size_t from, size_t to) { RefreshRows(from, to); } - + bool wxVarVScrollLegacyAdaptor::ScrollToLine(size_t line) { return ScrollToRow(line); } bool wxVarVScrollLegacyAdaptor::ScrollLines(int lines) { return ScrollRows(lines); } - + bool wxVarVScrollLegacyAdaptor::ScrollPages(int pages) { return ScrollRowPages(pages); } diff --git a/src/generic/wizard.cpp b/src/generic/wizard.cpp index e7b62f581f..82af511d4b 100644 --- a/src/generic/wizard.cpp +++ b/src/generic/wizard.cpp @@ -916,7 +916,7 @@ bool wxWizard::DoLayoutAdaptation() // Size event doesn't get sent soon enough on wxGTK DoLayout(); - + SetLayoutAdaptationDone(true); return true; diff --git a/src/gtk/calctrl.cpp b/src/gtk/calctrl.cpp index 2da9293d0b..3672664b25 100644 --- a/src/gtk/calctrl.cpp +++ b/src/gtk/calctrl.cpp @@ -142,17 +142,17 @@ bool wxGtkCalendarCtrl::SetDate(const wxDateTime& date) { g_signal_handlers_block_by_func(m_widget, (gpointer) gtk_day_selected_callback, this); - + m_selectedDate = date; int year = date.GetYear(); int month = date.GetMonth(); int day = date.GetDay(); gtk_calendar_select_month(GTK_CALENDAR(m_widget), month, year); gtk_calendar_select_day(GTK_CALENDAR(m_widget), day); - + g_signal_handlers_unblock_by_func( m_widget, (gpointer) gtk_day_selected_callback, this); - + return true; } diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp index b4043d6030..82606be7ff 100644 --- a/src/gtk/checkbox.cpp +++ b/src/gtk/checkbox.cpp @@ -171,7 +171,7 @@ void wxCheckBox::SetValue( bool state ) if (state == GetValue()) return; - + GTKDisableEvents(); gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(m_widgetCheckbox), state ); diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index 9a71c3cc2a..0dedcab00b 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -72,13 +72,13 @@ wxCursor::wxCursor(const wxString& cursor_file, wxImage img; if (!img.LoadFile(cursor_file, type)) return; - + // eventually set the hotspot: if (!img.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_X)) img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, hotSpotX); if (!img.HasOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y)) img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, hotSpotY); - + InitFromImage(img); } diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index 85fcee3185..15855368b1 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -853,7 +853,7 @@ typedef struct _GtkWxCellRendererTextClass GtkWxCellRendererTextClass; struct _GtkWxCellRendererText { GtkCellRendererText parent; - + wxDataViewRenderer *wx_renderer; }; @@ -969,7 +969,7 @@ static GtkCellEditable *gtk_wx_cell_renderer_text_start_editing( event.SetColumn( wx_renderer->GetOwner()->GetModelColumn() ); event.SetItem( item ); dv->HandleWindowEvent( event ); - + if (event.IsAllowed()) return GTK_CELL_RENDERER_CLASS(text_cell_parent_class)-> start_editing( gtk_renderer, gdk_event, widget, path, background_area, cell_area, flags ); @@ -1489,7 +1489,7 @@ bool wxGtkDataViewModelNotifier::ValueChanged( const wxDataViewItem &item, unsig bool wxGtkDataViewModelNotifier::Cleared() { m_owner->GtkGetInternal()->Cleared(); - + return true; } @@ -1562,8 +1562,8 @@ void wxDataViewRenderer::GtkInitHandlers() if (!gtk_check_version(2,6,0)) { g_signal_connect (GTK_CELL_RENDERER(m_renderer), "editing_started", - G_CALLBACK (wxgtk_renderer_editing_started), - this); + G_CALLBACK (wxgtk_renderer_editing_started), + this); } } @@ -3025,10 +3025,10 @@ void wxGtkTreeModelNode::Resort() // Sort the ptrs gs_internal = m_internal; ptrs.Sort( &wxGtkTreeModelChildPtrCmp ); - + wxGtkTreeModelChildren temp; void** base_ptr = &(m_children[0]); - // Transfer positions to new_order array and + // Transfer positions to new_order array and // IDs to temp for (i = 0; i < child_count; i++) { @@ -3068,13 +3068,13 @@ void wxGtkTreeModelNode::Resort() #if 0 // Too slow - + wxGtkTreeModelChildren temp; WX_APPEND_ARRAY( temp, m_children ); gs_internal = m_internal; m_children.Sort( &wxGtkTreeModelChildCmp ); - + unsigned int pos; for (pos = 0; pos < child_count; pos++) { @@ -3097,7 +3097,7 @@ void wxGtkTreeModelNode::Resort() gtk_tree_path_free (path); delete [] new_order; - + unsigned int pos; for (pos = 0; pos < node_count; pos++) { @@ -3317,13 +3317,13 @@ bool wxDataViewCtrlInternal::Cleared() GtkWidget* tree_widget = GetOwner()->GtkGetTreeView(); gtk_tree_view_set_model( GTK_TREE_VIEW(tree_widget), NULL ); gtk_tree_view_set_model( GTK_TREE_VIEW(tree_widget), GTK_TREE_MODEL(m_gtk_model) ); - + if (m_root) { delete m_root; InitTree(); } - + return true; } @@ -3404,9 +3404,9 @@ gboolean wxDataViewCtrlInternal::get_iter( GtkTreeIter *iter, GtkTreePath *path if (m_wx_model->IsVirtualListModel()) { wxDataViewVirtualListModel *wx_model = (wxDataViewVirtualListModel*) m_wx_model; - + unsigned int i = (unsigned int)gtk_tree_path_get_indices (path)[0]; - + if (i >= wx_model->GetCount()) return FALSE; @@ -3506,7 +3506,7 @@ gboolean wxDataViewCtrlInternal::iter_next( GtkTreeIter *iter ) iter->user_data = NULL; return FALSE; } - + // user_data is just the index +1 (+2 because we need the next) iter->user_data = (gpointer) (n+2); } @@ -3555,7 +3555,7 @@ gboolean wxDataViewCtrlInternal::iter_children( GtkTreeIter *iter, GtkTreeIter * iter->user_data = (gpointer) m_root->GetChildren().Item( 0 ); return TRUE; } - + wxDataViewItem item( (void*) parent->user_data ); if (!m_wx_model->IsContainer( item )) @@ -3585,7 +3585,7 @@ gboolean wxDataViewCtrlInternal::iter_has_child( GtkTreeIter *iter ) if (iter == NULL) return (wx_model->GetCount() > 0); - + // this is a list, nodes have no children return FALSE; } @@ -3593,7 +3593,7 @@ gboolean wxDataViewCtrlInternal::iter_has_child( GtkTreeIter *iter ) { if (iter == NULL) return (m_root->GetChildCount() > 0); - + wxDataViewItem item( (void*) iter->user_data ); bool is_container = m_wx_model->IsContainer( item ); diff --git a/src/gtk/dc.cpp b/src/gtk/dc.cpp index 5d182e84d4..5998f8b674 100644 --- a/src/gtk/dc.cpp +++ b/src/gtk/dc.cpp @@ -18,7 +18,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxGTKDCImpl, wxDCImpl) -wxGTKDCImpl::wxGTKDCImpl( wxDC *owner ) +wxGTKDCImpl::wxGTKDCImpl( wxDC *owner ) : wxDCImpl( owner ) { m_ok = FALSE; diff --git a/src/gtk/dcmemory.cpp b/src/gtk/dcmemory.cpp index e1ce88efa2..4590917127 100644 --- a/src/gtk/dcmemory.cpp +++ b/src/gtk/dcmemory.cpp @@ -22,17 +22,17 @@ IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxWindowDCImpl) -wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) +wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) : wxWindowDCImpl( owner ) -{ - Init(); +{ + Init(); } -wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap) +wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap) : wxWindowDCImpl( owner ) -{ - Init(); - DoSelect(bitmap); +{ + Init(); + DoSelect(bitmap); } wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *WXUNUSED(dc) ) diff --git a/src/gtk/dcscreen.cpp b/src/gtk/dcscreen.cpp index e32427f51e..6a0f1e655d 100644 --- a/src/gtk/dcscreen.cpp +++ b/src/gtk/dcscreen.cpp @@ -27,10 +27,10 @@ IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxWindowDCImpl) -wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner ) +wxScreenDCImpl::wxScreenDCImpl( wxScreenDC *owner ) : wxWindowDCImpl( owner ) -{ - Init(); +{ + Init(); } void wxScreenDCImpl::Init() diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index 360a255a0a..db30dd5c47 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -237,7 +237,7 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget), else if (drop_target->GetDefaultAction() == wxDragMove && (context->actions & GDK_ACTION_MOVE)) { - + result = wxDragMove; } else diff --git a/src/gtk/evtloop.cpp b/src/gtk/evtloop.cpp index c54fa804d2..e05af19f5d 100644 --- a/src/gtk/evtloop.cpp +++ b/src/gtk/evtloop.cpp @@ -138,11 +138,11 @@ static void wxgtk_main_do_event(GdkEvent *event, wxGUIEventLoop* evtloop) // categorize the GDK event according to wxEventCategory. // See http://library.gnome.org/devel/gdk/unstable/gdk-Events.html#GdkEventType // for more info. - + // NOTE: GDK_* constants which were not present in the GDK2.0 can be tested for // only at compile-time; when running the program (compiled with a recent GDK) - // on a system with an older GDK lib we can be sure there won't be problems - // because event->type will never assume those values corresponding to + // on a system with an older GDK lib we can be sure there won't be problems + // because event->type will never assume those values corresponding to // new event types (since new event types are always added in GDK with non // conflicting values for ABI compatibility). diff --git a/src/gtk/filectrl.cpp b/src/gtk/filectrl.cpp index 8be3759997..1b00e343ee 100644 --- a/src/gtk/filectrl.cpp +++ b/src/gtk/filectrl.cpp @@ -146,13 +146,13 @@ void wxGtkFileChooser::SetWildcard( const wxString& wildCard ) gtk_file_filter_set_name( filter, wxGTK_CONV_SYS( wildDescriptions[n] ) ); wxStringTokenizer exttok( wildFilters[n], wxT( ";" ) ); - + int n1 = 1; while ( exttok.HasMoreTokens() ) { wxString token = exttok.GetNextToken(); gtk_file_filter_add_pattern( filter, wxGTK_CONV_SYS( token ) ); - + if (n1 == 1) m_wildcards.Add( token ); // Only add first pattern to list, used later when saving n1++; diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index d7a2d8a57e..ff7541c6b7 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -10,7 +10,7 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#if wxUSE_FILEDLG +#if wxUSE_FILEDLG #include "wx/filedlg.h" @@ -320,8 +320,8 @@ int wxFileDialog::ShowModal() return wxDialog::ShowModal(); } -void wxFileDialog::DoSetSize(int WXUNUSED(x), int WXUNUSED(y), - int WXUNUSED(width), int WXUNUSED(height), +void wxFileDialog::DoSetSize(int WXUNUSED(x), int WXUNUSED(y), + int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(sizeFlags)) { } @@ -335,7 +335,7 @@ void wxFileDialog::OnSize(wxSizeEvent&) wxString wxFileDialog::GetPath() const { wxFileName fn = m_fc.GetPath(); - + if (HasFdFlag(wxFD_SAVE)) { // add extension @@ -411,4 +411,4 @@ int wxFileDialog::GetFilterIndex() const return m_fc.GetFilterIndex(); } -#endif // wxUSE_FILEDLG +#endif // wxUSE_FILEDLG diff --git a/src/gtk/filepicker.cpp b/src/gtk/filepicker.cpp index ec160d8222..2b0f7fca9e 100644 --- a/src/gtk/filepicker.cpp +++ b/src/gtk/filepicker.cpp @@ -65,7 +65,7 @@ bool wxFileButton::Create( wxWindow *parent, wxWindowID id, m_wildcard = wildcard; if ((m_dialog = CreateDialog()) == NULL) return false; - + // little trick used to avoid problems when there are other GTK windows 'grabbed': // GtkFileChooserDialog won't be responsive to user events if there is another // window which called gtk_grab_add (and this happens if e.g. a wxDialog is running @@ -80,7 +80,7 @@ bool wxFileButton::Create( wxWindow *parent, wxWindowID id, // use as label the currently selected file m_widget = gtk_file_chooser_button_new_with_dialog( m_dialog->m_widget ); - + g_object_ref(m_widget); gtk_widget_show(m_widget); @@ -124,7 +124,7 @@ void wxFileButton::OnDialogOK(wxCommandEvent& ev) void wxFileButton::SetPath(const wxString &str) { m_path = str; - + if (m_dialog) UpdateDialogPath(m_dialog); } @@ -227,7 +227,7 @@ bool wxDirButton::Create( wxWindow *parent, wxWindowID id, m_widget = gtk_file_chooser_button_new_with_dialog( m_dialog->m_widget ); g_object_ref(m_widget); - + gtk_widget_show(m_widget); // GtkFileChooserButton signals @@ -250,7 +250,7 @@ wxDirButton::~wxDirButton() } void wxDirButton::GTKUpdatePath(const char *gtkpath) -{ +{ m_path = wxString::FromUTF8(gtkpath); } void wxDirButton::SetPath(const wxString& str) diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index 00ab666ccd..72b651732c 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -221,7 +221,7 @@ bool wxFontRefData::SetPixelSize(const wxSize& pixelSize) return false; } - pango_font_description_set_absolute_size( m_nativeFontInfo.description, + pango_font_description_set_absolute_size( m_nativeFontInfo.description, pixelSize.GetHeight() * PANGO_SCALE ); return true; diff --git a/src/gtk/fontpicker.cpp b/src/gtk/fontpicker.cpp index b2cdb532e3..7eef011a45 100644 --- a/src/gtk/fontpicker.cpp +++ b/src/gtk/fontpicker.cpp @@ -17,7 +17,7 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#if wxUSE_FONTPICKERCTRL +#if wxUSE_FONTPICKERCTRL #include "wx/fontpicker.h" diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index 2fb0d7c57a..82c8f1ec54 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -163,7 +163,7 @@ static wxAcceleratorTable wxCreateAcceleratorTableForMenuBar(wxMenuBar* menuBar) wxAcceleratorEntry* entry = (wxAcceleratorEntry*) accelEntries.Item(i)->GetData(); entries[i] = (*entry); delete entry; - + } wxAcceleratorTable table(n, entries); diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 2d56e77d82..dccdd75c77 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -174,7 +174,7 @@ gtk_listbox_key_press_callback( GtkWidget *WXUNUSED(widget), GdkEventKey *gdk_event, wxListBox *listbox ) { - if ((gdk_event->keyval == GDK_Return) || + if ((gdk_event->keyval == GDK_Return) || (gdk_event->keyval == GDK_ISO_Enter) || (gdk_event->keyval == GDK_KP_Enter)) { @@ -188,12 +188,12 @@ gtk_listbox_key_press_callback( GtkWidget *WXUNUSED(widget), return FALSE; index = sels[0]; } - + if (index != wxNOT_FOUND) { wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, listbox->GetId() ); event.SetEventObject( listbox ); - + GtkTreeEntry* entry = listbox->GtkGetEntry( index ); // indicate that this is a selection @@ -212,7 +212,7 @@ gtk_listbox_key_press_callback( GtkWidget *WXUNUSED(widget), /* bool ret = */ listbox->HandleWindowEvent( event ); g_object_unref (entry); - + // wxMac and wxMSW always invoke default action // if (!ret) { @@ -225,13 +225,13 @@ gtk_listbox_key_press_callback( GtkWidget *WXUNUSED(widget), gtk_window_activate_default( gtk_window ); } } - + // Always intercept, otherwise we'd get another dclick // event from row_activated return TRUE; } } - + return FALSE; } } @@ -476,7 +476,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id, g_signal_connect_after (selection, "changed", G_CALLBACK (gtk_listitem_changed_callback), this); - + return true; } @@ -501,7 +501,7 @@ void wxListBox::GtkEnableEvents() g_signal_handlers_unblock_by_func(selection, (gpointer) gtk_listitem_changed_callback, this); - + UpdateOldSelections(); } @@ -509,7 +509,7 @@ void wxListBox::GtkEnableEvents() void wxListBox::Update() { wxWindow::Update(); - + if (m_treeview) gdk_window_process_updates(GTK_WIDGET(m_treeview)->window, TRUE); } @@ -575,7 +575,7 @@ void wxListBox::DoClear() InvalidateBestSize(); gtk_list_store_clear( m_liststore ); /* well, THAT was easy :) */ - + GtkEnableEvents(); } @@ -593,7 +593,7 @@ void wxListBox::DoDeleteOneItem(unsigned int n) // this returns false if iter is invalid (e.g. deleting item at end) but // since we don't use iter, we ignore the return value gtk_list_store_remove(m_liststore, &iter); - + GtkEnableEvents(); } @@ -813,7 +813,7 @@ void wxListBox::DoSetSelection( int n, bool select ) wxCHECK_RET( m_treeview != NULL, wxT("invalid listbox") ); GtkDisableEvents(); - + GtkTreeSelection* selection = gtk_tree_view_get_selection(m_treeview); // passing -1 to SetSelection() is documented to deselect all items @@ -826,7 +826,7 @@ void wxListBox::DoSetSelection( int n, bool select ) wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetSelection") ); - + GtkTreeIter iter; wxCHECK_RET( GtkGetIteratorFor(n, &iter), wxT("Invalid index") ); diff --git a/src/gtk/mdi.cpp b/src/gtk/mdi.cpp index 8e4a1eb6e7..9778056ad3 100644 --- a/src/gtk/mdi.cpp +++ b/src/gtk/mdi.cpp @@ -385,7 +385,7 @@ wxMDIClientWindow::~wxMDIClientWindow() // a call to gtk_mdi_page_change_callback with an invalid parent // (because gtk_mdi_page_change_callback expects a wxMDIClientWindow but // at that point of the dtor chain we are a simple wxWindow!) - g_signal_handlers_disconnect_by_func(m_widget, + g_signal_handlers_disconnect_by_func(m_widget, (gpointer)gtk_mdi_page_change_callback, GetParent()); } diff --git a/src/gtk/minifram.cpp b/src/gtk/minifram.cpp index 834489387b..386208c34f 100644 --- a/src/gtk/minifram.cpp +++ b/src/gtk/minifram.cpp @@ -96,8 +96,8 @@ static gboolean gtk_window_own_expose_callback(GtkWidget* widget, GdkEventExpose wxBrush brush( LightContrastColour( wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT) ) ); dc.SetBrush( brush ); dc.SetPen( *wxTRANSPARENT_PEN ); - dc.DrawRectangle( win->m_miniEdge-1, - win->m_miniEdge-1, + dc.DrawRectangle( win->m_miniEdge-1, + win->m_miniEdge-1, win->m_width - (2*(win->m_miniEdge-1)), 15 ); @@ -107,7 +107,7 @@ static gboolean gtk_window_own_expose_callback(GtkWidget* widget, GdkEventExpose if (style & wxCLOSE_BOX) dc.DrawBitmap( win->m_closeButton, win->m_width-18, 3, true ); } - + return false; } } diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index d2920aff50..4802f31fcd 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -357,7 +357,7 @@ wxNotebookPage *wxNotebook::DoRemovePage( size_t page ) wxGtkNotebookPage* p = GetNotebookPage(page); m_pagesData.DeleteObject(p); delete p; - + return client; } diff --git a/src/gtk/popupwin.cpp b/src/gtk/popupwin.cpp index dd0fd634e5..15e9854112 100644 --- a/src/gtk/popupwin.cpp +++ b/src/gtk/popupwin.cpp @@ -124,7 +124,7 @@ bool wxPopupWindow::Create( wxWindow *parent, int style ) if (!gtk_check_version(2,10,0)) gtk_window_group_add_window (gtk_window_get_group (GTK_WINDOW (toplevel)), GTK_WINDOW (m_widget)); #endif - + gtk_window_set_transient_for (GTK_WINDOW (m_widget), GTK_WINDOW (toplevel)); } gtk_window_set_resizable (GTK_WINDOW (m_widget), FALSE); @@ -210,7 +210,7 @@ void wxPopupWindow::SetFocus() return; } } - + wxPopupWindowBase::SetFocus(); } diff --git a/src/gtk/print.cpp b/src/gtk/print.cpp index 563e214334..b72d8e6d8a 100644 --- a/src/gtk/print.cpp +++ b/src/gtk/print.cpp @@ -1427,8 +1427,8 @@ void wxGtkPrinterDCImpl::DoDrawLines(int n, wxPoint points[], wxCoord xoffset, w cairo_stroke ( m_cairo); } -void wxGtkPrinterDCImpl::DoDrawPolygon(int n, wxPoint points[], - wxCoord xoffset, wxCoord yoffset, +void wxGtkPrinterDCImpl::DoDrawPolygon(int n, wxPoint points[], + wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle) { if (n==0) return; @@ -1464,7 +1464,7 @@ void wxGtkPrinterDCImpl::DoDrawPolygon(int n, wxPoint points[], } void wxGtkPrinterDCImpl::DoDrawPolyPolygon(int n, int count[], wxPoint points[], - wxCoord xoffset, wxCoord yoffset, + wxCoord xoffset, wxCoord yoffset, wxPolygonFillMode fillStyle) { wxDCImpl::DoDrawPolyPolygon( n, count, points, xoffset, yoffset, fillStyle ); diff --git a/src/gtk/private.cpp b/src/gtk/private.cpp index 29ffce697f..6c025795f0 100644 --- a/src/gtk/private.cpp +++ b/src/gtk/private.cpp @@ -122,20 +122,20 @@ static void CreateHeaderButtons() // Get the dummy tree widget, give it a column, and then use the // widget in the column header for the rendering code. GtkWidget* treewidget = GetTreeWidget(); - + GtkTreeViewColumn *column = gtk_tree_view_column_new(); gtk_tree_view_append_column(GTK_TREE_VIEW(treewidget), column); s_first_button = column->button; - + column = gtk_tree_view_column_new(); gtk_tree_view_append_column(GTK_TREE_VIEW(treewidget), column); s_other_button = column->button; - + column = gtk_tree_view_column_new(); gtk_tree_view_append_column(GTK_TREE_VIEW(treewidget), column); s_last_button = column->button; } - + GtkWidget *GetHeaderButtonWidgetFirst() { if (!s_first_button) diff --git a/src/gtk/region.cpp b/src/gtk/region.cpp index 50f0ab0a5d..2073c24046 100644 --- a/src/gtk/region.cpp +++ b/src/gtk/region.cpp @@ -90,7 +90,7 @@ wxRegion::wxRegion( GdkRegion *region ) M_REGIONDATA->m_region = gdk_region_copy( region ); } -wxRegion::wxRegion( size_t n, const wxPoint *points, +wxRegion::wxRegion( size_t n, const wxPoint *points, wxPolygonFillMode fillStyle ) { GdkPoint *gdkpoints = new GdkPoint[n]; diff --git a/src/gtk/settings.cpp b/src/gtk/settings.cpp index c1e14c9464..7de06c56e3 100644 --- a/src/gtk/settings.cpp +++ b/src/gtk/settings.cpp @@ -257,13 +257,13 @@ wxFont wxSystemSettingsNative::GetFont( wxSystemFont index ) wxNativeFontInfo info; info.description = ButtonStyle()->font_desc; gs_fontSystem = wxFont(info); - + // (try to) heal the default font (on some common systems e.g. Ubuntu // it's "Sans Serif" but the real font is called "Sans"): if (!wxFontEnumerator::IsValidFacename(gs_fontSystem.GetFaceName()) && gs_fontSystem.GetFaceName() == "Sans Serif") gs_fontSystem.SetFaceName("Sans"); - + info.description = NULL; } font = gs_fontSystem; diff --git a/src/gtk/statbox.cpp b/src/gtk/statbox.cpp index a82354bc28..72a26ebbca 100644 --- a/src/gtk/statbox.cpp +++ b/src/gtk/statbox.cpp @@ -32,7 +32,7 @@ static void size_allocate(GtkWidget* widget, GtkAllocation* alloc, void*) GtkWidget* label_widget = gtk_frame_get_label_widget(GTK_FRAME(widget)); int w = alloc->width - 2 * widget->style->xthickness - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD; - if (w < 0) + if (w < 0) w = 0; if (label_widget->allocation.width > w) diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index e9366a1e38..ebbd47c37c 100644 --- a/src/gtk/stattext.cpp +++ b/src/gtk/stattext.cpp @@ -131,7 +131,7 @@ void wxStaticText::SetLabel( const wxString& str ) GTKSetLabelForLabel(GTK_LABEL(m_widget), label); // adjust the label size to the new label unless disabled - if ( !HasFlag(wxST_NO_AUTORESIZE) && + if ( !HasFlag(wxST_NO_AUTORESIZE) && !IsEllipsized() ) // if ellipsize is ON, then we don't want to get resized! SetSize( GetBestSize() ); } diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 3bac808b96..b6915adb51 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -780,7 +780,7 @@ bool wxTopLevelWindowGTK::ShowFullScreen(bool show, long) void wxTopLevelWindowGTK::Refresh( bool WXUNUSED(eraseBackground), const wxRect *WXUNUSED(rect) ) { wxCHECK_RET( m_widget, wxT("invalid frame") ); - + gtk_widget_queue_draw( m_widget ); if (m_wxwindow && m_wxwindow->window) diff --git a/src/gtk/utilsgtk.cpp b/src/gtk/utilsgtk.cpp index a2abf1d037..e144201082 100644 --- a/src/gtk/utilsgtk.cpp +++ b/src/gtk/utilsgtk.cpp @@ -189,7 +189,7 @@ const gchar *wx_pango_version_check (int major, int minor, int micro) // NOTE: you don't need to use this macro to check for Pango features // added in pango-1.4 or earlier since GTK 2.4 (our minimum requirement // for GTK lib) required pango 1.4... - + #ifdef PANGO_VERSION_MAJOR if (!gtk_check_version (2,11,0)) { diff --git a/src/gtk/win_gtk.cpp b/src/gtk/win_gtk.cpp index 13f596d26c..dcbe4fa282 100644 --- a/src/gtk/win_gtk.cpp +++ b/src/gtk/win_gtk.cpp @@ -87,7 +87,7 @@ static void size_allocate(GtkWidget* widget, GtkAllocation* alloc) } widget->allocation = *alloc; - + // adjust child positions for (const GList* list = pizza->m_fixed.children; list; list = list->next) { @@ -95,7 +95,7 @@ static void size_allocate(GtkWidget* widget, GtkAllocation* alloc) if (GTK_WIDGET_VISIBLE(child->widget)) { GtkAllocation child_old_alloc = child->widget->allocation; - + GtkAllocation child_alloc; // note that child positions do not take border into // account, they need to be relative to widget->window, @@ -342,7 +342,7 @@ static void scroll_adjust(GtkWidget* widget, void* data) const AdjustData* p = static_cast(data); widget->allocation.x += p->dx; widget->allocation.y += p->dy; - + if (widget->window == p->window) { // GtkFrame requires a queue_resize, otherwise parts of @@ -377,24 +377,24 @@ void wxPizza::get_border_widths(int& x, int& y) x = y = 0; if (m_border_style == 0) return; - + #ifndef __WXUNIVERSAL__ if (m_border_style & wxBORDER_SIMPLE) x = y = 1; else if (m_is_scrollable || (m_border_style & wxBORDER_THEME)) { GtkWidget *style_widget = wxGTKPrivate::GetTreeWidget(); - + if (style_widget->style) { x = style_widget->style->xthickness; y = style_widget->style->ythickness; } } - else + else { GtkWidget *style_widget = wxGTKPrivate::GetEntryWidget(); - + if (style_widget->style) { x = style_widget->style->xthickness; diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index a3975752f1..2e71c0bdbd 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1833,7 +1833,7 @@ gtk_window_realized_callback(GtkWidget* widget, wxWindow* win) gtk_im_context_set_client_window( win->m_imData->context, widget->window); } - + // We cannot set colours and fonts before the widget // been realized, so we do this directly after realization // or otherwise in idle time @@ -1964,7 +1964,7 @@ wxWindow *wxWindowBase::DoFindFocus() void wxWindowGTK::AddChildGTK(wxWindowGTK* child) { wxASSERT_MSG(m_wxwindow, "Cannot add a child to a window without a client area"); - + // the window might have been scrolled already, we // have to adapt the position wxPizza* pizza = WX_PIZZA(m_wxwindow); @@ -2443,9 +2443,9 @@ bool wxWindowGTK::Destroy() void wxWindowGTK::DoMoveWindow(int x, int y, int width, int height) { gtk_widget_set_size_request(m_widget, width, height); - + // inform the parent to perform the move - wxASSERT_MSG(m_parent && m_parent->m_wxwindow, + wxASSERT_MSG(m_parent && m_parent->m_wxwindow, "the parent window has no client area?"); WX_PIZZA(m_parent->m_wxwindow)->move(m_widget, x, y); } @@ -2542,7 +2542,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags event.SetEventObject( this ); HandleWindowEvent( event ); } - } else + } else if (sizeFlags & wxSIZE_FORCE_EVENT) { wxSizeEvent event( wxSize(m_width,m_height), GetId() ); @@ -3599,7 +3599,7 @@ void wxWindowGTK::Update() gdk_display_sync(display); gdk_window_process_updates(m_widget->window, TRUE); - + // Flush again, but no need to wait for it to finish gdk_display_flush(display); } diff --git a/src/gtk1/bmpbuttn.cpp b/src/gtk1/bmpbuttn.cpp index a0f54cd27f..18d3951163 100644 --- a/src/gtk1/bmpbuttn.cpp +++ b/src/gtk1/bmpbuttn.cpp @@ -203,9 +203,9 @@ void wxBitmapButton::OnSetBitmap() if (!the_one.IsOk()) { - the_one = GetBitmapLabel(); - if (!the_one.IsOk()) - return; + the_one = GetBitmapLabel(); + if (!the_one.IsOk()) + return; } GdkBitmap *mask = NULL; diff --git a/src/gtk1/dnd.cpp b/src/gtk1/dnd.cpp index 5f3b30f9fa..d21b31386a 100644 --- a/src/gtk1/dnd.cpp +++ b/src/gtk1/dnd.cpp @@ -848,7 +848,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags) // don't start dragging if no button is down if (g_lastButtonNumber == 0) return wxDragNone; - + // we can only start a drag after a mouse event if (g_lastMouseEvent == NULL) return wxDragNone; diff --git a/src/gtk1/main.cpp b/src/gtk1/main.cpp index 96d7e9e4b6..d12f7cda27 100644 --- a/src/gtk1/main.cpp +++ b/src/gtk1/main.cpp @@ -6,7 +6,7 @@ // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/src/gtk1/statbmp.cpp b/src/gtk1/statbmp.cpp index afd002c187..e9ee469e1e 100644 --- a/src/gtk1/statbmp.cpp +++ b/src/gtk1/statbmp.cpp @@ -37,7 +37,7 @@ wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap // empty bitmap, so that we can create GtkPixmap widget: static char * bogus_xpm[] = { "2 2 1 1", -" c None", +" c None", " ", " "}; diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 5155113810..63b2988e61 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -714,9 +714,9 @@ wxString wxHtmlHelpData::FindPageByName(const wxString& x) break; } } - + int cnt = m_bookRecords.GetCount(); - + if (!has_non_ascii) { wxFileSystem fsys; diff --git a/src/html/helpfrm.cpp b/src/html/helpfrm.cpp index 63f4c1ae47..12437a80e3 100644 --- a/src/html/helpfrm.cpp +++ b/src/html/helpfrm.cpp @@ -100,7 +100,7 @@ bool wxHtmlHelpFrame::Create(wxWindow* parent, wxWindowID id, m_HtmlHelpWin->SetController(m_helpController); if ( config) m_HtmlHelpWin->UseConfig(config, rootpath); - + wxFrame::Create(parent, id, _("Help"), wxPoint(m_HtmlHelpWin->GetCfgData().x, m_HtmlHelpWin->GetCfgData().y), wxSize(m_HtmlHelpWin->GetCfgData().w, m_HtmlHelpWin->GetCfgData().h), diff --git a/src/html/htmlcell.cpp b/src/html/htmlcell.cpp index a661db2cc5..489375df7e 100644 --- a/src/html/htmlcell.cpp +++ b/src/html/htmlcell.cpp @@ -1126,7 +1126,7 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, if (m_Border == 1) { - // draw thin border using lines + // draw thin border using lines wxPen mypen1(m_BorderColour1, 1, wxPENSTYLE_SOLID); wxPen mypen2(m_BorderColour2, 1, wxPENSTYLE_SOLID); @@ -1138,10 +1138,10 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, dc.DrawLine(xlocal, ylocal + m_Height - 1, xlocal + m_Width, ylocal + m_Height - 1); } else if (m_Border> 0) - { + { wxBrush mybrush1(m_BorderColour1, wxBRUSHSTYLE_SOLID); wxBrush mybrush2(m_BorderColour2, wxBRUSHSTYLE_SOLID); - + // draw upper left corner // 0---------------5 // | / @@ -1149,7 +1149,7 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, // | | // | 2 // |/ - // 1 + // 1 wxPoint poly[6]; poly[0].x =m_PosX; poly[0].y = m_PosY ; @@ -1162,7 +1162,7 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, dc.SetBrush(mybrush1); dc.SetPen(*wxTRANSPARENT_PEN); dc.DrawPolygon(6, poly, x, y); - + // draw lower right corner reusing point 1,2,4 and 5 // 5 // /| @@ -1176,11 +1176,11 @@ void wxHtmlContainerCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2, poly[3].x = poly[4].x; poly[3].y = poly[2].y; dc.DrawPolygon(6, poly, x, y); - // smooth color transition like firefox + // smooth color transition like firefox wxColour borderMediumColour( (m_BorderColour1.Red() + m_BorderColour2.Red()) /2 , (m_BorderColour1.Green() + m_BorderColour2.Green()) /2 , - (m_BorderColour1.Blue() + m_BorderColour2.Blue()) /2 + (m_BorderColour1.Blue() + m_BorderColour2.Blue()) /2 ); wxPen mypen3(borderMediumColour, 1, wxPENSTYLE_SOLID); dc.SetPen(mypen3); diff --git a/src/html/htmlfilt.cpp b/src/html/htmlfilt.cpp index f564086ae4..0baea69675 100644 --- a/src/html/htmlfilt.cpp +++ b/src/html/htmlfilt.cpp @@ -158,7 +158,7 @@ wxString wxHtmlFilterHTML::ReadFile(const wxFSFile& file) const s->Read( buf.data(), size ); *(buf.data() + size) = 0; wxString tmpdoc( buf, wxConvISO8859_1); - + wxString charset = wxHtmlParser::ExtractCharsetInformation(tmpdoc); if (charset.empty()) doc = tmpdoc; diff --git a/src/html/winpars.cpp b/src/html/winpars.cpp index ac32fb27bf..cb07b1d0be 100644 --- a/src/html/winpars.cpp +++ b/src/html/winpars.cpp @@ -202,7 +202,7 @@ void wxHtmlWinParser::InitParser(const wxString& source) m_FontBold = m_FontItalic = m_FontUnderlined = m_FontFixed = FALSE; m_FontSize = 3; //default one CreateCurrentFont(); // we're selecting default font into - + // we're not using GetCharWidth/Height() because of // differences under X and win wxCoord w,h; diff --git a/src/motif/cursor.cpp b/src/motif/cursor.cpp index 68f66e43e2..4500e6ebc2 100644 --- a/src/motif/cursor.cpp +++ b/src/motif/cursor.cpp @@ -246,8 +246,8 @@ wxCursor::wxCursor(const char bits[], int width, int height, Create(bits, width, height, hotSpotX, hotSpotY, maskBits); } -wxCursor::wxCursor(const wxString& name, wxBitmapType type, int hotSpotX, - int hotSpotY ) +wxCursor::wxCursor(const wxString& name, wxBitmapType type, + int hotSpotX, int hotSpotY) { // Must be an XBM file if (type != wxBITMAP_TYPE_XBM) { diff --git a/src/motif/main.cpp b/src/motif/main.cpp index f904fa1f1e..9a50fb1d11 100644 --- a/src/motif/main.cpp +++ b/src/motif/main.cpp @@ -6,7 +6,7 @@ // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // We don't put main() in the library any more. GD. diff --git a/src/motif/statbox.cpp b/src/motif/statbox.cpp index 6fdcb4c5d2..1a175f9910 100644 --- a/src/motif/statbox.cpp +++ b/src/motif/statbox.cpp @@ -117,7 +117,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, #endif NULL); } - + PostCreation(); AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y); diff --git a/src/msw/bitmap.cpp b/src/msw/bitmap.cpp index 349bc1641c..850baa8602 100644 --- a/src/msw/bitmap.cpp +++ b/src/msw/bitmap.cpp @@ -837,7 +837,7 @@ bool wxBitmap::CreateFromImage(const wxImage& image, int depth, WXHDC hdc) return false; const bool hasAlpha = image.HasAlpha(); - + if (depth == -1) depth = dib.GetDepth(); diff --git a/src/msw/bmpcbox.cpp b/src/msw/bmpcbox.cpp index 852fb0485a..8e6496094a 100644 --- a/src/msw/bmpcbox.cpp +++ b/src/msw/bmpcbox.cpp @@ -308,7 +308,7 @@ bool wxBitmapComboBox::OnAddBitmap(const wxBitmap& bitmap) return true; } - + return false; } @@ -365,7 +365,7 @@ bool wxBitmapComboBox::MSWOnDraw(WXDRAWITEMSTRUCT *item) if ( pos == -1 ) return FALSE; - int flags = 0; + int flags = 0; if ( lpDrawItem->itemState & ODS_COMBOBOXEDIT ) flags |= wxODCB_PAINTING_CONTROL; if ( lpDrawItem->itemState & ODS_SELECTED ) diff --git a/src/msw/calctrl.cpp b/src/msw/calctrl.cpp index 3fcc49f0c1..cf0de6e223 100644 --- a/src/msw/calctrl.cpp +++ b/src/msw/calctrl.cpp @@ -117,7 +117,7 @@ wxCalendarCtrl::Create(wxWindow *parent, if ( !MSWCreateControl(clsname, wxEmptyString, pos, size) ) return false; - // initialize the control + // initialize the control UpdateFirstDayOfWeek(); SetDate(dt.IsValid() ? dt : wxDateTime::Today()); diff --git a/src/msw/control.cpp b/src/msw/control.cpp index 1fac8d1ed2..dbefd0d91f 100644 --- a/src/msw/control.cpp +++ b/src/msw/control.cpp @@ -245,7 +245,7 @@ wxSize wxControl::DoGetBestSize() const { if (m_windowSizer) return wxControlBase::DoGetBestSize(); - + return wxSize(DEFAULT_ITEM_WIDTH, DEFAULT_ITEM_HEIGHT); } diff --git a/src/msw/dcmemory.cpp b/src/msw/dcmemory.cpp index 75e28e8b32..c84983ad85 100644 --- a/src/msw/dcmemory.cpp +++ b/src/msw/dcmemory.cpp @@ -40,23 +40,23 @@ IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxMSWDCImpl) -wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) +wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) : wxMSWDCImpl( owner ) { - CreateCompatible(NULL); - Init(); + CreateCompatible(NULL); + Init(); } -wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ) - : wxMSWDCImpl( owner ) -{ - CreateCompatible(NULL); - Init(); +wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ) + : wxMSWDCImpl( owner ) +{ + CreateCompatible(NULL); + Init(); DoSelect(bitmap); } wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ) - : wxMSWDCImpl( owner ) + : wxMSWDCImpl( owner ) { wxCHECK_RET( dc, wxT("NULL dc in wxMemoryDC ctor") ); diff --git a/src/msw/dir.cpp b/src/msw/dir.cpp index 5404038be8..d7302d23c7 100644 --- a/src/msw/dir.cpp +++ b/src/msw/dir.cpp @@ -311,7 +311,7 @@ wxDir::wxDir(const wxString& dirname) bool wxDir::Open(const wxString& dirname) { delete M_DIR; - + // The Unix code does a similar test if (wxDirExists(dirname)) { @@ -322,7 +322,7 @@ bool wxDir::Open(const wxString& dirname) else { m_data = NULL; - + return false; } } diff --git a/src/msw/evtloop.cpp b/src/msw/evtloop.cpp index 0b6bf66a1a..6d8ecdd7c2 100644 --- a/src/msw/evtloop.cpp +++ b/src/msw/evtloop.cpp @@ -401,7 +401,7 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess) if ((eventsToProcess & wxEVT_CATEGORY_UI) == 0) { // this msg is not going to be dispatched... - // however WM_PAINT is special: until there are damaged + // however WM_PAINT is special: until there are damaged // windows, Windows will keep sending it forever! if (nPaintsReceived > 10) { @@ -430,9 +430,9 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess) switch (msg.message) { #if !defined(__WXWINCE__) - case WM_NCMOUSEMOVE: + case WM_NCMOUSEMOVE: - case WM_NCLBUTTONDOWN: + case WM_NCLBUTTONDOWN: case WM_NCLBUTTONUP: case WM_NCLBUTTONDBLCLK: case WM_NCRBUTTONDOWN: diff --git a/src/msw/graphics.cpp b/src/msw/graphics.cpp index 93ee67ba19..3b5317b7c0 100644 --- a/src/msw/graphics.cpp +++ b/src/msw/graphics.cpp @@ -298,7 +298,7 @@ public: virtual void StrokePath( const wxGraphicsPath& p ); virtual void FillPath( const wxGraphicsPath& p , wxPolygonFillMode fillStyle = wxODDEVEN_RULE ); - // stroke lines connecting each of the points + // stroke lines connecting each of the points virtual void StrokeLines( size_t n, const wxPoint2DDouble *points); // draws a polygon @@ -311,7 +311,7 @@ public: virtual void BeginLayer(wxDouble opacity); virtual void EndLayer(); - + virtual void Translate( wxDouble dx , wxDouble dy ); virtual void Scale( wxDouble xScale , wxDouble yScale ); virtual void Rotate( wxDouble angle ); @@ -1121,19 +1121,19 @@ void wxGDIPlusContext::StrokeLines( size_t n, const wxPoint2DDouble *points) if (m_composition == wxCOMPOSITION_DEST) return; - if ( !m_pen.IsNull() ) - { - wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() ); - Point *cpoints = new Point[n]; - for (size_t i = 0; i < n; i++) - { - cpoints[i].X = (int)(points[i].m_x ); - cpoints[i].Y = (int)(points[i].m_y ); - - } // for (size_t i = 0; i < n; i++) - m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ; - delete[] cpoints; - } + if ( !m_pen.IsNull() ) + { + wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() ); + Point *cpoints = new Point[n]; + for (size_t i = 0; i < n; i++) + { + cpoints[i].X = (int)(points[i].m_x ); + cpoints[i].Y = (int)(points[i].m_y ); + + } // for (size_t i = 0; i < n; i++) + m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ; + delete[] cpoints; + } } void wxGDIPlusContext::DrawLines( size_t n, const wxPoint2DDouble *points, wxPolygonFillMode WXUNUSED(fillStyle) ) @@ -1142,18 +1142,18 @@ void wxGDIPlusContext::DrawLines( size_t n, const wxPoint2DDouble *points, wxPol return; wxGDIPlusOffsetHelper helper( m_context , ShouldOffset() ); - Point *cpoints = new Point[n]; - for (size_t i = 0; i < n; i++) - { - cpoints[i].X = (int)(points[i].m_x ); - cpoints[i].Y = (int)(points[i].m_y ); + Point *cpoints = new Point[n]; + for (size_t i = 0; i < n; i++) + { + cpoints[i].X = (int)(points[i].m_x ); + cpoints[i].Y = (int)(points[i].m_y ); - } // for (int i = 0; i < n; i++) - if ( !m_brush.IsNull() ) - m_context->FillPolygon( ((wxGDIPlusBrushData*)m_brush.GetRefData())->GetGDIPlusBrush() , cpoints , n ) ; - if ( !m_pen.IsNull() ) - m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ; - delete[] cpoints; + } // for (int i = 0; i < n; i++) + if ( !m_brush.IsNull() ) + m_context->FillPolygon( ((wxGDIPlusBrushData*)m_brush.GetRefData())->GetGDIPlusBrush() , cpoints , n ) ; + if ( !m_pen.IsNull() ) + m_context->DrawLines( ((wxGDIPlusPenData*)m_pen.GetGraphicsData())->GetGDIPlusPen() , cpoints , n ) ; + delete[] cpoints; } void wxGDIPlusContext::StrokePath( const wxGraphicsPath& path ) @@ -1186,9 +1186,9 @@ bool wxGDIPlusContext::SetAntialiasMode(wxAntialiasMode antialias) { if (m_antialias == antialias) return true; - + m_antialias = antialias; - + SmoothingMode antialiasMode; switch (antialias) { @@ -1209,9 +1209,9 @@ bool wxGDIPlusContext::SetCompositionMode(wxCompositionMode op) { if ( m_composition == op ) return true; - + m_composition = op; - + if (m_composition == wxCOMPOSITION_DEST) return true; @@ -1240,7 +1240,7 @@ void wxGDIPlusContext::BeginLayer(wxDouble /* opacity */) void wxGDIPlusContext::EndLayer() { // TODO -} +} void wxGDIPlusContext::Rotate( wxDouble angle ) { diff --git a/src/msw/imaglist.cpp b/src/msw/imaglist.cpp index a9108a1b39..b499da63b5 100644 --- a/src/msw/imaglist.cpp +++ b/src/msw/imaglist.cpp @@ -247,7 +247,7 @@ bool wxImageList::Draw(int index, wxMSWDCImpl *msw_impl = wxDynamicCast( impl, wxMSWDCImpl ); if (!msw_impl) return false; - + HDC hDC = GetHdcOf(*msw_impl); wxCHECK_MSG( hDC, false, wxT("invalid wxDC in wxImageList::Draw") ); diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 37189a7e65..015b6946f4 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -254,7 +254,7 @@ WXDWORD wxListBox::MSWGetStyle(long style, WXDWORD *exstyle) const void wxListBox::OnInternalIdle() { wxWindow::OnInternalIdle(); - + if (m_updateHorizontalExtent) { SetHorizontalExtent(wxEmptyString); diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp index 4b978f8695..e63e55038e 100644 --- a/src/msw/ole/droptgt.cpp +++ b/src/msw/ole/droptgt.cpp @@ -102,7 +102,7 @@ static DWORD ConvertDragResultToEffect(wxDragResult result); // Params : [in] DWORD flags kbd & mouse flags as passed to // IDropTarget methods // [in] wxDragResult defaultAction the default action of the drop target -// [in] DWORD pdwEffect the supported actions of the drop +// [in] DWORD pdwEffect the supported actions of the drop // source passed to IDropTarget methods // Notes : We do "move" normally and "copy" if is pressed, // which is the standard behaviour (currently there is no @@ -201,7 +201,7 @@ STDMETHODIMP wxIDropTarget::DragEnter(IDataObject *pIDataSource, // for use in OnEnter and OnDrag calls m_pTarget->MSWSetDataSource(pIDataSource); - + // get hold of the data object m_pIDataObject = pIDataSource; m_pIDataObject->AddRef(); diff --git a/src/msw/settings.cpp b/src/msw/settings.cpp index 0092138732..ea2e76c0c0 100644 --- a/src/msw/settings.cpp +++ b/src/msw/settings.cpp @@ -208,7 +208,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) colSys = ::GetSysColor(index); #endif } - + wxColour ret = wxRGBToColour(colSys); wxASSERT(ret.IsOk()); return ret; @@ -270,7 +270,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) gs_fontDefault = new wxFont(wxCreateFontFromStockObject(SYSTEM_FONT)); } - wxASSERT(gs_fontDefault->IsOk() && + wxASSERT(gs_fontDefault->IsOk() && wxFontEnumerator::IsValidFacename(gs_fontDefault->GetFaceName())); return *gs_fontDefault; #else // !__WXWINCE__ diff --git a/src/msw/tglbtn.cpp b/src/msw/tglbtn.cpp index 0ae12ccdf3..edadc6a1ef 100644 --- a/src/msw/tglbtn.cpp +++ b/src/msw/tglbtn.cpp @@ -82,9 +82,9 @@ bool wxBitmapToggleButton::Create( wxWindow *parent, wxWindowID id, if (!wxToggleButtonBase::Create( parent, id, pos, size, style, validator, name )) return false; - + m_bitmap = label; - + if (size.x == -1 || size.y == -1) { wxSize new_size = GetBestSize(); @@ -94,7 +94,7 @@ bool wxBitmapToggleButton::Create( wxWindow *parent, wxWindowID id, new_size.y = size.y; SetSize( new_size ); } - + return true; } @@ -103,7 +103,7 @@ void wxBitmapToggleButton::SetValue(bool state) if (m_capturing) return; if (state == m_depressed) return; - + m_depressed = state; Refresh(); } @@ -117,7 +117,7 @@ void wxBitmapToggleButton::SetLabel(const wxBitmap& label) { m_bitmap = label; m_disabledBitmap = wxBitmap(); - + Refresh(); } @@ -127,18 +127,18 @@ bool wxBitmapToggleButton::Enable(bool enable) if (!wxToggleButtonBase::Enable( enable )) return false; - + Refresh(); - + return true; } void wxBitmapToggleButton::OnPaint(wxPaintEvent &WXUNUSED(event)) { wxSize size = GetSize(); - + wxBitmap bitmap = m_bitmap; - + wxPaintDC dc(this); wxRendererNative &renderer = wxRendererNative::Get(); int flags = 0; @@ -146,7 +146,7 @@ void wxBitmapToggleButton::OnPaint(wxPaintEvent &WXUNUSED(event)) flags |= wxCONTROL_PRESSED; wxRect rect(0,0,size.x,size.y); renderer.DrawPushButton( this, dc, rect, flags ); - + if (bitmap.IsOk()) { if (!IsEnabled()) @@ -156,27 +156,27 @@ void wxBitmapToggleButton::OnPaint(wxPaintEvent &WXUNUSED(event)) wxImage image = m_bitmap.ConvertToImage(); m_disabledBitmap = wxBitmap( image.ConvertToGreyscale() ); } - + bitmap = m_disabledBitmap; } - + wxSize bsize = bitmap.GetSize(); int offset = 0; if (m_depressed) offset = 1; dc.DrawBitmap( bitmap, (size.x-bsize.x) / 2 + offset, (size.y-bsize.y) / 2 + offset, true ); } - + } void wxBitmapToggleButton::OnMouse(wxMouseEvent &event) { if (!IsEnabled()) return; - + wxSize size = GetSize(); - bool mouse_in = ((event.GetX() > 0) && (event.GetX() < size.x) && + bool mouse_in = ((event.GetX() > 0) && (event.GetX() < size.x) && (event.GetY() > 0) && (event.GetY() < size.y)); - + if (m_capturing) { bool old_depressed = m_depressed; @@ -184,7 +184,7 @@ void wxBitmapToggleButton::OnMouse(wxMouseEvent &event) m_depressed = !m_oldValue; else m_depressed = m_oldValue; - + if (event.LeftUp()) { ReleaseCapture(); @@ -197,7 +197,7 @@ void wxBitmapToggleButton::OnMouse(wxMouseEvent &event) ProcessCommand(event); } } - + if (old_depressed != m_depressed) Refresh(); } @@ -220,7 +220,7 @@ void wxBitmapToggleButton::OnChar(wxKeyEvent &event) { m_depressed = !m_depressed; Refresh(); - + wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, m_windowId); event.SetInt(GetValue()); event.SetEventObject(this); @@ -237,7 +237,7 @@ wxSize wxBitmapToggleButton::DoGetBestSize() const { if (!m_bitmap.IsOk()) return wxSize(16,16); - + wxSize ret = m_bitmap.GetSize(); ret.x += 8; ret.y += 8; diff --git a/src/msw/tooltip.cpp b/src/msw/tooltip.cpp index 5f8221238b..f43fed3843 100644 --- a/src/msw/tooltip.cpp +++ b/src/msw/tooltip.cpp @@ -105,10 +105,10 @@ public: { // this tooltip must be shown only if the mouse hovers a specific rect // of the hwnd parameter! - rect.left = rc.GetLeft(); - rect.right = rc.GetRight(); - rect.top = rc.GetTop(); - rect.bottom = rc.GetBottom(); + rect.left = rc.GetLeft(); + rect.right = rc.GetRight(); + rect.top = rc.GetTop(); + rect.bottom = rc.GetBottom(); // note that not setting TTF_IDISHWND from the uFlags member means that the // ti.uId field should not contain the HWND but rather as MSDN says an diff --git a/src/msw/utilsgui.cpp b/src/msw/utilsgui.cpp index f016cd3a7b..513a56f810 100644 --- a/src/msw/utilsgui.cpp +++ b/src/msw/utilsgui.cpp @@ -437,7 +437,7 @@ bool wxLaunchDefaultApplication(const wxString& document, int flags) bool wxDoLaunchDefaultBrowser(const wxString& url, const wxString& scheme, int flags) { wxUnusedVar(flags); - + #if wxUSE_IPC if ( flags & wxBROWSER_NEW_WINDOW ) { diff --git a/src/msw/wince/tbarwce.cpp b/src/msw/wince/tbarwce.cpp index 1e49fa48fd..4850dd6638 100644 --- a/src/msw/wince/tbarwce.cpp +++ b/src/msw/wince/tbarwce.cpp @@ -275,7 +275,7 @@ bool wxToolMenuBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool) // Skip over the menus if (GetMenuBar()) pos += GetMenuBar()->GetMenuCount(); - + // the main difficulty we have here is with the controls in the toolbars: // as we (sometimes) use several separators to cover up the space used by // them, the indices are not the same for us and the toolbar diff --git a/src/os2/bitmap.cpp b/src/os2/bitmap.cpp index 48f804ef1e..f8ae3d715d 100644 --- a/src/os2/bitmap.cpp +++ b/src/os2/bitmap.cpp @@ -917,7 +917,7 @@ wxImage wxBitmap::ConvertToImage() const // May already be selected into a PS // pDC = GetSelectedInto(); - const wxPMDCImpl *impl; + const wxPMDCImpl *impl; if (pDC != NULL && (impl = wxDynamicCast( pDC->GetImpl(), wxPMDCImpl )) != NULL) { diff --git a/src/os2/dc.cpp b/src/os2/dc.cpp index 0b8cd600b5..228e231c5f 100644 --- a/src/os2/dc.cpp +++ b/src/os2/dc.cpp @@ -2160,10 +2160,10 @@ void wxPMDCImpl::DoGetTextExtent( // if (!m_hPS) { - (void)wxMessageBox( wxT("wxWidgets core library") - ,"Using uninitialized DC for measuring text!\n" - ,wxICON_INFORMATION - ); + (void)wxMessageBox( wxT("wxWidgets core library") + ,"Using uninitialized DC for measuring text!\n" + ,wxICON_INFORMATION + ); } bRc = ::GpiQueryTextBox( m_hPS diff --git a/src/os2/dcmemory.cpp b/src/os2/dcmemory.cpp index 88bda87c90..ccddc30e76 100644 --- a/src/os2/dcmemory.cpp +++ b/src/os2/dcmemory.cpp @@ -29,23 +29,23 @@ IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxPMDCImpl) // Memory DC ///////////////////////////////////////////////////////////////////////////// -wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) +wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) : wxPMDCImpl( owner ) { - CreateCompatible(NULL); - Init(); + CreateCompatible(NULL); + Init(); } -wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ) - : wxPMDCImpl( owner ) -{ - CreateCompatible(NULL); - Init(); +wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ) + : wxPMDCImpl( owner ) +{ + CreateCompatible(NULL); + Init(); DoSelect(bitmap); } wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *pOldDC) - : wxPMDCImpl( owner ) + : wxPMDCImpl( owner ) { wxCHECK_RET( pOldDC, wxT("NULL dc in wxMemoryDC ctor") ); diff --git a/src/os2/evtloop.cpp b/src/os2/evtloop.cpp index 01916125ea..f95901cd6a 100644 --- a/src/os2/evtloop.cpp +++ b/src/os2/evtloop.cpp @@ -404,7 +404,7 @@ bool wxGUIEventLoop::YieldFor(long eventsToProcess) if (wxTheApp) { wxTheApp->ProcessPendingEvents(); - wxTheApp->HandleSockets(); + wxTheApp->HandleSockets(); } // diff --git a/src/os2/listbox.cpp b/src/os2/listbox.cpp index 51af18eca3..2c636032e0 100644 --- a/src/os2/listbox.cpp +++ b/src/os2/listbox.cpp @@ -305,7 +305,7 @@ int wxListBox::DoInsertItems(const wxArrayStringsAdapter & items, { wxOwnerDrawn* pNewItem = CreateItem(n); // dummy argument wxScreenDC vDc; // FIXME: is it really needed here? - + pNewItem->SetName(items[i]); m_aItems.Insert(pNewItem, n); pNewItem->SetFont(GetFont()); diff --git a/src/os2/ownerdrw.cpp b/src/os2/ownerdrw.cpp index 8f7d425b09..04cec30e30 100644 --- a/src/os2/ownerdrw.cpp +++ b/src/os2/ownerdrw.cpp @@ -156,7 +156,7 @@ bool wxOwnerDrawn::OnMeasureItem( size_t* pWidth, // Make sure that this item is at least as // tall as the user's system settings specify // - const size_t heightStd = 6; // FIXME: get value from the system + const size_t heightStd = 6; // FIXME: get value from the system if ( *pHeight < heightStd ) *pHeight = heightStd; m_nHeight = *pHeight; // remember height for use in OnDrawItem diff --git a/src/os2/utils.cpp b/src/os2/utils.cpp index 093e192362..adf5aab3da 100644 --- a/src/os2/utils.cpp +++ b/src/os2/utils.cpp @@ -84,7 +84,7 @@ bool wxGetHostName( wxChar* zBuf, int nMaxSize ) const wxChar* zDefaultHost = wxT("noname"); if ((zSysname = wxGetenv(wxT("SYSTEM_NAME"))) == NULL && - (zSysname = wxGetenv(wxT("HOSTNAME"))) == NULL) + (zSysname = wxGetenv(wxT("HOSTNAME"))) == NULL) { ::PrfQueryProfileString( HINI_PROFILE ,(PSZ)WX_SECTION @@ -240,14 +240,14 @@ bool wxGetEnv(const wxString& var, wxString *value) static bool wxDoSetEnv(const wxString& variable, const char *value) { #if defined(HAVE_SETENV) - if ( !value ) - { -#ifdef HAVE_UNSETENV - return unsetenv(variable.mb_str()) == 0; -#else - value = wxT(""); // mustn't pass NULL to setenv() -#endif - } + if ( !value ) + { +#ifdef HAVE_UNSETENV + return unsetenv(variable.mb_str()) == 0; +#else + value = wxT(""); // mustn't pass NULL to setenv() +#endif + } return setenv(variable.mb_str(), value, 1 /* overwrite */) == 0; #elif defined(HAVE_PUTENV) wxString s = variable; @@ -474,7 +474,7 @@ bool wxGetDiskSpace(const wxString& path, { // to try to avoid 32-bit overflow, let's not multiply right away // (num of alloc units) - *pTotal = fsaBuf.cUnit; + *pTotal = fsaBuf.cUnit; // * (num of sectors per alloc unit) * (num of bytes per sector) (*pTotal) *= fsaBuf.cSectorUnit * fsaBuf.cbSector; } @@ -486,7 +486,7 @@ bool wxGetDiskSpace(const wxString& path, return true; } } - + wxString wxPMErrorToStr(ERRORID vError) { wxString sError; diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 240666554d..7a44b19018 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -3224,7 +3224,7 @@ bool wxWindowOS2::OS2OnDrawItem( int vId, ,pMeasureStruct->rclItem.yTop - pMeasureStruct->rclItem.yBottom ); - wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl(); + wxPMDCImpl *impl = (wxPMDCImpl*) vDc.GetImpl(); impl->SetHDC( hDC, false ); impl->SetHPS( pMeasureStruct->hps ); // diff --git a/src/osx/accel.cpp b/src/osx/accel.cpp index 08e8140cdd..163fcf4107 100644 --- a/src/osx/accel.cpp +++ b/src/osx/accel.cpp @@ -95,7 +95,7 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) if ((event.m_keyCode == entry->GetKeyCode()) && (((entry->GetFlags() & wxACCEL_CTRL) != 0) == event.ControlDown()) && (((entry->GetFlags() & wxACCEL_SHIFT) != 0) == event.ShiftDown()) && - (((entry->GetFlags() & wxACCEL_ALT) != 0) == event.AltDown()) && + (((entry->GetFlags() & wxACCEL_ALT) != 0) == event.AltDown()) && (((entry->GetFlags() & wxACCEL_CMD) != 0) == event.CmdDown())) { return entry->GetCommand(); diff --git a/src/osx/artmac.cpp b/src/osx/artmac.cpp index 8320c6f6a2..6b49934787 100644 --- a/src/osx/artmac.cpp +++ b/src/osx/artmac.cpp @@ -72,20 +72,20 @@ static wxIconBundle wxMacArtProvider_CreateIconBundle(const wxArtID& id) ART_MSGBOX(wxART_NORMAL_FILE, wxICON_NORMAL_FILE, deffile) ART_MSGBOX(wxART_EXECUTABLE_FILE, wxICON_EXECUTABLE_FILE, exefile) - ART_MSGBOX(wxART_CDROM, wxICON_CDROM, cdrom) - ART_MSGBOX(wxART_FLOPPY, wxICON_FLOPPY, floppy) - ART_MSGBOX(wxART_HARDDISK, wxICON_HARDDISK, harddisk) - ART_MSGBOX(wxART_REMOVABLE, wxICON_REMOVABLE, removable) - - ART_MSGBOX(wxART_DELETE, wxICON_DELETE, delete) - - ART_MSGBOX(wxART_GO_BACK, wxICON_GO_BACK, back) - ART_MSGBOX(wxART_GO_FORWARD, wxICON_GO_FORWARD, forward) - ART_MSGBOX(wxART_GO_HOME, wxICON_GO_HOME, home) - - ART_MSGBOX(wxART_HELP_SETTINGS, wxICON_HELP_SETTINGS, htmoptns) - ART_MSGBOX(wxART_HELP_PAGE, wxICON_HELP_PAGE, htmpage) - + ART_MSGBOX(wxART_CDROM, wxICON_CDROM, cdrom) + ART_MSGBOX(wxART_FLOPPY, wxICON_FLOPPY, floppy) + ART_MSGBOX(wxART_HARDDISK, wxICON_HARDDISK, harddisk) + ART_MSGBOX(wxART_REMOVABLE, wxICON_REMOVABLE, removable) + + ART_MSGBOX(wxART_DELETE, wxICON_DELETE, delete) + + ART_MSGBOX(wxART_GO_BACK, wxICON_GO_BACK, back) + ART_MSGBOX(wxART_GO_FORWARD, wxICON_GO_FORWARD, forward) + ART_MSGBOX(wxART_GO_HOME, wxICON_GO_HOME, home) + + ART_MSGBOX(wxART_HELP_SETTINGS, wxICON_HELP_SETTINGS, htmoptns) + ART_MSGBOX(wxART_HELP_PAGE, wxICON_HELP_PAGE, htmpage) + return wxNullIconBundle; } diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp index b831bc2bc3..e413badf97 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -835,8 +835,8 @@ bool wxApp::Initialize(int& argc, wxChar **argv) event_posted_context.perform = macPostedEventCallback; m_macEventPosted = CFRunLoopSourceCreate(NULL,0,&event_posted_context); CFRunLoopAddSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes); - // run loop takes ownership - CFRelease(m_macEventPosted); + // run loop takes ownership + CFRelease(m_macEventPosted); */ return true; } @@ -944,10 +944,10 @@ void wxApp::CleanUp() #endif if (m_macEventPosted) - { - CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes); - m_macEventPosted = NULL; - } + { + CFRunLoopRemoveSource(CFRunLoopGetCurrent(), m_macEventPosted, kCFRunLoopCommonModes); + m_macEventPosted = NULL; + } DoCleanUp(); @@ -1445,7 +1445,7 @@ void wxApp::MacCreateKeyEvent( wxKeyEvent& event, wxWindow* focus , long keymess // control interferes with some built-in keys like pgdown, return etc. therefore we remove the controlKey modifier // and look at the character after #ifdef __LP64__ - // TODO new implementation using TextInputSources + // TODO new implementation using TextInputSources #else UInt32 state = 0; UInt32 keyInfo = KeyTranslate((Ptr)GetScriptManagerVariable(smKCHRCache), ( modifiers & (~(controlKey | shiftKey | optionKey))) | keycode, &state); diff --git a/src/osx/carbon/button.cpp b/src/osx/carbon/button.cpp index b2f0567d2b..75fd896dd0 100644 --- a/src/osx/carbon/button.cpp +++ b/src/osx/carbon/button.cpp @@ -66,13 +66,13 @@ wxSize wxButton::DoGetBestSize() const OSStatus err = m_peer->GetData( kControlEntireControl, kControlFontStyleTag, &controlFont ); verify_noerr( err ); - // GetThemeTextDimensions will cache strings and the documentation - // says not to use the NoCopy string creation calls. - // This also means that we can't use CFSTR without - // -fno-constant-cfstrings if the library might be unloaded, - // as GetThemeTextDimensions may cache a pointer to our - // unloaded segment. - wxCFStringRef str( !m_label.empty() ? m_label : wxString(" "), + // GetThemeTextDimensions will cache strings and the documentation + // says not to use the NoCopy string creation calls. + // This also means that we can't use CFSTR without + // -fno-constant-cfstrings if the library might be unloaded, + // as GetThemeTextDimensions may cache a pointer to our + // unloaded segment. + wxCFStringRef str( !m_label.empty() ? m_label : wxString(" "), GetFont().GetEncoding() ); #if wxOSX_USE_ATSU_TEXT diff --git a/src/osx/carbon/checkbox.cpp b/src/osx/carbon/checkbox.cpp index 3dff92a7d5..346720b8ca 100644 --- a/src/osx/carbon/checkbox.cpp +++ b/src/osx/carbon/checkbox.cpp @@ -16,14 +16,14 @@ #include "wx/checkbox.h" #include "wx/osx/uma.h" -wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), const wxString& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, - long WXUNUSED(extraStyle)) + long style, + long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ) ; wxMacControl* peer = new wxMacControl(wxpeer) ; diff --git a/src/osx/carbon/choice.cpp b/src/osx/carbon/choice.cpp index 1985f81205..4bacff29a7 100644 --- a/src/osx/carbon/choice.cpp +++ b/src/osx/carbon/choice.cpp @@ -30,25 +30,25 @@ public : wxMacChoiceCarbonControl( wxWindowMac* peer ) : wxMacControl( peer ) { } - + void SetValue(wxInt32 v) { wxMacControl::SetValue( v + 1 ); } - + wxInt32 GetValue() const { return wxMacControl::GetValue() - 1; } }; -wxWidgetImplType* wxWidgetImpl::CreateChoice( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateChoice( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), wxMenu* menu, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ); diff --git a/src/osx/carbon/colordlg.cpp b/src/osx/carbon/colordlg.cpp index 4a226c357a..6ec1b9e15a 100644 --- a/src/osx/carbon/colordlg.cpp +++ b/src/osx/carbon/colordlg.cpp @@ -48,13 +48,13 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) int wxColourDialog::ShowModal() { RGBColor currentColor ; - + m_colourData.m_dataColour.GetRGBColor( ¤tColor ); NColorPickerInfo info; OSStatus err ; memset(&info, 0, sizeof(info)) ; // TODO : use parent to determine better position and then kAtSpecifiedOrigin - info.placeWhere = kCenterOnMainScreen ; + info.placeWhere = kCenterOnMainScreen ; info.flags = kColorPickerDialogIsMoveable | kColorPickerDialogIsModal ; info.theColor.color.rgb.red = currentColor.red ; info.theColor.color.rgb.green = currentColor.green ; diff --git a/src/osx/carbon/combobox.cpp b/src/osx/carbon/combobox.cpp index a3a419dc6e..f8223c9108 100644 --- a/src/osx/carbon/combobox.cpp +++ b/src/osx/carbon/combobox.cpp @@ -150,7 +150,7 @@ protected: event.Skip(); } - + private: wxComboBox *m_cb; @@ -292,7 +292,7 @@ void wxComboBox::DoMoveWindow(int x, int y, int width, int height) m_text->SetSize(TEXTFOCUSBORDER, TEXTFOCUSBORDER, wText, -1); wxSize tSize = m_text->GetSize(); wxSize cSize = m_choice->GetSize(); - + int yOffset = ( tSize.y + 2 * TEXTFOCUSBORDER - cSize.y ) / 2; // put it at an inset of 1 to have outer area shadows drawn as well @@ -402,7 +402,7 @@ bool wxComboBox::Create(wxWindow *parent, } void wxComboBox::EnableTextChangedEvents(bool enable) -{ +{ if ( m_text ) m_text->ForwardEnableTextChangedEvents(enable); } diff --git a/src/osx/carbon/cursor.cpp b/src/osx/carbon/cursor.cpp index 0086d4ade1..1d9d6f7f1a 100644 --- a/src/osx/carbon/cursor.cpp +++ b/src/osx/carbon/cursor.cpp @@ -654,7 +654,7 @@ void wxCursor::InitFromStock(wxStockCursor cursor_type) case wxCURSOR_CLOSED_HAND: M_CURSORDATA->m_themeCursor = kThemeClosedHandCursor; break; - + case wxCURSOR_CHAR: case wxCURSOR_ARROW: case wxCURSOR_LEFT_BUTTON: diff --git a/src/osx/carbon/dataobj.cpp b/src/osx/carbon/dataobj.cpp index e58a05f0b5..a65b2b7dfe 100644 --- a/src/osx/carbon/dataobj.cpp +++ b/src/osx/carbon/dataobj.cpp @@ -158,27 +158,27 @@ void wxDataFormat::SetId( NativeFormat format ) m_format = 0; } m_format = (NativeFormat) CFStringCreateCopy(NULL, (CFStringRef)format); - if ( UTTypeConformsTo( (CFStringRef)format, CFSTR("public.utf16-plain-text") ) ) + if ( UTTypeConformsTo( (CFStringRef)format, CFSTR("public.utf16-plain-text") ) ) { m_type = wxDF_UNICODETEXT; - } + } else if ( UTTypeConformsTo( (CFStringRef)format, CFSTR("public.plain-text") ) ) { m_type = wxDF_TEXT; } - else if ( UTTypeConformsTo( (CFStringRef)format, CFSTR("public.tiff") ) ) + else if ( UTTypeConformsTo( (CFStringRef)format, CFSTR("public.tiff") ) ) { m_type = wxDF_BITMAP; } - else if ( UTTypeConformsTo( (CFStringRef)format, CFSTR("com.adobe.pdf") ) ) + else if ( UTTypeConformsTo( (CFStringRef)format, CFSTR("com.adobe.pdf") ) ) { m_type = wxDF_METAFILE; } - else if ( UTTypeConformsTo( (CFStringRef)format, CFSTR("public.file-url") ) ) + else if ( UTTypeConformsTo( (CFStringRef)format, CFSTR("public.file-url") ) ) { m_type = wxDF_FILENAME; } - else + else { m_type = wxDF_PRIVATE; m_id = wxCFStringRef( (CFStringRef) CFRetain((CFStringRef) format )).AsString(); @@ -253,11 +253,11 @@ void wxDataObject::AddToPasteboard( void * pb, int itemID ) for (size_t i = 0; i < GetFormatCount(); i++) { wxDataFormat thisFormat = array[ i ]; - - // add four bytes at the end for data objs like text that + + // add four bytes at the end for data objs like text that // have a datasize = strlen but still need a buffer for the // string including trailing zero - + size_t datasize = GetDataSize( thisFormat ); size_t sz = datasize + 4; void* buf = malloc( sz ); @@ -286,7 +286,7 @@ void wxDataObject::AddToPasteboard( void * pb, int itemID ) counter++; fname = strtok (NULL,"\n"); } - + } else { @@ -325,24 +325,24 @@ bool wxDataObject::IsFormatInPasteboard( void * pb, const wxDataFormat &dataForm PasteboardItemID itemID; CFArrayRef flavorTypeArray; CFIndex flavorCount; - + err = PasteboardGetItemIdentifier( pasteboard, itemIndex, &itemID ); if ( err != noErr ) continue; - + err = PasteboardCopyItemFlavors( pasteboard, itemID, &flavorTypeArray ); if ( err != noErr ) continue; - + flavorCount = CFArrayGetCount( flavorTypeArray ); - + for( CFIndex flavorIndex = 0; flavorIndex < flavorCount && hasData == false ; flavorIndex++ ) { CFStringRef flavorType; - + flavorType = (CFStringRef)CFArrayGetValueAtIndex( flavorTypeArray, flavorIndex ); - + wxDataFormat flavorFormat( (wxDataFormat::NativeFormat) flavorType ); if ( dataFormat == flavorFormat ) hasData = true; @@ -391,7 +391,7 @@ bool wxDataObject::GetFromPasteboard( void * pb ) err = PasteboardCopyItemFlavors( pasteboard, itemID, &flavorTypeArray ); if ( err != noErr ) continue; - + flavorCount = CFArrayGetCount( flavorTypeArray ); for( CFIndex flavorIndex = 0; !transferred && flavorIndex < flavorCount ; flavorIndex++ ) @@ -399,7 +399,7 @@ bool wxDataObject::GetFromPasteboard( void * pb ) CFStringRef flavorType; CFDataRef flavorData; CFIndex flavorDataSize; - + flavorType = (CFStringRef)CFArrayGetValueAtIndex( flavorTypeArray, flavorIndex ); @@ -409,7 +409,7 @@ bool wxDataObject::GetFromPasteboard( void * pb ) flavorType = CFSTR("public.utf16-plain-text"); } wxDataFormat flavorFormat( (wxDataFormat::NativeFormat) flavorType ); - + if ( dataFormat == flavorFormat ) { err = PasteboardCopyItemFlavorData( pasteboard, itemID, flavorType , &flavorData ); @@ -437,7 +437,7 @@ bool wxDataObject::GetFromPasteboard( void * pb ) { memset( buf, 0, flavorDataSize + 4 ); memcpy( buf, CFDataGetBytePtr( flavorData ), flavorDataSize ); - + if (dataFormat.GetType() == wxDF_TEXT) wxMacConvertNewlines10To13( (char*) buf ); SetData( flavorFormat, flavorDataSize, buf ); @@ -517,19 +517,19 @@ bool wxDataObject::HasDataInPasteboard( void * pb ) err = PasteboardCopyItemFlavors( pasteboard, itemID, &flavorTypeArray ); if ( err != noErr ) continue; - + flavorCount = CFArrayGetCount( flavorTypeArray ); for( CFIndex flavorIndex = 0; !hasData && flavorIndex < flavorCount ; flavorIndex++ ) { CFStringRef flavorType; - + flavorType = (CFStringRef)CFArrayGetValueAtIndex( flavorTypeArray, flavorIndex ); wxDataFormat flavorFormat( (wxDataFormat::NativeFormat) flavorType ); - - if ( dataFormat == flavorFormat || + + if ( dataFormat == flavorFormat || dataFormat.GetType() == wxDF_UNICODETEXT && flavorFormat.GetType() == wxDF_TEXT ) { hasData = true; @@ -634,7 +634,7 @@ wxBitmapDataObject::wxBitmapDataObject( const wxBitmap& rBitmap ) if (m_bitmap.Ok()) { - SetBitmap( rBitmap ); + SetBitmap( rBitmap ); } } diff --git a/src/osx/carbon/dataview.cpp b/src/osx/carbon/dataview.cpp index dbb38514bf..b48290c538 100644 --- a/src/osx/carbon/dataview.cpp +++ b/src/osx/carbon/dataview.cpp @@ -353,9 +353,9 @@ wxMacDataBrowserTableViewControl::wxMacDataBrowserTableViewControl(wxWindow* pee callbacks.u.v1.itemDataCallback = gDataBrowserTableViewItemDataUPP; callbacks.u.v1.itemCompareCallback = gDataBrowserTableViewItemCompareUPP; callbacks.u.v1.itemNotificationCallback = gDataBrowserTableViewItemNotificationUPP; - callbacks.u.v1.acceptDragCallback = gDataBrowserTableViewAcceptDragUPP; - callbacks.u.v1.addDragItemCallback = gDataBrowserTableViewAddDragItemUPP; - callbacks.u.v1.receiveDragCallback = gDataBrowserTableViewReceiveDragUPP; + callbacks.u.v1.acceptDragCallback = gDataBrowserTableViewAcceptDragUPP; + callbacks.u.v1.addDragItemCallback = gDataBrowserTableViewAddDragItemUPP; + callbacks.u.v1.receiveDragCallback = gDataBrowserTableViewReceiveDragUPP; this->SetCallbacks(&callbacks); // setup callbacks for customized items: diff --git a/src/osx/carbon/dcclient.cpp b/src/osx/carbon/dcclient.cpp index 6d3d5de47b..663640741c 100644 --- a/src/osx/carbon/dcclient.cpp +++ b/src/osx/carbon/dcclient.cpp @@ -45,7 +45,7 @@ wxWindowDCImpl::wxWindowDCImpl( wxDC *owner, wxWindow *window ) : wxGCDCImpl( owner ) { m_window = window; - + m_ok = true ; m_window->GetSize( &m_width , &m_height); @@ -107,7 +107,7 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const ControlRef handle = (ControlRef) m_window->GetHandle(); if ( !handle ) return wxNullBitmap; - + HIRect rect; CGImageRef image; CGContextRef context; @@ -119,11 +119,11 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const int height = subrect != NULL ? subrect->height : (int)rect.size.height ; wxBitmap bmp = wxBitmap(width, height, 32); - + context = (CGContextRef)bmp.GetHBITMAP(); - + CGContextSaveGState(context); - + CGContextTranslateCTM( context, 0, height ); CGContextScaleCTM( context, 1, -1 ); diff --git a/src/osx/carbon/dcscreen.cpp b/src/osx/carbon/dcscreen.cpp index 9dfcfef870..6bb57f78b3 100644 --- a/src/osx/carbon/dcscreen.cpp +++ b/src/osx/carbon/dcscreen.cpp @@ -36,7 +36,7 @@ wxScreenDCImpl::wxScreenDCImpl( wxDC *owner ) : m_width = (wxCoord)cgbounds.size.width; m_height = (wxCoord)cgbounds.size.height; #else - wxDisplaySize( &m_width, &m_height ); + wxDisplaySize( &m_width, &m_height ); #endif #if wxOSX_USE_COCOA_OR_IPHONE SetGraphicsContext( wxGraphicsContext::Create() ); @@ -76,21 +76,21 @@ wxBitmap wxScreenDCImpl::DoGetAsBitmap(const wxRect *subrect) const CGRect srcRect = CGRectMake(rect.x, rect.y, rect.width, rect.height); CGContextRef context = (CGContextRef)bmp.GetHBITMAP(); - + CGContextSaveGState(context); - + CGContextTranslateCTM( context, 0, m_height ); CGContextScaleCTM( context, 1, -1 ); - + if ( subrect ) srcRect = CGRectOffset( srcRect, -subrect->x, -subrect->y ) ; - + CGImageRef image = grabViaOpenGL(kCGNullDirectDisplay, srcRect); - + wxASSERT_MSG(image, wxT("wxScreenDC::GetAsBitmap - unable to get screenshot.")); - + CGContextDrawImage(context, srcRect, image); - + CGContextRestoreGState(context); #endif return bmp; diff --git a/src/osx/carbon/dirdlg.cpp b/src/osx/carbon/dirdlg.cpp index 157e07845d..c653e17e20 100644 --- a/src/osx/carbon/dirdlg.cpp +++ b/src/osx/carbon/dirdlg.cpp @@ -132,8 +132,8 @@ int wxDirDialog::ShowModal() if ( err != noErr && err != userCanceledErr ) m_path = wxEmptyString ; - if ( dialog ) - ::NavDialogDispose(dialog); + if ( dialog ) + ::NavDialogDispose(dialog); return (err == noErr) ? wxID_OK : wxID_CANCEL ; } diff --git a/src/osx/carbon/dirmac.cpp b/src/osx/carbon/dirmac.cpp index 1fabdec5cd..6ac3a147f5 100644 --- a/src/osx/carbon/dirmac.cpp +++ b/src/osx/carbon/dirmac.cpp @@ -135,9 +135,9 @@ bool wxDirData::Read(wxString *filename) ItemCount fetched = 0; err = FSGetCatalogInfoBulk( m_iterator, 1, &fetched, NULL, kFSCatInfoNodeFlags | kFSCatInfoFinderInfo , &catalogInfo , &fileRef, NULL, &uniname ); - - // expected error codes - + + // expected error codes + if ( errFSNoMoreItems == err ) return false ; if ( afpAccessDenied == err ) diff --git a/src/osx/carbon/dnd.cpp b/src/osx/carbon/dnd.cpp index 22036c22ac..5ece3e0d09 100644 --- a/src/osx/carbon/dnd.cpp +++ b/src/osx/carbon/dnd.cpp @@ -59,7 +59,7 @@ wxDragResult wxDropTarget::OnDragOver( wxDataFormat wxDropTarget::GetMatchingPair() { - wxFAIL_MSG("wxDropTarget::GetMatchingPair() not implemented in src/osx/carbon/dnd.cpp"); + wxFAIL_MSG("wxDropTarget::GetMatchingPair() not implemented in src/osx/carbon/dnd.cpp"); return wxDF_INVALID; } @@ -391,121 +391,121 @@ pascal OSErr wxMacWindowDragTrackingHandler( break; GetDragMouse( theDrag, &mouse, 0L ); - { - int x = mouse.h ; - int y = mouse.v ; - toplevel->GetNonOwnedPeer()->ScreenToWindow( &x, &y ); - localMouse.h = x; - localMouse.v = y; - - { - wxWindow *win = NULL; - ControlPartCode controlPart; - ControlRef control = FindControlUnderMouse( localMouse, theWindow, &controlPart ); - if ( control ) - win = wxFindWindowFromWXWidget( (WXWidget) control ); - else - win = toplevel; - - int localx, localy; - localx = localMouse.h; - localy = localMouse.v; - - if ( win ) - win->MacRootWindowToWindow( &localx, &localy ); - if ( win != trackingGlobals->m_currentTargetWindow ) - { - if ( trackingGlobals->m_currentTargetWindow ) - { - // this window is left - if ( trackingGlobals->m_currentTarget ) - { - #ifndef __LP64__ - HideDragHilite( theDrag ); - #endif - trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard ); - trackingGlobals->m_currentTarget->OnLeave(); - trackingGlobals->m_currentTarget = NULL; - trackingGlobals->m_currentTargetWindow = NULL; - } - } - - if ( win ) - { - // this window is entered - trackingGlobals->m_currentTargetWindow = win; - trackingGlobals->m_currentTarget = win->GetDropTarget(); - { - if ( trackingGlobals->m_currentTarget ) - { - trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard ); - result = trackingGlobals->m_currentTarget->OnEnter( localx, localy, result ); - } - - if ( result != wxDragNone ) - { - int x, y; - - x = y = 0; - win->MacWindowToRootWindow( &x, &y ); - RgnHandle hiliteRgn = NewRgn(); - Rect r = { y, x, y + win->GetSize().y, x + win->GetSize().x }; - RectRgn( hiliteRgn, &r ); - #ifndef __LP64__ - ShowDragHilite( theDrag, hiliteRgn, true ); - #endif - DisposeRgn( hiliteRgn ); - } - } - } - } - else - { - if ( trackingGlobals->m_currentTarget ) - { - trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard ); - result = trackingGlobals->m_currentTarget->OnDragOver( localx, localy, result ); - } - } - - // set cursor for OnEnter and OnDragOver - if ( trackingGlobals->m_currentSource && !trackingGlobals->m_currentSource->GiveFeedback( result ) ) - { - if ( !trackingGlobals->m_currentSource->MacInstallDefaultCursor( result ) ) - { - wxStockCursor cursorID = wxCURSOR_NONE; - - switch (result) - { - case wxDragCopy: - cursorID = wxCURSOR_COPY_ARROW; - break; - - case wxDragMove: - cursorID = wxCURSOR_ARROW; - break; - - case wxDragNone: - cursorID = wxCURSOR_NO_ENTRY; - break; - - case wxDragError: - case wxDragLink: - case wxDragCancel: - default: - // put these here to make gcc happy - ; - } - - if (cursorID != wxCURSOR_NONE) - { - wxCursor cursor( cursorID ); - cursor.MacInstall(); - } - } - } - } - } + { + int x = mouse.h ; + int y = mouse.v ; + toplevel->GetNonOwnedPeer()->ScreenToWindow( &x, &y ); + localMouse.h = x; + localMouse.v = y; + + { + wxWindow *win = NULL; + ControlPartCode controlPart; + ControlRef control = FindControlUnderMouse( localMouse, theWindow, &controlPart ); + if ( control ) + win = wxFindWindowFromWXWidget( (WXWidget) control ); + else + win = toplevel; + + int localx, localy; + localx = localMouse.h; + localy = localMouse.v; + + if ( win ) + win->MacRootWindowToWindow( &localx, &localy ); + if ( win != trackingGlobals->m_currentTargetWindow ) + { + if ( trackingGlobals->m_currentTargetWindow ) + { + // this window is left + if ( trackingGlobals->m_currentTarget ) + { +#ifndef __LP64__ + HideDragHilite( theDrag ); +#endif + trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard ); + trackingGlobals->m_currentTarget->OnLeave(); + trackingGlobals->m_currentTarget = NULL; + trackingGlobals->m_currentTargetWindow = NULL; + } + } + + if ( win ) + { + // this window is entered + trackingGlobals->m_currentTargetWindow = win; + trackingGlobals->m_currentTarget = win->GetDropTarget(); + { + if ( trackingGlobals->m_currentTarget ) + { + trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard ); + result = trackingGlobals->m_currentTarget->OnEnter( localx, localy, result ); + } + + if ( result != wxDragNone ) + { + int x, y; + + x = y = 0; + win->MacWindowToRootWindow( &x, &y ); + RgnHandle hiliteRgn = NewRgn(); + Rect r = { y, x, y + win->GetSize().y, x + win->GetSize().x }; + RectRgn( hiliteRgn, &r ); +#ifndef __LP64__ + ShowDragHilite( theDrag, hiliteRgn, true ); +#endif + DisposeRgn( hiliteRgn ); + } + } + } + } + else + { + if ( trackingGlobals->m_currentTarget ) + { + trackingGlobals->m_currentTarget->SetCurrentDragPasteboard( pasteboard ); + result = trackingGlobals->m_currentTarget->OnDragOver( localx, localy, result ); + } + } + + // set cursor for OnEnter and OnDragOver + if ( trackingGlobals->m_currentSource && !trackingGlobals->m_currentSource->GiveFeedback( result ) ) + { + if ( !trackingGlobals->m_currentSource->MacInstallDefaultCursor( result ) ) + { + wxStockCursor cursorID = wxCURSOR_NONE; + + switch (result) + { + case wxDragCopy: + cursorID = wxCURSOR_COPY_ARROW; + break; + + case wxDragMove: + cursorID = wxCURSOR_ARROW; + break; + + case wxDragNone: + cursorID = wxCURSOR_NO_ENTRY; + break; + + case wxDragError: + case wxDragLink: + case wxDragCancel: + default: + // put these here to make gcc happy + ; + } + + if (cursorID != wxCURSOR_NONE) + { + wxCursor cursor( cursorID ); + cursor.MacInstall(); + } + } + } + } + } break; case kDragTrackingLeaveWindow: diff --git a/src/osx/carbon/drawer.cpp b/src/osx/carbon/drawer.cpp index 06ad62df50..2bd0d8041b 100644 --- a/src/osx/carbon/drawer.cpp +++ b/src/osx/carbon/drawer.cpp @@ -140,7 +140,7 @@ bool wxDrawerWindow::SetPreferredEdge(wxDirection edge) { const OSStatus status = ::SetDrawerPreferredEdge((WindowRef)GetWXWindow(), DirectionToWindowEdge(edge)); - return (noErr == status); + return (noErr == status); } diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index c37e0c8f1e..8ee911dc85 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -50,14 +50,14 @@ public: } wxFontRefData(const wxFontRefData& data); - + wxFontRefData( const wxNativeFontInfo& info ) : m_info(info) { Init(); } wxFontRefData(wxOSXSystemFont font, int size); - + #if wxOSX_USE_CORE_TEXT wxFontRefData( wxUint32 coreTextFontType ); wxFontRefData( CTFontRef font ); @@ -196,7 +196,7 @@ wxFontRefData::wxFontRefData(const wxFontRefData& data) #endif #if wxOSX_USE_CORE_TEXT m_ctFont = data.m_ctFont; -#endif +#endif m_cgFont = data.m_cgFont; #if wxOSX_USE_ATSU_TEXT if ( data.m_macATSUStyle != NULL ) @@ -211,7 +211,7 @@ wxFontRefData::wxFontRefData(const wxFontRefData& data) #if wxOSX_USE_IPHONE m_uiFont = (UIFont*) wxMacCocoaRetain(data.m_uiFont); #endif - + } // ============================================================================ @@ -282,7 +282,7 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size) { wxASSERT( font != wxOSX_SYSTEM_FONT_NONE ); Init(); - + #if wxOSX_USE_CORE_TEXT if ( UMAGetSystemVersion() >= 0x1050 ) { @@ -356,14 +356,14 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size) m_macThemeFontID = kThemeViewsFont; break; default: - break; + break; } if ( m_info.m_faceName.empty() ) { Style style ; FMFontSize fontSize; Str255 qdFontName ; - + GetThemeFont( m_macThemeFontID, GetApplicationScript(), qdFontName, &fontSize, &style ); if ( size != 0 ) fontSize = size; @@ -371,7 +371,7 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size) wxFontStyle fontstyle = wxFONTSTYLE_NORMAL; wxFontWeight fontweight = wxFONTWEIGHT_NORMAL; bool underlined = false; - + if ( style & bold ) fontweight = wxFONTWEIGHT_BOLD ; else @@ -380,7 +380,7 @@ wxFontRefData::wxFontRefData(wxOSXSystemFont font, int size) fontstyle = wxFONTSTYLE_ITALIC ; if ( style & underline ) underlined = true ; - + m_info.Init(fontSize,wxFONTFAMILY_DEFAULT,fontstyle,fontweight,underlined, wxMacMakeStringFromPascal( qdFontName ), wxFONTENCODING_DEFAULT); } @@ -398,9 +398,9 @@ void wxFontRefData::MacFindFont() { if ( m_fontValid ) return; - + m_info.EnsureValid(); - + #if wxOSX_USE_CORE_TEXT if ( UMAGetSystemVersion() >= 0x1050 ) { @@ -501,10 +501,10 @@ void wxFontRefData::MacFindFont() bool wxFont::Create(const wxNativeFontInfo& info) { UnRef(); - + m_refData = new wxFontRefData( info ); RealizeResource(); - + return true; } @@ -524,7 +524,7 @@ bool wxFont::Create(int pointSize, wxFontEncoding encoding) { UnRef(); - + wxString faceName = faceNameParam; if ( faceName.empty() ) @@ -534,7 +534,7 @@ bool wxFont::Create(int pointSize, case wxFONTFAMILY_DEFAULT : faceName = wxT("Lucida Grande"); break; - + case wxFONTFAMILY_SCRIPT : case wxFONTFAMILY_ROMAN : case wxFONTFAMILY_DECORATIVE : @@ -555,9 +555,9 @@ bool wxFont::Create(int pointSize, break ; } } - + wxNativeFontInfo info; - + info.Init(pointSize, family, style, weight, underlined, faceName, encoding); @@ -569,9 +569,9 @@ bool wxFont::Create(int pointSize, bool wxFont::CreateSystemFont(wxOSXSystemFont font) { UnRef(); - + m_refData = new wxFontRefData( font, 0 ); - + return true; } @@ -582,7 +582,7 @@ wxFont::~wxFont() void wxFont::DoSetNativeFontInfo(const wxNativeFontInfo& info) { UnRef(); - + m_refData = new wxFontRefData( info); } @@ -750,7 +750,7 @@ short wxFont::MacGetFontNum() const // cast away constness otherwise lazy font resolution is not possible const_cast(this)->RealizeResource(); - + return M_FONTDATA->m_info.m_qdFontFamily; } @@ -760,7 +760,7 @@ wxByte wxFont::MacGetFontStyle() const // cast away constness otherwise lazy font resolution is not possible const_cast(this)->RealizeResource(); - + return M_FONTDATA->m_info.m_qdFontStyle; } @@ -780,18 +780,18 @@ void * wxFont::MacGetATSUStyle() const // cast away constness otherwise lazy font resolution is not possible const_cast(this)->RealizeResource(); - + return M_FONTDATA->m_macATSUStyle; } #if WXWIN_COMPATIBILITY_2_8 -wxUint32 wxFont::MacGetATSUFontID() const +wxUint32 wxFont::MacGetATSUFontID() const { wxCHECK_MSG( M_FONTDATA != NULL, 0, wxT("invalid font") ); // cast away constness otherwise lazy font resolution is not possible const_cast(this)->RealizeResource(); - + return M_FONTDATA->m_info.m_atsuFontID; } @@ -801,7 +801,7 @@ wxUint32 wxFont::MacGetATSUAdditionalQDStyles() const // cast away constness otherwise lazy font resolution is not possible const_cast(this)->RealizeResource(); - + return M_FONTDATA->m_info.m_atsuAdditionalQDStyles; } #endif @@ -816,7 +816,7 @@ CTFontRef wxFont::OSXGetCTFont() const // cast away constness otherwise lazy font resolution is not possible const_cast(this)->RealizeResource(); - + return (CTFontRef)(M_FONTDATA->m_ctFont); } @@ -830,7 +830,7 @@ CGFontRef wxFont::OSXGetCGFont() const // cast away constness otherwise lazy font resolution is not possible const_cast(this)->RealizeResource(); - + return (M_FONTDATA->m_cgFont); } @@ -845,7 +845,7 @@ NSFont* wxFont::OSXGetNSFont() const // cast away constness otherwise lazy font resolution is not possible const_cast(this)->RealizeResource(); - + return (M_FONTDATA->m_nsFont); } @@ -858,7 +858,7 @@ const wxNativeFontInfo * wxFont::GetNativeFontInfo() const // cast away constness otherwise lazy font resolution is not possible const_cast(this)->RealizeResource(); - + // M_FONTDATA->m_info.InitFromFont(*this); return &(M_FONTDATA->m_info); @@ -958,7 +958,7 @@ void wxNativeFontInfo::Init(CTFontDescriptorRef descr) { Init(); m_ctFontDescriptor = wxCFRetain(descr); - + wxCFRef< CFNumberRef > sizevalue( (CFNumberRef) CTFontDescriptorCopyAttribute( m_ctFontDescriptor, kCTFontSizeAttribute ) ); float fsize; if ( CFNumberGetValue( sizevalue , kCFNumberFloatType , &fsize ) ) @@ -975,7 +975,7 @@ void wxNativeFontInfo::Init(CTFontDescriptorRef descr) } wxCFStringRef familyName( (CFStringRef) CTFontDescriptorCopyAttribute(m_ctFontDescriptor, kCTFontFamilyNameAttribute)); - m_faceName = familyName.AsString(); + m_faceName = familyName.AsString(); } #endif @@ -983,7 +983,7 @@ void wxNativeFontInfo::EnsureValid() { if ( m_descriptorValid ) return; - + #if wxOSX_USE_CORE_TEXT if ( m_ctFontDescriptor == NULL && UMAGetSystemVersion() >= 0x1050 ) { diff --git a/src/osx/carbon/fontdlgosx.mm b/src/osx/carbon/fontdlgosx.mm index 7890a015d6..c9f6b041bb 100644 --- a/src/osx/carbon/fontdlgosx.mm +++ b/src/osx/carbon/fontdlgosx.mm @@ -194,12 +194,12 @@ int RunMixedFontDialog(wxFontDialog* dialog) NSModalSession session = [NSApp beginModalSessionForWindow:fontPanel]; - for (;;) + for (;;) { if ([NSApp runModalSession:session] != NSRunContinuesResponse) break; } - + [NSApp endModalSession:session]; // if we don't reenable it, FPShowHideFontPanel does not work diff --git a/src/osx/carbon/gauge.cpp b/src/osx/carbon/gauge.cpp index 9cf0d8a620..9a74a41a7c 100644 --- a/src/osx/carbon/gauge.cpp +++ b/src/osx/carbon/gauge.cpp @@ -23,7 +23,7 @@ public : wxMacGaugeCarbonControl( wxWindowMac* peer ) : wxMacControl( peer ) { } - + void SetMaximum(wxInt32 v) { // switch back to determinate mode if not there already @@ -34,7 +34,7 @@ public : wxMacControl::SetMaximum( v ) ; } - + void SetValue(wxInt32 v) { // switch back to determinate mode if not there already @@ -54,7 +54,7 @@ public : SetNeedsDisplay(NULL) ; } } - + void PulseGauge() { if ( GetData( kControlNoPart, kControlProgressBarIndeterminateTag ) != true ) @@ -70,15 +70,15 @@ public : }; -wxWidgetImplType* wxWidgetImpl::CreateGauge( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateGauge( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), wxInt32 value, wxInt32 minimum, wxInt32 maximum, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer, pos, size ); diff --git a/src/osx/carbon/glcanvas.cpp b/src/osx/carbon/glcanvas.cpp index 4084a19ecb..4029acc11c 100644 --- a/src/osx/carbon/glcanvas.cpp +++ b/src/osx/carbon/glcanvas.cpp @@ -268,7 +268,7 @@ bool wxGLContext::SetCurrent(const wxGLCanvas& win) const GLint bufnummer = win.GetAglBufferName(); aglSetInteger(m_glContext, AGL_BUFFER_NAME, &bufnummer); //win.SetLastContext(m_glContext); - + const_cast(win).SetViewport(); if ( !aglSetDrawable(m_glContext, drawable) ) @@ -286,19 +286,19 @@ bool wxGLContext::SetCurrent(const wxGLCanvas& win) const /* -sharing contexts under AGL is not straightforward, to quote from +sharing contexts under AGL is not straightforward, to quote from http://lists.apple.com/archives/mac-opengl/2003/Jan/msg00402.html : -In Carbon OpenGL (AGL) you would use call aglSetInteger to setup a -buffer name and attached each context to that same name. From AGL +In Carbon OpenGL (AGL) you would use call aglSetInteger to setup a +buffer name and attached each context to that same name. From AGL you can do: GLint id = 1; ctx1 = aglCreateContext... aglSetInteger(ctx1, AGL_BUFFER_NAME, &id); // create name -aglAttachDrawable (ctx1,...); // create surface with associated with +aglAttachDrawable (ctx1,...); // create surface with associated with name (first time) ctx2 = aglCreateContext... aglSetInteger(ctx2, AGL_BUFFER_NAME, &id); // uses previously created name @@ -320,7 +320,7 @@ context behavior. */ /* -so what I'm doing is to have a dummy aglContext attached to a wxGLCanvas, +so what I'm doing is to have a dummy aglContext attached to a wxGLCanvas, assign it a buffer number */ @@ -348,8 +348,8 @@ bool wxGLCanvas::Create(wxWindow *parent, static GLint gCurrentBufferName = 1; m_bufferName = gCurrentBufferName++; - aglSetInteger (m_dummyContext, AGL_BUFFER_NAME, &m_bufferName); - + aglSetInteger (m_dummyContext, AGL_BUFFER_NAME, &m_bufferName); + AGLDrawable drawable = (AGLDrawable)GetWindowPort(MAC_WXHWND(MacGetTopLevelWindowRef())); aglSetDrawable(m_dummyContext, drawable); @@ -362,7 +362,7 @@ wxGLCanvas::~wxGLCanvas() { if ( m_glFormat ) WXGLDestroyPixelFormat(m_glFormat); - + if ( m_dummyContext ) WXGLDestroyContext(m_dummyContext); } diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index b3fc827537..d5f4f7e704 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -98,7 +98,7 @@ typedef enum CGCompositeOperation { kCGCompositeOperationDestinationAtop = 9, kCGCompositeOperationXOR = 10, kCGCompositeOperationPlusDarker = 11, -// NS only, unsupported by CG : Highlight +// NS only, unsupported by CG : Highlight kCGCompositeOperationPlusLighter = 12 } CGCompositeOperation ; @@ -1349,7 +1349,7 @@ public: virtual void BeginLayer(wxDouble opacity); virtual void EndLayer(); - + // // transformation // @@ -1597,7 +1597,7 @@ bool wxMacCoreGraphicsContext::EnsureIsValid() { if (m_invisible) return false; - + #if wxOSX_USE_COCOA if ( wxOSXLockFocus(m_view) ) { @@ -1649,7 +1649,7 @@ bool wxMacCoreGraphicsContext::EnsureIsValid() } #endif CGContextSaveGState( m_cgContext ); - + #if 0 // turn on for debugging of clientdc static float color = 0.5 ; static int channel = 0 ; @@ -1678,9 +1678,9 @@ bool wxMacCoreGraphicsContext::SetAntialiasMode(wxAntialiasMode antialias) if (m_antialias == antialias) return true; - + m_antialias = antialias; - + bool antialiasMode; switch (antialias) { @@ -1704,12 +1704,12 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op) if ( m_composition == op ) return true; - + m_composition = op; - + if (m_composition == wxCOMPOSITION_DEST) return true; - + #if wxOSX_USE_COCOA_OR_CARBON if ( UMAGetSystemVersion() < 0x1060 ) { @@ -1718,37 +1718,37 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op) switch( op ) { case wxCOMPOSITION_CLEAR: - cop = kCGCompositeOperationClear; + cop = kCGCompositeOperationClear; break; case wxCOMPOSITION_SOURCE: - cop = kCGCompositeOperationCopy; + cop = kCGCompositeOperationCopy; break; case wxCOMPOSITION_OVER: - mode = kCGBlendModeNormal; + mode = kCGBlendModeNormal; break; case wxCOMPOSITION_IN: - cop = kCGCompositeOperationSourceIn; + cop = kCGCompositeOperationSourceIn; break; case wxCOMPOSITION_OUT: - cop = kCGCompositeOperationSourceOut; + cop = kCGCompositeOperationSourceOut; break; case wxCOMPOSITION_ATOP: - cop = kCGCompositeOperationSourceAtop; + cop = kCGCompositeOperationSourceAtop; break; case wxCOMPOSITION_DEST_OVER: - cop = kCGCompositeOperationDestinationOver; + cop = kCGCompositeOperationDestinationOver; break; case wxCOMPOSITION_DEST_IN: - cop = kCGCompositeOperationDestinationIn; + cop = kCGCompositeOperationDestinationIn; break; case wxCOMPOSITION_DEST_OUT: - cop = kCGCompositeOperationDestinationOut; + cop = kCGCompositeOperationDestinationOut; break; case wxCOMPOSITION_DEST_ATOP: - cop = kCGCompositeOperationDestinationAtop; + cop = kCGCompositeOperationDestinationAtop; break; case wxCOMPOSITION_XOR: - cop = kCGCompositeOperationXOR; + cop = kCGCompositeOperationXOR; break; #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 case wxCOMPOSITION_ADD: @@ -1771,39 +1771,39 @@ bool wxMacCoreGraphicsContext::SetCompositionMode(wxCompositionMode op) switch( op ) { case wxCOMPOSITION_CLEAR: - mode = kCGBlendModeClear; + mode = kCGBlendModeClear; break; case wxCOMPOSITION_SOURCE: - mode = kCGBlendModeCopy; + mode = kCGBlendModeCopy; break; case wxCOMPOSITION_OVER: - mode = kCGBlendModeNormal; + mode = kCGBlendModeNormal; break; case wxCOMPOSITION_IN: - mode = kCGBlendModeSourceIn; + mode = kCGBlendModeSourceIn; break; case wxCOMPOSITION_OUT: - mode = kCGBlendModeSourceOut; + mode = kCGBlendModeSourceOut; break; case wxCOMPOSITION_ATOP: - mode = kCGBlendModeSourceAtop; + mode = kCGBlendModeSourceAtop; break; case wxCOMPOSITION_DEST_OVER: - mode = kCGBlendModeDestinationOver; + mode = kCGBlendModeDestinationOver; break; case wxCOMPOSITION_DEST_IN: - mode = kCGBlendModeDestinationIn; + mode = kCGBlendModeDestinationIn; break; case wxCOMPOSITION_DEST_OUT: - mode = kCGBlendModeDestinationOut; + mode = kCGBlendModeDestinationOut; break; case wxCOMPOSITION_DEST_ATOP: - mode = kCGBlendModeDestinationAtop; + mode = kCGBlendModeDestinationAtop; break; case wxCOMPOSITION_XOR: - mode = kCGBlendModeXOR; + mode = kCGBlendModeXOR; break; - + case wxCOMPOSITION_ADD: mode = kCGBlendModePlusLighter ; break; @@ -1918,7 +1918,7 @@ void wxMacCoreGraphicsContext::StrokePath( const wxGraphicsPath &path ) if (EnsureIsValid()==false) return; - + if (m_composition == wxCOMPOSITION_DEST) return; @@ -1933,7 +1933,7 @@ void wxMacCoreGraphicsContext::DrawPath( const wxGraphicsPath &path , wxPolygonF { if (EnsureIsValid()==false) return; - + if (m_composition == wxCOMPOSITION_DEST) return; @@ -1989,7 +1989,7 @@ void wxMacCoreGraphicsContext::FillPath( const wxGraphicsPath &path , wxPolygonF if (EnsureIsValid()==false) return; - + if (m_composition == wxCOMPOSITION_DEST) return; @@ -2023,7 +2023,7 @@ void wxMacCoreGraphicsContext::SetNativeContext( CGContextRef cg ) CGContextRestoreGState( m_cgContext ); if ( m_contextSynthesized ) { - // TODO: in case of performance problems, try issuing this not too + // TODO: in case of performance problems, try issuing this not too // frequently (half of refresh rate) CGContextFlush(m_cgContext); #if wxOSX_USE_CARBON @@ -2093,7 +2093,7 @@ void wxMacCoreGraphicsContext::DrawBitmap( const wxGraphicsBitmap &bmp, wxDouble if (m_composition == wxCOMPOSITION_DEST) return; - + #ifdef __WXMAC__ wxMacCoreGraphicsBitmapData* refdata =static_cast(bmp.GetRefData()); CGImageRef image = refdata->GetBitmap(); @@ -2132,7 +2132,7 @@ void wxMacCoreGraphicsContext::DrawIcon( const wxIcon &icon, wxDouble x, wxDoubl { if (EnsureIsValid()==false) return; - + if (m_composition == wxCOMPOSITION_DEST) return; @@ -2151,7 +2151,7 @@ void wxMacCoreGraphicsContext::PushState() { if (EnsureIsValid()==false) return; - + CGContextSaveGState( m_cgContext ); } @@ -2159,7 +2159,7 @@ void wxMacCoreGraphicsContext::PopState() { if (EnsureIsValid()==false) return; - + CGContextRestoreGState( m_cgContext ); } @@ -2169,7 +2169,7 @@ void wxMacCoreGraphicsContext::DoDrawText( const wxString &str, wxDouble x, wxDo if (EnsureIsValid()==false) return; - + if (m_composition == wxCOMPOSITION_DEST) return; @@ -2232,7 +2232,7 @@ void wxMacCoreGraphicsContext::DoDrawRotatedText(const wxString &str, if (EnsureIsValid()==false) return; - + if (m_composition == wxCOMPOSITION_DEST) return; diff --git a/src/osx/carbon/listbox.cpp b/src/osx/carbon/listbox.cpp index f688c91dd1..55cf9e6e07 100644 --- a/src/osx/carbon/listbox.cpp +++ b/src/osx/carbon/listbox.cpp @@ -30,12 +30,12 @@ // list box control implementation // ============================================================================ -wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), - const wxPoint& pos, +wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { wxMacDataBrowserListControl* control = new wxMacDataBrowserListControl( wxpeer, pos, size, style ); @@ -175,7 +175,7 @@ OSStatus wxMacListBoxItem::GetSetData(wxMacDataItemBrowserControl *owner , wxListBox *list = wxDynamicCast( owner->GetWXPeer() , wxListBox ); wxMacDataBrowserCellValue valueholder(itemData); list->GetValueCallback( n , col, valueholder ); - + err = noErr; } else @@ -191,7 +191,7 @@ OSStatus wxMacListBoxItem::GetSetData(wxMacDataItemBrowserControl *owner , } } - + } else { @@ -226,7 +226,7 @@ OSStatus wxMacListBoxItem::GetSetData(wxMacDataItemBrowserControl *owner , { err = wxMacDataItem::GetSetData(owner, property, itemData, changeValue); } - + return err; } @@ -261,7 +261,7 @@ wxMacDataBrowserListControl::wxMacDataBrowserListControl( wxWindow *peer, const : wxMacDataItemBrowserControl( peer, pos, size, style ) { m_nextColumnId = 0 ; - + OSStatus err = noErr; m_clientDataItemsType = wxClientData_None; if ( style & wxLB_SORT ) @@ -351,7 +351,7 @@ void wxMacDataBrowserListControl::ItemNotification( { wxListBox *list = wxDynamicCast( GetWXPeer() , wxListBox ); wxCHECK_RET( list != NULL , wxT("Listbox expected")); - + if (list->HasMultipleSelection() && (message == kDataBrowserSelectionSetChanged) && (!list->MacGetBlockEvents())) { list->CalcAndSendEvent(); @@ -361,14 +361,14 @@ void wxMacDataBrowserListControl::ItemNotification( if ((message == kDataBrowserSelectionSetChanged) && (!list->MacGetBlockEvents())) { wxCommandEvent event( wxEVT_COMMAND_LISTBOX_SELECTED, list->GetId() ); - + int sel = list->GetSelection(); if ((sel < 0) || (sel > (int) list->GetCount())) // OS X can select an item below the last item (why?) return; list->HandleLineEvent( sel, false ); return; } - + // call super for item level(wxMacDataItem->Notification) callback processing wxMacDataItemBrowserControl::ItemNotification( itemID, message, itemData); } @@ -385,7 +385,7 @@ wxWindow * wxMacDataBrowserListControl::GetPeer() const // List Methods // -wxMacDataBrowserColumn* wxMacDataBrowserListControl::DoInsertColumn( unsigned int pos, DataBrowserPropertyID property, +wxMacDataBrowserColumn* wxMacDataBrowserListControl::DoInsertColumn( unsigned int pos, DataBrowserPropertyID property, const wxString& title, bool editable, DataBrowserPropertyType colType, SInt16 just, int width ) { @@ -419,7 +419,7 @@ wxMacDataBrowserColumn* wxMacDataBrowserListControl::DoInsertColumn( unsigned in columnDesc.propertyDesc.propertyFlags = kDataBrowserListViewSortableColumn; columnDesc.propertyDesc.propertyFlags |= kDataBrowserListViewTypeSelectColumn; columnDesc.propertyDesc.propertyFlags |= kDataBrowserListViewNoGapForIconInHeaderButton; - + if ( editable ) columnDesc.propertyDesc.propertyFlags |= kDataBrowserPropertyIsMutable; @@ -431,38 +431,38 @@ wxMacDataBrowserColumn* wxMacDataBrowserListControl::DoInsertColumn( unsigned in } wxMacDataBrowserColumn *col = new wxMacDataBrowserColumn( property, colType, editable ); - + m_columns.Insert( col, pos ); - + return col; } -wxListWidgetColumn* wxMacDataBrowserListControl::InsertTextColumn( unsigned pos, const wxString& title, bool editable, - wxAlignment just, int defaultWidth) +wxListWidgetColumn* wxMacDataBrowserListControl::InsertTextColumn( unsigned pos, const wxString& title, bool editable, + wxAlignment just, int defaultWidth) { DataBrowserPropertyID property = kMinColumnId + m_nextColumnId++; - + SInt16 j = teFlushLeft; if ( just & wxALIGN_RIGHT ) j = teFlushRight; else if ( just & wxALIGN_CENTER_HORIZONTAL ) j = teCenter; - - return DoInsertColumn( pos, property, title, editable, kDataBrowserTextType, just, defaultWidth ); + + return DoInsertColumn( pos, property, title, editable, kDataBrowserTextType, just, defaultWidth ); } -wxListWidgetColumn* wxMacDataBrowserListControl::InsertCheckColumn( unsigned pos , const wxString& title, bool editable, - wxAlignment just, int defaultWidth ) +wxListWidgetColumn* wxMacDataBrowserListControl::InsertCheckColumn( unsigned pos , const wxString& title, bool editable, + wxAlignment just, int defaultWidth ) { DataBrowserPropertyID property = kMinColumnId + m_nextColumnId++; - + SInt16 j = teFlushLeft; if ( just & wxALIGN_RIGHT ) j = teFlushRight; else if ( just & wxALIGN_CENTER_HORIZONTAL ) j = teCenter; - - return DoInsertColumn( pos, property, title, editable, kDataBrowserCheckboxType, just, defaultWidth ); + + return DoInsertColumn( pos, property, title, editable, kDataBrowserCheckboxType, just, defaultWidth ); } wxMacDataBrowserColumn* wxMacDataBrowserListControl::GetColumnFromProperty( DataBrowserPropertyID property) @@ -470,7 +470,7 @@ wxMacDataBrowserColumn* wxMacDataBrowserListControl::GetColumnFromProperty( Data for ( unsigned int i = 0; i < m_columns.size() ; ++ i ) if ( m_columns[i]->GetProperty() == property ) return m_columns[i]; - + return NULL; } @@ -579,15 +579,15 @@ void wxMacDataBrowserListControl::ListScrollTo( unsigned int n ) RevealItem( item , kDataBrowserRevealWithoutSelecting ); } - -void wxMacDataBrowserListControl::UpdateLine( unsigned int n, wxListWidgetColumn* col ) + +void wxMacDataBrowserListControl::UpdateLine( unsigned int n, wxListWidgetColumn* col ) { wxMacDataBrowserColumn* dbcol = dynamic_cast (col); wxMacDataItem * item = (wxMacDataItem*) GetItemFromLine( n ); UpdateItem(wxMacDataBrowserRootContainer, item, dbcol ? dbcol->GetProperty() : kDataBrowserNoItem ); } -void wxMacDataBrowserListControl::UpdateLineToEnd( unsigned int n) +void wxMacDataBrowserListControl::UpdateLineToEnd( unsigned int n) { // with databrowser inserting does not need updating the entire model, it's done by databrowser itself wxMacDataItem * item = (wxMacDataItem*) GetItemFromLine( n ); @@ -607,8 +607,8 @@ void wxMacDataBrowserCellValue::Set( const wxString& value ) SetDataBrowserItemDataText( m_data, (CFStringRef) cf); } -void wxMacDataBrowserCellValue::Set( int value ) -{ +void wxMacDataBrowserCellValue::Set( int value ) +{ SetDataBrowserItemDataValue( m_data, value ); } @@ -616,15 +616,15 @@ void wxMacDataBrowserCellValue::Check( bool check ) { SetDataBrowserItemDataButtonValue( m_data, check ? kThemeButtonOn : kThemeButtonOff); } - -int wxMacDataBrowserCellValue::GetIntValue() const + +int wxMacDataBrowserCellValue::GetIntValue() const { SInt32 value; GetDataBrowserItemDataValue( m_data, &value ); return value; } -wxString wxMacDataBrowserCellValue::GetStringValue() const +wxString wxMacDataBrowserCellValue::GetStringValue() const { CFStringRef value; GetDataBrowserItemDataText ( m_data, &value ); diff --git a/src/osx/carbon/listctrl_mac.cpp b/src/osx/carbon/listctrl_mac.cpp index 97ecc4ffe6..034b4d073d 100644 --- a/src/osx/carbon/listctrl_mac.cpp +++ b/src/osx/carbon/listctrl_mac.cpp @@ -148,10 +148,10 @@ static pascal OSStatus wxMacListCtrlEventHandler( EventHandlerCallRef handler , if (result == kControlButtonPart){ DataBrowserPropertyID col; GetDataBrowserSortProperty(controlRef, &col); - + DataBrowserTableViewColumnIndex column = 0; verify_noerr( GetDataBrowserTableViewColumnPosition( controlRef, col, &column ) ); - + le.m_col = column; // FIXME: we can't use the sort property for virtual listctrls // so we need to find a better way to determine which column was clicked... @@ -302,7 +302,7 @@ bool wxMacListCtrlEventDelegate::ProcessEvent( wxEvent& event ) { int id = event.GetId(); wxObject* obj = event.GetEventObject(); - + // even though we use a generic list ctrl underneath, make sure // we present ourselves as wxListCtrl. event.SetEventObject( m_list ); @@ -670,21 +670,21 @@ void wxListCtrl::FireMouseEvent(wxEventType eventType, wxPoint position) void wxListCtrl::OnChar(wxKeyEvent& event) { - + if (m_dbImpl) { wxListEvent le( wxEVT_COMMAND_LIST_KEY_DOWN, GetId() ); le.SetEventObject(this); le.m_code = event.GetKeyCode(); le.m_itemIndex = -1; - + if (m_current == -1) { // if m_current isn't set, check if there's been a selection // made before continuing m_current = GetNextItem(-1, wxLIST_NEXT_BELOW, wxLIST_STATE_SELECTED); } - + // We need to determine m_current ourselves when navigation keys // are used. Note that PAGEUP and PAGEDOWN do not alter the current // item on native Mac ListCtrl, so we only handle up and down keys. @@ -695,7 +695,7 @@ void wxListCtrl::OnChar(wxKeyEvent& event) m_current -= 1; else m_current = 0; - + break; case WXK_DOWN: @@ -703,7 +703,7 @@ void wxListCtrl::OnChar(wxKeyEvent& event) m_current += 1; else m_current = GetItemCount() - 1; - + break; } @@ -785,7 +785,7 @@ wxListCtrl::~wxListCtrl() delete m_imageListState; delete m_renameTimer; - + WX_CLEAR_LIST(wxColumnList, m_colsInfo); } @@ -963,7 +963,7 @@ bool wxListCtrl::SetColumn(int col, wxListItem& item) if (m_dbImpl) { wxASSERT_MSG( col < (int)m_colsInfo.GetCount(), wxT("invalid column index in wxMacListCtrlItem") ); - + long mask = item.GetMask(); { wxListItem listItem; @@ -1406,7 +1406,7 @@ bool wxListCtrl::GetSubItemRect( long item, long subItem, wxRect& rect, int code if (m_genericImpl) return m_genericImpl->GetSubItemRect(item, subItem, rect, code); - // TODO: implement for DataBrowser implementation + // TODO: implement for DataBrowser implementation return false; } @@ -1423,7 +1423,7 @@ bool wxListCtrl::GetItemRect(long item, wxRect& rect, int code) const DataBrowserTableViewColumnID col = 0; verify_noerr( m_dbImpl->GetColumnIDFromIndex( 0, &col ) ); - + Rect bounds; DataBrowserPropertyPart part = kDataBrowserPropertyEnclosingPart; if ( code == wxLIST_RECT_LABEL ) @@ -1670,7 +1670,7 @@ long wxListCtrl::GetNextItem(long item, int geom, int state) const if ( !IsVirtual() ) id = (DataBrowserItemID)m_dbImpl->GetItemFromLine(line); - if ( (state & wxLIST_STATE_FOCUSED) && (m_current == line)) + if ( (state & wxLIST_STATE_FOCUSED) && (m_current == line)) return line; if ( (state == wxLIST_STATE_DONTCARE ) ) @@ -1693,7 +1693,7 @@ long wxListCtrl::GetNextItem(long item, int geom, int state) const if ( !IsVirtual() ) id = (DataBrowserItemID)m_dbImpl->GetItemFromLine(line); - if ( (state & wxLIST_STATE_FOCUSED) && (m_current == line)) + if ( (state & wxLIST_STATE_FOCUSED) && (m_current == line)) return line; if ( (state == wxLIST_STATE_DONTCARE ) ) @@ -2170,7 +2170,7 @@ long wxListCtrl::InsertColumn(long col, wxListItem& item) just = teFlushRight; } m_dbImpl->InsertColumn(col, type, item.GetText(), just, width); - + wxListItem* listItem = new wxListItem(item); m_colsInfo.Insert( col, listItem ); SetColumn(col, item); @@ -2703,10 +2703,10 @@ void wxMacDataBrowserListCtrlControl::DrawItem( wxString text; wxFont font = wxNullFont; int imgIndex = -1; - + DataBrowserTableViewColumnIndex listColumn = 0; GetColumnPosition( property, &listColumn ); - + wxListCtrl* list = wxDynamicCast( GetWXPeer() , wxListCtrl ); wxMacListCtrlItem* lcItem; wxColour color = *wxBLACK; @@ -3049,7 +3049,7 @@ void wxMacDataBrowserListCtrlControl::ItemNotification(DataBrowserItemID itemID, { item = (wxMacListCtrlItem *) itemID; } - + // we want to depend on as little as possible to make sure tear-down of controls is safe if ( message == kDataBrowserItemRemoved ) { @@ -3293,10 +3293,10 @@ void wxMacDataBrowserListCtrlControl::MacGetColumnInfo( unsigned int row, unsign } } } - + void wxMacDataBrowserListCtrlControl::MacInsertItem( unsigned int n, wxListItem* item ) { - + wxMacDataItemBrowserControl::MacInsert(n, new wxMacListCtrlItem() ); MacSetColumnInfo(n, 0, item); } diff --git a/src/osx/carbon/mediactrl.cpp b/src/osx/carbon/mediactrl.cpp index cdf988e5d8..1c79b752e0 100644 --- a/src/osx/carbon/mediactrl.cpp +++ b/src/osx/carbon/mediactrl.cpp @@ -327,7 +327,7 @@ wxQTMediaBackend::~wxQTMediaBackend() // Dispose of the movie controller ::DisposeMovieController(m_mc); m_mc = NULL; - + // Dispose of offscreen GWorld ::DisposeGWorld(m_movieWorld); } @@ -435,7 +435,7 @@ bool wxQTMediaBackend::Load(const wxString& fileName) NULL); // wasChanged // Do not use ::GetMoviesStickyError() here because it returns -2009 - // a.k.a. invalid track on valid mpegs + // a.k.a. invalid track on valid mpegs if (err == noErr && ::GetMoviesError() == noErr) { ::CloseMovieFile(movieResFile); diff --git a/src/osx/carbon/menu.cpp b/src/osx/carbon/menu.cpp index 5db7b7bc50..3b258bba5c 100644 --- a/src/osx/carbon/menu.cpp +++ b/src/osx/carbon/menu.cpp @@ -37,10 +37,10 @@ // under carbon there's no such thing as a MenuItemRef, everything is done // on the 'parent' menu via index APIs (first line having index 1 !) -// so to make things still work, we store the wxMenuItemImpl instance as a +// so to make things still work, we store the wxMenuItemImpl instance as a // RefCon at the respective menu line -class wxMenuItemCarbonImpl : public wxMenuItemImpl +class wxMenuItemCarbonImpl : public wxMenuItemImpl { public : wxMenuItemCarbonImpl( wxMenuItem* peer ) : wxMenuItemImpl(peer) @@ -48,9 +48,9 @@ public : // the parent menu ref is only set, once the item has been attached m_parentMenuRef = NULL; } - + ~wxMenuItemCarbonImpl(); - + void SetBitmap( const wxBitmap& bitmap ) { MenuItemIndex i = FindMenuItemIndex() ; @@ -74,21 +74,21 @@ public : #endif } } - } - - void Enable( bool enable ) + } + + void Enable( bool enable ) { MenuItemIndex i = FindMenuItemIndex() ; if ( i > 0 ) { - + if ( GetWXPeer()->GetId() == wxApp::s_macPreferencesMenuItemId) { if ( enable ) EnableMenuCommand( NULL , kHICommandPreferences ) ; else DisableMenuCommand( NULL , kHICommandPreferences ) ; - } + } else if ( GetWXPeer()->GetId() == wxApp::s_macExitMenuItemId) { if ( enable ) @@ -96,20 +96,20 @@ public : else DisableMenuCommand( NULL , kHICommandQuit ) ; } - + if ( enable ) EnableMenuItem(m_parentMenuRef , i); else DisableMenuItem(m_parentMenuRef , i); - + if ( GetWXPeer()->IsSubMenu() ) { UMAEnableMenuItem( GetWXPeer()->GetSubMenu()->GetHMenu() , 0 , enable ) ; } } - } - - void Check( bool check ) + } + + void Check( bool check ) { MenuItemIndex i = FindMenuItemIndex() ; if ( i > 0 ) @@ -119,9 +119,9 @@ public : else ::SetItemMark( m_parentMenuRef, i, 0 ) ; // no mark } - } + } - void Hide( bool hide ) + void Hide( bool hide ) { MenuItemIndex i = FindMenuItemIndex() ; if ( i > 0 ) @@ -131,9 +131,9 @@ public : else ChangeMenuItemAttributes( m_parentMenuRef, i, 0 , kMenuItemAttrHidden ); } - } - - void SetLabel( const wxString& text, wxAcceleratorEntry *entry ) + } + + void SetLabel( const wxString& text, wxAcceleratorEntry *entry ) { MenuItemIndex i = FindMenuItemIndex() ; if ( i > 0 ) @@ -142,12 +142,12 @@ public : UMASetMenuItemShortcut( m_parentMenuRef, i , entry ) ; } } - + void * GetHMenuItem() { return NULL; } - + // Carbon Only - - void AttachToParent( MenuRef parentMenuRef, MenuItemIndex index ) + + void AttachToParent( MenuRef parentMenuRef, MenuItemIndex index ) { m_parentMenuRef = parentMenuRef; if ( m_parentMenuRef && index > 0 ) @@ -180,7 +180,7 @@ protected : // wxMenuImpl // -class wxMenuCarbonImpl : public wxMenuImpl +class wxMenuCarbonImpl : public wxMenuImpl { public : wxMenuCarbonImpl( wxMenu* peer , MenuRef menu) : wxMenuImpl(peer), m_osxMenu(menu) @@ -188,8 +188,8 @@ public : } virtual ~wxMenuCarbonImpl(); - - virtual void InsertOrAppend(wxMenuItem *pItem, size_t pos) + + virtual void InsertOrAppend(wxMenuItem *pItem, size_t pos) { // MacOS counts menu items from 1 and inserts after, therefore having the // same effect as wx 0 based and inserting before, we must correct pos @@ -198,14 +198,14 @@ public : MenuItemIndex index = pos; if ( pos == (size_t) -1 ) index = CountMenuItems(m_osxMenu); - + if ( pItem->IsSeparator() ) { InsertMenuItemTextWithCFString( m_osxMenu, CFSTR(""), index, kMenuItemAttrSeparator, 0); // now switch to the Carbon 1 based counting index += 1 ; } - else + else { InsertMenuItemTextWithCFString( m_osxMenu, CFSTR("placeholder"), index, 0, 0 ); @@ -223,7 +223,7 @@ public : SetMenuItemCommandID( m_osxMenu, index , wxIdToMacCommand(pItem->GetId()) ) ; } } - + wxMenuItemCarbonImpl* impl = (wxMenuItemCarbonImpl*) pItem->GetPeer(); impl->AttachToParent( m_osxMenu, index ); // only now can all settings be updated correctly @@ -231,8 +231,8 @@ public : pItem->UpdateItemStatus(); pItem->UpdateItemBitmap(); } - - virtual void Remove( wxMenuItem *pItem ) + + virtual void Remove( wxMenuItem *pItem ) { wxMenuItemCarbonImpl* impl = (wxMenuItemCarbonImpl*) pItem->GetPeer(); if ( impl ) @@ -245,7 +245,7 @@ public : } } } - + virtual void MakeRoot() { SetRootMenu( m_osxMenu ); @@ -354,7 +354,7 @@ wxMenuItemCarbonImpl::~wxMenuItemCarbonImpl() } -wxMenuItemImpl* wxMenuItemImpl::Create( wxMenuItem* peer, +wxMenuItemImpl* wxMenuItemImpl::Create( wxMenuItem* peer, wxMenu * WXUNUSED(pParentMenu), int WXUNUSED(id), const wxString& WXUNUSED(text), diff --git a/src/osx/carbon/menuitem.cpp b/src/osx/carbon/menuitem.cpp index 6e6c26d3f7..55df8c725c 100644 --- a/src/osx/carbon/menuitem.cpp +++ b/src/osx/carbon/menuitem.cpp @@ -21,5 +21,5 @@ #include "wx/osx/private.h" -// because on mac carbon everything is done through MenuRef APIs both implementation +// because on mac carbon everything is done through MenuRef APIs both implementation // classes are in menu.cpp diff --git a/src/osx/carbon/nonownedwnd.cpp b/src/osx/carbon/nonownedwnd.cpp index da850b200d..db30cb846c 100644 --- a/src/osx/carbon/nonownedwnd.cpp +++ b/src/osx/carbon/nonownedwnd.cpp @@ -132,7 +132,7 @@ void wxNonOwnedWindowCarbonImpl::SetExtraStyle( long exStyle ) } bool wxNonOwnedWindowCarbonImpl::SetBackgroundStyle(wxBackgroundStyle style) -{ +{ if ( style == wxBG_STYLE_TRANSPARENT ) { OSStatus err = HIWindowChangeFeatures( m_macWindow, 0, kWindowIsOpaque ); @@ -232,7 +232,7 @@ void wxNonOwnedWindowCarbonImpl::MacSetUnifiedAppearance( bool set ) // for wx. // TODO: Determine if we need this on Leopard as well. (should be harmless either way, // though) - // since when creating the peering is not yet completely set-up we call both setters + // since when creating the peering is not yet completely set-up we call both setters // explicitely m_wxPeer->SetBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW) ) ; SetBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW) ) ; @@ -680,7 +680,7 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler), ::HiliteMenu(0); result = noErr ; } - } + } else if ( window && windowPart == inProxyIcon ) { // special case proxy icon bar, as we are having a low-level runloop we must do it ourselves @@ -739,7 +739,7 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler), wxWindow* cursorTarget = currentMouseWindow ; wxPoint cursorPoint( wxevent.m_x , wxevent.m_y ) ; - + extern wxCursor gGlobalCursor; if (!gGlobalCursor.IsOk()) @@ -764,7 +764,7 @@ wxMacTopLevelMouseEventHandler(EventHandlerCallRef WXUNUSED(handler), wxSTANDARD_CURSOR->MacInstall() ; } } - + // don't mess with controls we don't know about // for some reason returning eventNotHandledErr does not lead to the correct behaviour // so we try sending them the correct control directly @@ -868,8 +868,8 @@ wxNonOwnedWindowEventHandler(EventHandlerCallRef WXUNUSED(handler), newRect.bottom - newRect.top + deltaheight ) ; toplevelWindow->HandleResizing( cEvent.GetTicks(), &adjustR ); - - const Rect adjustedRect = { adjustR.y + top , adjustR.x + left , adjustR.y + top + adjustR.height - deltaheight , + + const Rect adjustedRect = { adjustR.y + top , adjustR.x + left , adjustR.y + top + adjustR.height - deltaheight , adjustR.x + left + adjustR.width - deltawidth } ; if ( !EqualRect( &newRect , &adjustedRect ) ) cEvent.SetParameter( kEventParamCurrentBounds , &adjustedRect ) ; @@ -1136,7 +1136,7 @@ wxNonOwnedWindowCarbonImpl::~wxNonOwnedWindowCarbonImpl() } void wxNonOwnedWindowCarbonImpl::Destroy() -{ +{ if ( m_macEventHandler ) { ::RemoveEventHandler((EventHandlerRef) m_macEventHandler); @@ -1186,7 +1186,7 @@ void wxNonOwnedWindowCarbonImpl::Create( wxWindow* parent, const wxPoint& pos, const wxSize& size, - long style, long extraStyle, + long style, long extraStyle, const wxString& WXUNUSED(name) ) { @@ -1483,27 +1483,27 @@ bool wxNonOwnedWindowCarbonImpl::ShowWithEffect(bool show, return true; } -void wxNonOwnedWindowCarbonImpl::SetTitle( const wxString& title, wxFontEncoding encoding ) +void wxNonOwnedWindowCarbonImpl::SetTitle( const wxString& title, wxFontEncoding encoding ) { SetWindowTitleWithCFString( m_macWindow , wxCFStringRef( title , encoding ) ) ; } - + bool wxNonOwnedWindowCarbonImpl::IsMaximized() const { return IsWindowInStandardState( m_macWindow , NULL , NULL ) ; } - + bool wxNonOwnedWindowCarbonImpl::IsIconized() const { return IsWindowCollapsed((WindowRef)GetWXWindow() ) ; } - + void wxNonOwnedWindowCarbonImpl::Iconize( bool iconize ) { if ( IsWindowCollapsable( m_macWindow ) ) CollapseWindow( m_macWindow , iconize ) ; } - + void wxNonOwnedWindowCarbonImpl::Maximize(bool maximize) { Point idealSize = { 0 , 0 } ; @@ -1524,12 +1524,12 @@ void wxNonOwnedWindowCarbonImpl::Maximize(bool maximize) } ZoomWindowIdeal( (WindowRef)GetWXWindow() , maximize ? inZoomOut : inZoomIn , &idealSize ) ; } - + bool wxNonOwnedWindowCarbonImpl::IsFullScreen() const { return m_macFullScreenData != NULL ; } - + bool wxNonOwnedWindowCarbonImpl::ShowFullScreen(bool show, long style) { if ( show ) @@ -1568,7 +1568,7 @@ bool wxNonOwnedWindowCarbonImpl::ShowFullScreen(bool show, long style) y -= top ; h += top ; // avoid adding the caption twice to the height - outerheight -= top; + outerheight -= top; } if ( style & wxFULLSCREEN_NOBORDER ) diff --git a/src/osx/carbon/notebmac.cpp b/src/osx/carbon/notebmac.cpp index 560831901c..9840b549f4 100644 --- a/src/osx/carbon/notebmac.cpp +++ b/src/osx/carbon/notebmac.cpp @@ -30,12 +30,12 @@ // check that the page index is valid #define IS_VALID_PAGE(nPage) ((nPage) < GetPageCount()) -wxWidgetImplType* wxWidgetImpl::CreateTabView( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), - const wxPoint& pos, +wxWidgetImplType* wxWidgetImpl::CreateTabView( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer, pos, size ); diff --git a/src/osx/carbon/popupwin.cpp b/src/osx/carbon/popupwin.cpp index 299d903862..48dff3d929 100644 --- a/src/osx/carbon/popupwin.cpp +++ b/src/osx/carbon/popupwin.cpp @@ -3,7 +3,7 @@ // Purpose: implements wxPopupWindow for wxMac // Author: Stefan Csomor // Modified by: -// Created: +// Created: // RCS-ID: $Id$ // Copyright: (c) 2006 Stefan Csomor // License: wxWindows licence @@ -34,7 +34,7 @@ #include "wx/popupwin.h" #include "wx/tooltip.h" -#include "wx/osx/private.h" +#include "wx/osx/private.h" // ============================================================================ // implementation diff --git a/src/osx/carbon/printdlg.cpp b/src/osx/carbon/printdlg.cpp index 0232701404..fae5551255 100644 --- a/src/osx/carbon/printdlg.cpp +++ b/src/osx/carbon/printdlg.cpp @@ -35,7 +35,7 @@ int wxMacPrintDialog::ShowModal() ((wxOSXPrintData*)m_printDialogData.GetPrintData().GetNativeData())->TransferFrom( &m_printDialogData ); int result = wxID_CANCEL; - + OSErr err = noErr; Boolean accepted; wxOSXPrintData* nativeData = (wxOSXPrintData*)m_printDialogData.GetPrintData().GetNativeData(); diff --git a/src/osx/carbon/radiobut.cpp b/src/osx/carbon/radiobut.cpp index 61218e28fe..78c350f0ca 100644 --- a/src/osx/carbon/radiobut.cpp +++ b/src/osx/carbon/radiobut.cpp @@ -16,14 +16,14 @@ #include "wx/radiobut.h" #include "wx/osx/private.h" -wxWidgetImplType* wxWidgetImpl::CreateRadioButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateRadioButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), const wxString& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), - long WXUNUSED(extraStyle)) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ) ; wxMacControl* peer = new wxMacControl(wxpeer) ; diff --git a/src/osx/carbon/region.cpp b/src/osx/carbon/region.cpp index 8a4b131db8..1df36935a3 100644 --- a/src/osx/carbon/region.cpp +++ b/src/osx/carbon/region.cpp @@ -101,7 +101,7 @@ wxRegion::wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode WXUNUSED(f wxUnusedVar(n); wxUnusedVar(points); -#if 0 +#if 0 // no non-QD APIs available // TODO : remove ? // OS X somehow does not collect the region invisibly as before, so sometimes things @@ -139,7 +139,7 @@ wxRegion::wxRegion(size_t n, const wxPoint *points, wxPolygonFillMode WXUNUSED(f RgnHandle tempRgn = NewRgn(); CloseRgn( tempRgn ) ; - + ::SetGWorld( oldWorld, oldGDHandle ); wxCFRef tempShape( HIShapeCreateWithQDRgn(tempRgn ) ); m_refData = new wxRegionRefData(tempShape); @@ -504,7 +504,7 @@ void wxRegionIterator::Reset(const wxRegion& region) #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, + OSStatus err = HIShapeEnumerate (OTHER_M_REGION(region), kHIShapeParseFromTopLeft, wxOSXRegionToRectsCounterCallback, (void*)&m_numRects); if (err == noErr) { @@ -512,7 +512,7 @@ void wxRegionIterator::Reset(const wxRegion& region) RegionToRectsCallbackData data ; data.m_rects = m_rects ; data.m_current = 0 ; - HIShapeEnumerate( OTHER_M_REGION(region), kHIShapeParseFromTopLeft, wxOSXRegionToRectsSetterCallback, + HIShapeEnumerate( OTHER_M_REGION(region), kHIShapeParseFromTopLeft, wxOSXRegionToRectsSetterCallback, (void*)&data ); } else @@ -536,7 +536,7 @@ void wxRegionIterator::Reset(const wxRegion& region) RegionToRectsCallbackData data ; data.m_rects = m_rects ; data.m_current = 0 ; - QDRegionToRects( rgn , kQDParseRegionFromTopLeft, wxMacRegionToRectsSetterCallback, + QDRegionToRects( rgn , kQDParseRegionFromTopLeft, wxMacRegionToRectsSetterCallback, (void*)&data ); } else diff --git a/src/osx/carbon/scrolbar.cpp b/src/osx/carbon/scrolbar.cpp index c5ccacbb6e..53487b5e8e 100644 --- a/src/osx/carbon/scrolbar.cpp +++ b/src/osx/carbon/scrolbar.cpp @@ -27,8 +27,8 @@ public : wxOSXScrollBarCarbonImpl( wxWindowMac* peer) : wxMacControl( peer ) { } - - void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) + + void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) { SetValue( value ); SetControlViewSize(m_controlRef , thumbSize ); @@ -36,12 +36,12 @@ public : protected: }; -wxWidgetImplType* wxWidgetImpl::CreateScrollBar( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), - const wxPoint& pos, +wxWidgetImplType* wxWidgetImpl::CreateScrollBar( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer, pos, size ); diff --git a/src/osx/carbon/settings.cpp b/src/osx/carbon/settings.cpp index 37421f5904..bc6b13ad73 100644 --- a/src/osx/carbon/settings.cpp +++ b/src/osx/carbon/settings.cpp @@ -159,7 +159,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index) wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) { wxFont font; - + switch (index) { case wxSYS_ANSI_VAR_FONT : @@ -252,7 +252,7 @@ int wxSystemSettingsNative::GetMetric(wxSystemMetric index, wxWindow* WXUNUSED(w #if wxOSX_USE_CARBON return (int)(GetDblTime() * 1000. / 60.); #else - // default on mac is 30 ticks, we shouldn't really use wxSYS_DCLICK_MSEC anyway + // default on mac is 30 ticks, we shouldn't really use wxSYS_DCLICK_MSEC anyway // but rather rely on the 'click-count' by the system delivered in a mouse event return 500; #endif diff --git a/src/osx/carbon/slider.cpp b/src/osx/carbon/slider.cpp index 11d2301592..b471a01680 100644 --- a/src/osx/carbon/slider.cpp +++ b/src/osx/carbon/slider.cpp @@ -16,15 +16,15 @@ #include "wx/slider.h" #include "wx/osx/private.h" -wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), wxInt32 value, wxInt32 minimum, wxInt32 maximum, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer, pos, size ); diff --git a/src/osx/carbon/spinbutt.cpp b/src/osx/carbon/spinbutt.cpp index 9c45ad494b..8068d96cec 100644 --- a/src/osx/carbon/spinbutt.cpp +++ b/src/osx/carbon/spinbutt.cpp @@ -17,22 +17,22 @@ #include "wx/osx/private.h" -wxWidgetImplType* wxWidgetImpl::CreateSpinButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateSpinButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), wxInt32 value, wxInt32 minimum, wxInt32 maximum, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ); wxMacControl* peer = new wxMacControl( wxpeer ); OSStatus err = CreateLittleArrowsControl( - MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, value, + MAC_WXHWND(parent->MacGetTopLevelWindowRef()), &bounds, value, minimum, maximum, 1, peer->GetControlRefAddr() ); verify_noerr( err ); diff --git a/src/osx/carbon/srchctrl.cpp b/src/osx/carbon/srchctrl.cpp index 099b462873..1fa193c354 100644 --- a/src/osx/carbon/srchctrl.cpp +++ b/src/osx/carbon/srchctrl.cpp @@ -39,7 +39,7 @@ public : const wxString& str, const wxPoint& pos, const wxSize& size, long style ) ; - + // search field options virtual void ShowSearchButton( bool show ); virtual bool IsSearchButtonVisible() const; @@ -50,7 +50,7 @@ public : virtual void SetSearchMenu( wxMenu* menu ); virtual void SetDescriptiveText(const wxString& text); - + virtual bool SetFocus(); private: @@ -204,13 +204,13 @@ bool wxMacSearchFieldControl::SetFocus() return true; } -wxWidgetImplType* wxWidgetImpl::CreateSearchControl( wxTextCtrl* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateSearchControl( wxTextCtrl* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& str, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { wxMacControl* peer = new wxMacSearchFieldControl( wxpeer , str , pos , size , style ); diff --git a/src/osx/carbon/statbox.cpp b/src/osx/carbon/statbox.cpp index 173b4212ca..d999701476 100644 --- a/src/osx/carbon/statbox.cpp +++ b/src/osx/carbon/statbox.cpp @@ -16,13 +16,13 @@ #include "wx/statbox.h" #include "wx/osx/private.h" -wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), const wxString& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer, pos, size ); diff --git a/src/osx/carbon/statlmac.cpp b/src/osx/carbon/statlmac.cpp index 77af6bb86e..4b272a33b1 100644 --- a/src/osx/carbon/statlmac.cpp +++ b/src/osx/carbon/statlmac.cpp @@ -37,13 +37,13 @@ // implementation // ============================================================================ -wxWidgetImplType* wxWidgetImpl::CreateStaticLine( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), - const wxPoint& pos, +wxWidgetImplType* wxWidgetImpl::CreateStaticLine( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), - long WXUNUSED(extraStyle)) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ) ; wxMacControl* peer = new wxMacControl(wxpeer) ; diff --git a/src/osx/carbon/stattext.cpp b/src/osx/carbon/stattext.cpp index e51b2af2b1..90765430e8 100644 --- a/src/osx/carbon/stattext.cpp +++ b/src/osx/carbon/stattext.cpp @@ -69,15 +69,15 @@ wxSize wxStaticText::DoGetBestSize() const SInt16 baseline; if ( m_font.MacGetThemeFontID() != kThemeCurrentPortFont ) { - // GetThemeTextDimensions will cache strings and the documentation - // says not to use the NoCopy string creation calls. - // This also means that we can't use CFSTR without - // -fno-constant-cfstrings if the library might be unloaded, - // as GetThemeTextDimensions may cache a pointer to our - // unloaded segment. - wxCFStringRef str( !m_label.empty() ? m_label : wxString(" "), + // GetThemeTextDimensions will cache strings and the documentation + // says not to use the NoCopy string creation calls. + // This also means that we can't use CFSTR without + // -fno-constant-cfstrings if the library might be unloaded, + // as GetThemeTextDimensions may cache a pointer to our + // unloaded segment. + wxCFStringRef str( !m_label.empty() ? m_label : wxString(" "), GetFont().GetEncoding() ); - + err = GetThemeTextDimensions( (CFStringRef)str, m_font.MacGetThemeFontID(), kThemeStateActive, false, &bounds, &baseline ); diff --git a/src/osx/carbon/taskbar.cpp b/src/osx/carbon/taskbar.cpp index 01a99d6566..737f6b4977 100644 --- a/src/osx/carbon/taskbar.cpp +++ b/src/osx/carbon/taskbar.cpp @@ -141,7 +141,7 @@ wxDockEventHandler(EventHandlerCallRef WXUNUSED(inHandlerCallRef), wxDockTaskBarIcon* pTB = (wxDockTaskBarIcon*) pData; const UInt32 eventClass = GetEventClass(inEvent); const UInt32 eventKind = GetEventKind(inEvent); - + OSStatus err = eventNotHandledErr; // Handle wxTaskBar menu events (note that this is a global event handler diff --git a/src/osx/carbon/textctrl.cpp b/src/osx/carbon/textctrl.cpp index 0d71b376f6..549c81b172 100644 --- a/src/osx/carbon/textctrl.cpp +++ b/src/osx/carbon/textctrl.cpp @@ -223,7 +223,7 @@ class wxMacMLTEControl : public wxMacControl, public wxTextWidgetImpl public : wxMacMLTEControl( wxTextCtrl *peer ) ; ~wxMacMLTEControl() {} - + virtual bool CanFocus() const { return true; } @@ -332,7 +332,7 @@ public : return true; } - virtual void Move(int x, int y, int width, int height); + virtual void Move(int x, int y, int width, int height); protected : OSStatus DoCreate(); @@ -361,13 +361,13 @@ private : SInt32 m_lastVerticalValue ; }; -wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& str, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { bool forceMLTE = false ; @@ -1732,7 +1732,7 @@ void wxMacMLTEClassicControl::MacUpdatePosition() } } -void wxMacMLTEClassicControl::Move(int x, int y, int width, int height) +void wxMacMLTEClassicControl::Move(int x, int y, int width, int height) { wxMacControl::Move(x,y,width,height) ; MacUpdatePosition() ; diff --git a/src/osx/carbon/tglbtn.cpp b/src/osx/carbon/tglbtn.cpp index 51feb61402..8aac11df6c 100644 --- a/src/osx/carbon/tglbtn.cpp +++ b/src/osx/carbon/tglbtn.cpp @@ -26,38 +26,38 @@ #include "wx/osx/private.h" // Button -wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), const wxString& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ) ; - + wxMacControl* peer = new wxMacControl(wxpeer) ; - verify_noerr ( CreateBevelButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") , + verify_noerr ( CreateBevelButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") , kControlBevelButtonNormalBevel , kControlBehaviorToggles , NULL , 0 , 0 , 0 , peer->GetControlRefAddr() ) ); return peer; } - -wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID WXUNUSED(id), + +wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer, + wxWindowMac* parent, + wxWindowID WXUNUSED(id), const wxBitmap& label, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) -{ +{ Rect bounds = wxMacGetBoundsForControl( wxpeer , pos , size ) ; wxMacControl* peer = new wxMacControl(wxpeer) ; - + ControlButtonContentInfo info; wxMacCreateBitmapButton( &info, label ); - verify_noerr ( CreateBevelButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") , + verify_noerr ( CreateBevelButtonControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , CFSTR("") , kControlBevelButtonNormalBevel , kControlBehaviorOffsetContents | kControlBehaviorToggles , &info , 0 , 0 , 0 , peer->GetControlRefAddr() ) ); wxMacReleaseBitmapButton( &info ) ; diff --git a/src/osx/carbon/thread.cpp b/src/osx/carbon/thread.cpp index 492b45ab46..2cabb70b5f 100644 --- a/src/osx/carbon/thread.cpp +++ b/src/osx/carbon/thread.cpp @@ -1191,8 +1191,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule) bool wxThreadModule::OnInit() { - bool hasThreadManager = -#ifdef __LP64__ + bool hasThreadManager = +#ifdef __LP64__ true ; // TODO VERIFY IN NEXT BUILD #else MPLibraryIsLoaded(); diff --git a/src/osx/carbon/tooltip.cpp b/src/osx/carbon/tooltip.cpp index 92054cbaee..0b7630ac79 100644 --- a/src/osx/carbon/tooltip.cpp +++ b/src/osx/carbon/tooltip.cpp @@ -159,7 +159,7 @@ void wxToolTip::RemoveToolTips() } // --- mac specific -#if wxUSE_TIMER +#if wxUSE_TIMER wxMacToolTipTimer::wxMacToolTipTimer( wxMacToolTip *tip , int msec ) { m_tip = tip; @@ -172,7 +172,7 @@ wxMacToolTip::wxMacToolTip() { m_window = NULL ; m_backpict = NULL ; -#if wxUSE_TIMER +#if wxUSE_TIMER m_timer = NULL ; #endif m_mark = 0 ; @@ -189,7 +189,7 @@ void wxMacToolTip::Setup( WindowRef win , const wxString& text , const wxPoint& m_window =win; s_ToolTipWindowRef = m_window ; m_backpict = NULL ; -#if wxUSE_TIMER +#if wxUSE_TIMER delete m_timer ; m_timer = new wxMacToolTipTimer( this , s_ToolTipDelay ) ; @@ -198,7 +198,7 @@ void wxMacToolTip::Setup( WindowRef win , const wxString& text , const wxPoint& wxMacToolTip::~wxMacToolTip() { -#if wxUSE_TIMER +#if wxUSE_TIMER if ( m_timer ) { delete m_timer ; @@ -250,7 +250,7 @@ void wxToolTip::NotifyWindowDelete( WXHWND win ) void wxMacToolTip::Clear() { m_mark++ ; -#if wxUSE_TIMER +#if wxUSE_TIMER if ( m_timer ) { delete m_timer ; diff --git a/src/osx/carbon/uma.cpp b/src/osx/carbon/uma.cpp index 3009393821..8606c1196f 100644 --- a/src/osx/carbon/uma.cpp +++ b/src/osx/carbon/uma.cpp @@ -246,12 +246,12 @@ static OSStatus UMAGetHelpMenu( bool allowHelpMenuCreation) { static bool s_createdHelpMenu = false ; - + if ( !s_createdHelpMenu && !allowHelpMenuCreation ) { return paramErr ; } - + OSStatus status = HMGetHelpMenu( outHelpMenu , outFirstCustomItemIndex ) ; s_createdHelpMenu = ( status == noErr ) ; return status ; diff --git a/src/osx/carbon/utils.cpp b/src/osx/carbon/utils.cpp index dd44627d41..32640b160c 100644 --- a/src/osx/carbon/utils.cpp +++ b/src/osx/carbon/utils.cpp @@ -1031,7 +1031,7 @@ void wxMacDataItemBrowserControl::MacInsert( unsigned int n, wxMacDataItem* item { if ( m_sortOrder == SortOrder_None ) { - + // increase the order of the lines to be shifted unsigned int lines = MacGetCount(); for ( unsigned int i = n; i < lines; ++i) @@ -1039,7 +1039,7 @@ void wxMacDataItemBrowserControl::MacInsert( unsigned int n, wxMacDataItem* item wxMacDataItem* iter = (wxMacDataItem*) GetItemFromLine(i); iter->SetOrder( iter->GetOrder() + 1 ); } - + #if 0 // I don't understand what this code is supposed to do, RR. SInt32 frontLineOrder = 0; @@ -1048,7 +1048,7 @@ void wxMacDataItemBrowserControl::MacInsert( unsigned int n, wxMacDataItem* item wxMacDataItem* iter = (wxMacDataItem*) GetItemFromLine(n-1); frontLineOrder = iter->GetOrder()+1; } -#else +#else item->SetOrder( n ); #endif } diff --git a/src/osx/carbon/utilscocoa.mm b/src/osx/carbon/utilscocoa.mm index 1c2ec0dc70..c9504907ee 100644 --- a/src/osx/carbon/utilscocoa.mm +++ b/src/osx/carbon/utilscocoa.mm @@ -55,12 +55,12 @@ CGContextRef wxOSXGetContextFromCurrentContext() return context; } -bool wxOSXLockFocus( WXWidget view) +bool wxOSXLockFocus( WXWidget view) { return [view lockFocusIfCanDraw]; } -void wxOSXUnlockFocus( WXWidget view) +void wxOSXUnlockFocus( WXWidget view) { [view unlockFocus]; } @@ -144,21 +144,21 @@ WX_NSFont wxFont::OSXCreateNSFont(wxOSXSystemFont font, wxNativeFontInfo* info) wxFontStyle fontstyle = wxFONTSTYLE_NORMAL; wxFontWeight fontweight = wxFONTWEIGHT_NORMAL; bool underlined = false; - + int size = (int) ([desc pointSize]+0.5); NSFontSymbolicTraits traits = [desc symbolicTraits]; - + if ( traits & NSFontBoldTrait ) fontweight = wxFONTWEIGHT_BOLD ; else fontweight = wxFONTWEIGHT_NORMAL ; if ( traits & NSFontItalicTrait ) fontstyle = wxFONTSTYLE_ITALIC ; - + wxCFStringRef fontname( [desc postscriptName] ); info->Init(size,wxFONTFAMILY_DEFAULT,fontstyle,fontweight,underlined, fontname.AsString(), wxFONTENCODING_DEFAULT); - + } info->m_nsFontDescriptor = desc; return nsfont; @@ -168,7 +168,7 @@ void wxNativeFontInfo::OSXValidateNSFontDescriptor() { NSFontDescriptor* desc = nil; NSFontSymbolicTraits traits = 0; - float weight = 0; + float weight = 0; if (m_weight == wxFONTWEIGHT_BOLD) { @@ -177,15 +177,15 @@ void wxNativeFontInfo::OSXValidateNSFontDescriptor() } else if (m_weight == wxFONTWEIGHT_LIGHT) weight = -1; - + if (m_style == wxFONTSTYLE_ITALIC || m_style == wxFONTSTYLE_SLANT) traits |= NSFontItalicTrait; desc = [NSFontDescriptor fontDescriptorWithFontAttributes: [[NSDictionary alloc] initWithObjectsAndKeys: - wxCFStringRef(m_faceName).AsNSString(), NSFontFamilyAttribute, - [NSNumber numberWithFloat:m_pointSize], NSFontSizeAttribute, - [NSNumber numberWithUnsignedInt:traits], NSFontSymbolicTrait, + wxCFStringRef(m_faceName).AsNSString(), NSFontFamilyAttribute, + [NSNumber numberWithFloat:m_pointSize], NSFontSizeAttribute, + [NSNumber numberWithUnsignedInt:traits], NSFontSymbolicTrait, [NSNumber numberWithFloat:weight],NSFontWeightTrait, nil]]; @@ -237,11 +237,11 @@ WX_UIFont wxFont::OSXCreateUIFont(wxOSXSystemFont font, wxNativeFontInfo* info) wxFontStyle fontstyle = wxFONTSTYLE_NORMAL; wxFontWeight fontweight = wxFONTWEIGHT_NORMAL; bool underlined = false; - + int size = (int) ([uifont pointSize]+0.5); /* NSFontSymbolicTraits traits = [desc symbolicTraits]; - + if ( traits & NSFontBoldTrait ) fontweight = wxFONTWEIGHT_BOLD ; else @@ -252,7 +252,7 @@ WX_UIFont wxFont::OSXCreateUIFont(wxOSXSystemFont font, wxNativeFontInfo* info) wxCFStringRef fontname( wxCFRetain([uifont familyName]) ); info->Init(size,wxFONTFAMILY_DEFAULT,fontstyle,fontweight,underlined, fontname.AsString(), wxFONTENCODING_DEFAULT); - + } return uifont; } @@ -274,7 +274,7 @@ WX_UIFont wxFont::OSXCreateUIFont(const wxNativeFontInfo* info) WX_UIImage wxOSXCreateUIImageFromCGImage( CGImageRef image ) { - UIImage *newImage = [UIImage imageWithCGImage:image]; + UIImage *newImage = [UIImage imageWithCGImage:image]; [newImage autorelease]; return( newImage ); } @@ -287,20 +287,20 @@ WX_UIImage wxOSXCreateUIImageFromCGImage( CGImageRef image ) WX_NSImage wxOSXCreateNSImageFromCGImage( CGImageRef image ) { 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); - + // Create a new image to receive the Quartz image data. - NSImage *newImage = [[NSImage alloc] initWithSize:imageRect.size]; + NSImage *newImage = [[NSImage alloc] initWithSize:imageRect.size]; [newImage lockFocus]; - + // Get the Quartz context and draw. CGContextRef imageContext = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort]; CGContextDrawImage( imageContext, *(CGRect*)&imageRect, image ); [newImage unlockFocus]; - + /* // Create a bitmap rep from the image... NSBitmapImageRep *bitmapRep = [[NSBitmapImageRep alloc] initWithCGImage:cgImage]; @@ -436,7 +436,7 @@ WX_NSCursor wxMacCocoaCreateStockCursor( int cursor_type ) case wxCURSOR_HAND: cursor = [[NSCursor pointingHandCursor] retain]; break; - + case wxCURSOR_BULLSEYE: cursor = wxGetStockCursor(kwxCursorBullseye); break; @@ -505,19 +505,19 @@ WX_NSCursor wxMacCocoaCreateStockCursor( int cursor_type ) WX_NSCursor wxMacCocoaCreateCursorFromCGImage( CGImageRef cgImageRef, float hotSpotX, float hotSpotY ) { static BOOL firstTime = YES; - + if ( firstTime ) { // Must first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image [[[NSWindow alloc] init] release]; firstTime = NO; } - + NSImage *nsImage = wxOSXCreateNSImageFromCGImage( cgImageRef ); NSCursor *cursor = [[NSCursor alloc] initWithImage:nsImage hotSpot:NSMakePoint( hotSpotX, hotSpotY )]; - + [nsImage release]; - + return cursor; } diff --git a/src/osx/checkbox_osx.cpp b/src/osx/checkbox_osx.cpp index 4a0b46ecd8..8ca03f2d34 100644 --- a/src/osx/checkbox_osx.cpp +++ b/src/osx/checkbox_osx.cpp @@ -80,11 +80,11 @@ void wxCheckBox::DoSet3StateValue(wxCheckBoxState val) m_peer->SetValue( val ) ; } -bool wxCheckBox::OSXHandleClicked( double WXUNUSED(timestampsec) ) +bool wxCheckBox::OSXHandleClicked( double WXUNUSED(timestampsec) ) { bool sendEvent = true; wxCheckBoxState newState = Get3StateValue(); - + if ( !m_peer->ButtonClickDidStateChange() ) { wxCheckBoxState origState ; diff --git a/src/osx/checklst_osx.cpp b/src/osx/checklst_osx.cpp index 98a9b96cb5..fd1d66d478 100644 --- a/src/osx/checklst_osx.cpp +++ b/src/osx/checklst_osx.cpp @@ -28,7 +28,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxCheckListBox, wxListBox) BEGIN_EVENT_TABLE(wxCheckListBox, wxListBox) END_EVENT_TABLE() - + void wxCheckListBox::Init() { } @@ -118,7 +118,7 @@ void wxCheckListBox::SetValueCallback( unsigned int n, wxListWidgetColumn* col , if ( col == m_checkColumn ) { Check( n, value.IsChecked() ); - + wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, GetId() ); event.SetInt( n ); event.SetString( GetString( n ) ); diff --git a/src/osx/choice_osx.cpp b/src/osx/choice_osx.cpp index 9702a7da67..2668c1b1cd 100644 --- a/src/osx/choice_osx.cpp +++ b/src/osx/choice_osx.cpp @@ -72,10 +72,10 @@ bool wxChoice::Create(wxWindow *parent, if ( !wxChoiceBase::Create( parent, id, pos, size, style, validator, name ) ) return false; - + m_popUpMenu = new wxMenu(); m_popUpMenu->SetNoEventsMode(true); - + m_peer = wxWidgetImpl::CreateChoice( this, parent, id, m_popUpMenu, pos, size, style, GetExtraStyle() ); MacPostControlCreate( pos, size ); @@ -142,7 +142,7 @@ void wxChoice::DoDeleteOneItem(unsigned int n) if ( HasClientObjectData() ) delete GetClientObject( n ); - + m_popUpMenu->Delete( m_popUpMenu->FindItemByPosition( n ) ); m_strings.RemoveAt( n ) ; @@ -241,7 +241,7 @@ bool wxChoice::OSXHandleClicked( double WXUNUSED(timestampsec) ) event.SetInt( n ); event.SetString( GetStringSelection() ); event.SetEventObject( this ); - + if ( HasClientObjectData() ) event.SetClientObject( GetClientObject( n ) ); else if ( HasClientUntypedData() ) diff --git a/src/osx/cocoa/bmpbuttn.mm b/src/osx/cocoa/bmpbuttn.mm index 516b5fe857..1cbc2dfa81 100644 --- a/src/osx/cocoa/bmpbuttn.mm +++ b/src/osx/cocoa/bmpbuttn.mm @@ -22,14 +22,14 @@ #include "wx/osx/private.h" -wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxBitmap& bitmap, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, - long WXUNUSED(extraStyle)) + long style, + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; @@ -46,10 +46,10 @@ wxWidgetImplType* wxWidgetImpl::CreateBitmapButton( wxWindowMac* wxpeer, else [v setBezelStyle:NSRegularSquareBezelStyle]; } - + if (bitmap.Ok()) [v setImage:bitmap.GetNSImage() ]; - + [v setButtonType:NSMomentaryPushInButton]; wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); return c; diff --git a/src/osx/cocoa/checkbox.mm b/src/osx/cocoa/checkbox.mm index 2f706c51c1..23b02c033b 100644 --- a/src/osx/cocoa/checkbox.mm +++ b/src/osx/cocoa/checkbox.mm @@ -16,22 +16,22 @@ #include "wx/checkbox.h" #include "wx/osx/private.h" -wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, - long WXUNUSED(extraStyle)) + long style, + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; - [v setButtonType:NSSwitchButton]; + [v setButtonType:NSSwitchButton]; if (style & wxCHK_3STATE) [v setAllowsMixedState:YES]; - + wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); return c; } diff --git a/src/osx/cocoa/choice.mm b/src/osx/cocoa/choice.mm index 78ebecbbb9..2ed9724dd4 100644 --- a/src/osx/cocoa/choice.mm +++ b/src/osx/cocoa/choice.mm @@ -33,7 +33,7 @@ + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); @@ -52,13 +52,13 @@ @end -wxWidgetImplType* wxWidgetImpl::CreateChoice( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateChoice( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), wxMenu* menu, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; diff --git a/src/osx/cocoa/dialog.mm b/src/osx/cocoa/dialog.mm index c975bdf1e8..4af807536a 100644 --- a/src/osx/cocoa/dialog.mm +++ b/src/osx/cocoa/dialog.mm @@ -45,9 +45,9 @@ void wxDialog::DoShowModal() } */ NSWindow* theWindow = GetWXWindow(); - + NSModalSession session = [NSApp beginModalSessionForWindow:theWindow]; - while (IsModal()) + while (IsModal()) { wxMacAutoreleasePool autoreleasepool; // we cannot break based on the return value, because nested @@ -55,9 +55,9 @@ void wxDialog::DoShowModal() // unsafe [NSApp runModalSession:session]; - // do some idle processing - if (wxTheApp) - wxTheApp->ProcessIdle(); + // do some idle processing + if (wxTheApp) + wxTheApp->ProcessIdle(); } [NSApp endModalSession:session]; diff --git a/src/osx/cocoa/dirdlg.mm b/src/osx/cocoa/dirdlg.mm index 9ab49d86ec..9baab201ae 100644 --- a/src/osx/cocoa/dirdlg.mm +++ b/src/osx/cocoa/dirdlg.mm @@ -1,8 +1,8 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/osx/cocoa/dirdlg.mm -// Purpose: wxDirDialog +// Purpose: wxDirDialog // Author: Stefan Csomor -// Modified by: +// Modified by: // Created: 2008-08-30 // RCS-ID: $Id: dirdlg.mm 40007 2006-07-05 13:10:46Z SC $ // Copyright: (c) Stefan Csomor @@ -51,26 +51,26 @@ wxDirDialog::wxDirDialog(wxWindow *parent, const wxString& message, int wxDirDialog::ShowModal() { int result = wxID_CANCEL; - + NSOpenPanel *oPanel = [NSOpenPanel openPanel]; [oPanel setCanChooseDirectories:YES]; [oPanel setResolvesAliases:YES]; [oPanel setCanChooseFiles:NO]; - + wxCFStringRef cf( m_message ); [oPanel setMessage:cf.AsNSString()]; - - if ( HasFlag(wxDD_NEW_DIR_BUTTON) ) + + if ( HasFlag(wxDD_NEW_DIR_BUTTON) ) [oPanel setCanCreateDirectories:YES]; wxCFStringRef dir( m_path ); - + m_path = wxEmptyString; wxNonOwnedWindow* parentWindow = NULL; int returnCode = -1; - - if (GetParent()) + + if (GetParent()) { parentWindow = dynamic_cast(wxGetTopLevelParent(GetParent())); } @@ -79,14 +79,14 @@ int wxDirDialog::ShowModal() fprintf(stderr, "No parent!\n"); } -/* +/* if (parentWindow) { NSWindow* nativeParent = parentWindow->GetWXWindow(); - ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; - [oPanel beginSheetForDirectory:dir.AsNSString() file:nil types: nil - modalForWindow: nativeParent modalDelegate: sheetDelegate - didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) + ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; + [oPanel beginSheetForDirectory:dir.AsNSString() file:nil types: nil + modalForWindow: nativeParent modalDelegate: sheetDelegate + didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) contextInfo: nil]; [sheetDelegate waitForSheetToFinish]; returnCode = [sheetDelegate code]; diff --git a/src/osx/cocoa/filedlg.mm b/src/osx/cocoa/filedlg.mm index 4a9d65fbc9..33ece87025 100644 --- a/src/osx/cocoa/filedlg.mm +++ b/src/osx/cocoa/filedlg.mm @@ -153,11 +153,11 @@ int wxFileDialog::ShowModal() m_path = wxEmptyString; m_fileNames.Clear(); - + wxNonOwnedWindow* parentWindow = NULL; int returnCode = -1; - - if (GetParent()) + + if (GetParent()) { parentWindow = dynamic_cast(wxGetTopLevelParent(GetParent())); } @@ -181,10 +181,10 @@ int wxFileDialog::ShowModal() if (parentWindow) { NSWindow* nativeParent = parentWindow->GetWXWindow(); - ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; - [sPanel beginSheetForDirectory:dir.AsNSString() file:file.AsNSString() - modalForWindow: nativeParent modalDelegate: sheetDelegate - didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) + ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; + [sPanel beginSheetForDirectory:dir.AsNSString() file:file.AsNSString() + modalForWindow: nativeParent modalDelegate: sheetDelegate + didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) contextInfo: nil]; [sheetDelegate waitForSheetToFinish]; returnCode = [sheetDelegate code]; @@ -195,7 +195,7 @@ int wxFileDialog::ShowModal() { returnCode = [sPanel runModalForDirectory:dir.AsNSString() file:file.AsNSString() ]; } - + if (returnCode == NSOKButton ) { panel = sPanel; @@ -220,11 +220,11 @@ int wxFileDialog::ShowModal() if (parentWindow) { NSWindow* nativeParent = parentWindow->GetWXWindow(); - ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; - [oPanel beginSheetForDirectory:dir.AsNSString() file:file.AsNSString() - types: types modalForWindow: nativeParent - modalDelegate: sheetDelegate - didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) + ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; + [oPanel beginSheetForDirectory:dir.AsNSString() file:file.AsNSString() + types: types modalForWindow: nativeParent + modalDelegate: sheetDelegate + didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) contextInfo: nil]; [sheetDelegate waitForSheetToFinish]; returnCode = [sheetDelegate code]; @@ -233,7 +233,7 @@ int wxFileDialog::ShowModal() else */ { - returnCode = [oPanel runModalForDirectory:dir.AsNSString() + returnCode = [oPanel runModalForDirectory:dir.AsNSString() file:file.AsNSString() types:types]; } if (returnCode == NSOKButton ) diff --git a/src/osx/cocoa/gauge.mm b/src/osx/cocoa/gauge.mm index ad4ace7a47..e9c35f40b5 100644 --- a/src/osx/cocoa/gauge.mm +++ b/src/osx/cocoa/gauge.mm @@ -28,7 +28,7 @@ + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); @@ -43,19 +43,19 @@ public : wxOSXGaugeCocoaImpl( wxWindowMac* peer, WXWidget w) : wxWidgetCocoaImpl( peer, w ) { } - + void SetMaximum(wxInt32 v) { SetDeterminateMode(); wxWidgetCocoaImpl::SetMaximum( v ) ; } - + void SetValue(wxInt32 v) { SetDeterminateMode(); wxWidgetCocoaImpl::SetValue( v ) ; } - + void PulseGauge() { if ( ![(wxNSProgressIndicator*)m_osxView isIndeterminate] ) @@ -77,15 +77,15 @@ protected: }; -wxWidgetImplType* wxWidgetImpl::CreateGauge( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateGauge( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), wxInt32 value, wxInt32 minimum, wxInt32 maximum, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; diff --git a/src/osx/cocoa/glcanvas.mm b/src/osx/cocoa/glcanvas.mm index f07fc0f64a..4c5f6ec1e5 100644 --- a/src/osx/cocoa/glcanvas.mm +++ b/src/osx/cocoa/glcanvas.mm @@ -224,13 +224,13 @@ WXGLPixelFormat WXGLChoosePixelFormat(const int *attribList) bool wxGLContext::SetCurrent(const wxGLCanvas& win) const { if ( !m_glContext ) - return false; + return false; [m_glContext setView: win.GetHandle() ]; [m_glContext update]; - + [m_glContext makeCurrentContext]; - + return true; } @@ -246,7 +246,7 @@ bool wxGLContext::SetCurrent(const wxGLCanvas& win) const + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); diff --git a/src/osx/cocoa/listbox.mm b/src/osx/cocoa/listbox.mm index ded09fb1e6..e517ba97af 100644 --- a/src/osx/cocoa/listbox.mm +++ b/src/osx/cocoa/listbox.mm @@ -38,14 +38,14 @@ class wxListWidgetCocoaImpl; wxListWidgetCocoaImpl* impl; } -- (id)tableView:(NSTableView *)aTableView - objectValueForTableColumn:(NSTableColumn *)aTableColumn +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex; -- (void)tableView:(NSTableView *)aTableView - setObjectValue:(id)value forTableColumn:(NSTableColumn *)aTableColumn +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)value forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex; - + - (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView; - (void)setImplementation: (wxListWidgetCocoaImpl *) theImplementation; @@ -79,19 +79,19 @@ class wxCocoaTableColumn; class WXDLLIMPEXP_CORE wxCocoaTableColumn : public wxListWidgetColumn { public : - wxCocoaTableColumn( wxNSTableColumn* column, bool editable ) + wxCocoaTableColumn( wxNSTableColumn* column, bool editable ) : m_column( column ), m_editable(editable) { } - + ~wxCocoaTableColumn() { } - + wxNSTableColumn* GetNSTableColumn() const { return m_column ; } - + bool IsEditable() const { return m_editable; } - + protected : wxNSTableColumn* m_column; bool m_editable; @@ -103,31 +103,31 @@ class wxListWidgetCocoaImpl : public wxWidgetCocoaImpl, public wxListWidgetImpl { public : wxListWidgetCocoaImpl( wxWindowMac* peer, NSScrollView* view, wxNSTableView* tableview, wxNSTableDataSource* data ); - + ~wxListWidgetCocoaImpl(); - - virtual wxListWidgetColumn* InsertTextColumn( unsigned pos, const wxString& title, bool editable = false, + + virtual wxListWidgetColumn* InsertTextColumn( unsigned pos, const wxString& title, bool editable = false, wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) ; - virtual wxListWidgetColumn* InsertCheckColumn( unsigned pos , const wxString& title, bool editable = false, + virtual wxListWidgetColumn* InsertCheckColumn( unsigned pos , const wxString& title, bool editable = false, wxAlignment just = wxALIGN_LEFT , int defaultWidth = -1) ; - + // add and remove - - virtual void ListDelete( unsigned int n ) ; + + virtual void ListDelete( unsigned int n ) ; virtual void ListInsert( unsigned int n ) ; virtual void ListClear() ; // selecting virtual void ListDeselectAll(); - + virtual void ListSetSelection( unsigned int n, bool select, bool multi ) ; virtual int ListGetSelection() const ; - + virtual int ListGetSelections( wxArrayInt& aSelections ) const ; - + virtual bool ListIsSelected( unsigned int n ) const ; - + // display virtual void ListScrollTo( unsigned int n ) ; @@ -135,7 +135,7 @@ public : // accessing content virtual unsigned int ListGetCount() const ; - + int ListGetColumnType( int col ) { return col; @@ -147,7 +147,7 @@ public : virtual void controlDoubleAction(WXWidget slf, void* _cmd, void *sender); protected : wxNSTableView* m_tableView ; - + wxNSTableDataSource* m_dataSource; } ; @@ -182,38 +182,38 @@ public : wxNSTableViewCellValue( id &v ) : value(v) { } - + virtual ~wxNSTableViewCellValue() {} virtual void Set( CFStringRef v ) { value = [[(NSString*)v retain] autorelease]; } - virtual void Set( const wxString& value ) + virtual void Set( const wxString& value ) { Set( (CFStringRef) wxCFStringRef( value ) ); } - virtual void Set( int v ) + virtual void Set( int v ) { value = [NSNumber numberWithInt:v]; } - - virtual int GetIntValue() const + + virtual int GetIntValue() const { if ( [value isKindOfClass:[NSNumber class]] ) return [ (NSNumber*) value intValue ]; - + return 0; } - - virtual wxString GetStringValue() const + + virtual wxString GetStringValue() const { if ( [value isKindOfClass:[NSString class]] ) return wxCFStringRef::AsString( (NSString*) value ); - + return wxEmptyString; } - + protected: id& value; } ; @@ -245,8 +245,8 @@ protected: return 0; } -- (id)tableView:(NSTableView *)aTableView - objectValueForTableColumn:(NSTableColumn *)aTableColumn +- (id)tableView:(NSTableView *)aTableView + objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { wxUnusedVar(aTableView); @@ -259,8 +259,8 @@ protected: return value; } -- (void)tableView:(NSTableView *)aTableView - setObjectValue:(id)value forTableColumn:(NSTableColumn *)aTableColumn +- (void)tableView:(NSTableView *)aTableView + setObjectValue:(id)value forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex { wxUnusedVar(aTableView); @@ -278,7 +278,7 @@ protected: + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); @@ -302,7 +302,7 @@ wxListWidgetCocoaImpl::~wxListWidgetCocoaImpl() [m_dataSource release]; } -unsigned int wxListWidgetCocoaImpl::ListGetCount() const +unsigned int wxListWidgetCocoaImpl::ListGetCount() const { wxListBox* lb = dynamic_cast ( GetWXPeer() ); return lb->GetCount(); @@ -312,19 +312,19 @@ unsigned int wxListWidgetCocoaImpl::ListGetCount() const // columns // -wxListWidgetColumn* wxListWidgetCocoaImpl::InsertTextColumn( unsigned pos, const wxString& WXUNUSED(title), bool editable, - wxAlignment WXUNUSED(just), int defaultWidth) +wxListWidgetColumn* wxListWidgetCocoaImpl::InsertTextColumn( unsigned pos, const wxString& WXUNUSED(title), bool editable, + wxAlignment WXUNUSED(just), int defaultWidth) { wxNSTableColumn* col1 = [[wxNSTableColumn alloc] init]; [col1 setEditable:editable]; - + unsigned formerColCount = [m_tableView numberOfColumns]; - + // there's apparently no way to insert at a specific position [m_tableView addTableColumn:col1 ]; if ( pos < formerColCount ) [m_tableView moveColumn:formerColCount toColumn:pos]; - + if ( defaultWidth >= 0 ) { [col1 setMaxWidth:defaultWidth]; @@ -333,7 +333,7 @@ wxListWidgetColumn* wxListWidgetCocoaImpl::InsertTextColumn( unsigned pos, const } else { - [col1 setMaxWidth:1000]; + [col1 setMaxWidth:1000]; [col1 setMinWidth:10]; // temporary hack, because I cannot get the automatic column resizing // to work properly @@ -348,33 +348,33 @@ wxListWidgetColumn* wxListWidgetCocoaImpl::InsertTextColumn( unsigned pos, const return wxcol; } -wxListWidgetColumn* wxListWidgetCocoaImpl::InsertCheckColumn( unsigned pos , const wxString& WXUNUSED(title), bool editable, - wxAlignment WXUNUSED(just), int defaultWidth ) +wxListWidgetColumn* wxListWidgetCocoaImpl::InsertCheckColumn( unsigned pos , const wxString& WXUNUSED(title), bool editable, + wxAlignment WXUNUSED(just), int defaultWidth ) { wxNSTableColumn* col1 = [[wxNSTableColumn alloc] init]; [col1 setEditable:editable]; - + // set your custom cell & set it up NSButtonCell* checkbox = [[NSButtonCell alloc] init]; [checkbox setTitle:@""]; [checkbox setButtonType:NSSwitchButton]; [col1 setDataCell:checkbox] ; [checkbox release]; - + unsigned formerColCount = [m_tableView numberOfColumns]; - + // there's apparently no way to insert at a specific position [m_tableView addTableColumn:col1 ]; if ( pos < formerColCount ) [m_tableView moveColumn:formerColCount toColumn:pos]; - + if ( defaultWidth >= 0 ) { [col1 setMaxWidth:defaultWidth]; [col1 setMinWidth:defaultWidth]; [col1 setWidth:defaultWidth]; } - + [col1 setResizingMask: NSTableColumnNoResizing]; wxCocoaTableColumn* wxcol = new wxCocoaTableColumn( col1, editable ); [col1 setColumn:wxcol]; @@ -389,17 +389,17 @@ wxListWidgetColumn* wxListWidgetCocoaImpl::InsertCheckColumn( unsigned pos , con // inserting / removing lines // -void wxListWidgetCocoaImpl::ListInsert( unsigned int WXUNUSED(n) ) +void wxListWidgetCocoaImpl::ListInsert( unsigned int WXUNUSED(n) ) { [m_tableView reloadData]; } -void wxListWidgetCocoaImpl::ListDelete( unsigned int WXUNUSED(n) ) +void wxListWidgetCocoaImpl::ListDelete( unsigned int WXUNUSED(n) ) { [m_tableView reloadData]; } -void wxListWidgetCocoaImpl::ListClear() +void wxListWidgetCocoaImpl::ListClear() { [m_tableView reloadData]; } @@ -411,7 +411,7 @@ void wxListWidgetCocoaImpl::ListDeselectAll() [m_tableView deselectAll:nil]; } -void wxListWidgetCocoaImpl::ListSetSelection( unsigned int n, bool select, bool multi ) +void wxListWidgetCocoaImpl::ListSetSelection( unsigned int n, bool select, bool multi ) { // TODO if ( select ) @@ -421,12 +421,12 @@ void wxListWidgetCocoaImpl::ListSetSelection( unsigned int n, bool select, bool } -int wxListWidgetCocoaImpl::ListGetSelection() const +int wxListWidgetCocoaImpl::ListGetSelection() const { return [m_tableView selectedRow]; } -int wxListWidgetCocoaImpl::ListGetSelections( wxArrayInt& aSelections ) const +int wxListWidgetCocoaImpl::ListGetSelections( wxArrayInt& aSelections ) const { aSelections.Empty(); @@ -441,26 +441,26 @@ int wxListWidgetCocoaImpl::ListGetSelections( wxArrayInt& aSelections ) const return aSelections.Count(); } -bool wxListWidgetCocoaImpl::ListIsSelected( unsigned int n ) const +bool wxListWidgetCocoaImpl::ListIsSelected( unsigned int n ) const { return [m_tableView isRowSelected:n]; } // display -void wxListWidgetCocoaImpl::ListScrollTo( unsigned int n ) +void wxListWidgetCocoaImpl::ListScrollTo( unsigned int n ) { [m_tableView scrollRowToVisible:n]; } - -void wxListWidgetCocoaImpl::UpdateLine( unsigned int WXUNUSED(n), wxListWidgetColumn* WXUNUSED(col) ) + +void wxListWidgetCocoaImpl::UpdateLine( unsigned int WXUNUSED(n), wxListWidgetColumn* WXUNUSED(col) ) { // TODO optimize [m_tableView reloadData]; } -void wxListWidgetCocoaImpl::UpdateLineToEnd( unsigned int WXUNUSED(n)) +void wxListWidgetCocoaImpl::UpdateLineToEnd( unsigned int WXUNUSED(n)) { // TODO optimize [m_tableView reloadData]; @@ -476,7 +476,7 @@ void wxListWidgetCocoaImpl::controlAction(WXWidget WXUNUSED(slf),void* WXUNUSED( int sel = [m_tableView clickedRow]; if ((sel < 0) || (sel > (int) list->GetCount())) // OS X can select an item below the last item (why?) return; - + list->HandleLineEvent( sel, false ); } @@ -495,41 +495,41 @@ void wxListWidgetCocoaImpl::controlDoubleAction(WXWidget WXUNUSED(slf),void* WXU // accessing content -wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), - const wxPoint& pos, +wxWidgetImplType* wxWidgetImpl::CreateListBox( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; NSScrollView* scrollview = [[NSScrollView alloc] initWithFrame:r]; - + // use same scroll flags logic as msw - + [scrollview setHasVerticalScroller:YES]; - + if ( style & wxLB_HSCROLL ) [scrollview setHasHorizontalScroller:YES]; - + [scrollview setAutohidesScrollers: ((style & wxLB_ALWAYS_SB) ? NO : YES)]; // setting up the true table - + wxNSTableView* tableview = [[wxNSTableView alloc] init]; // only one multi-select mode available if ( (style & wxLB_EXTENDED) || (style & wxLB_MULTIPLE) ) [tableview setAllowsMultipleSelection:YES]; - + // simple listboxes have no header row [tableview setHeaderView:nil]; - + if ( style & wxLB_HSCROLL ) [tableview setColumnAutoresizingStyle:NSTableViewNoColumnAutoresizing]; else [tableview setColumnAutoresizingStyle:NSTableViewLastColumnOnlyAutoresizingStyle]; - + wxNSTableDataSource* ds = [[ wxNSTableDataSource alloc] init]; [tableview setDataSource:ds]; [scrollview setDocumentView:tableview]; diff --git a/src/osx/cocoa/menu.mm b/src/osx/cocoa/menu.mm index 34cd2079e2..aff7a283e1 100644 --- a/src/osx/cocoa/menu.mm +++ b/src/osx/cocoa/menu.mm @@ -117,11 +117,11 @@ @end -@interface NSApplication(MissingAppleMenuCall) -- (void)setAppleMenu:(NSMenu *)menu; -@end +@interface NSApplication(MissingAppleMenuCall) +- (void)setAppleMenu:(NSMenu *)menu; +@end -class wxMenuCocoaImpl : public wxMenuImpl +class wxMenuCocoaImpl : public wxMenuImpl { public : wxMenuCocoaImpl( wxMenu* peer , wxNSMenu* menu) : wxMenuImpl(peer), m_osxMenu(menu) @@ -138,22 +138,22 @@ public : CFRetain(m_osxMenu); [m_osxMenu release]; } - + virtual ~wxMenuCocoaImpl(); - - virtual void InsertOrAppend(wxMenuItem *pItem, size_t pos) + + virtual void InsertOrAppend(wxMenuItem *pItem, size_t pos) { if ( pos == (size_t) -1 ) [m_osxMenu addItem:(NSMenuItem*) pItem->GetPeer()->GetHMenuItem() ]; else [m_osxMenu insertItem:(NSMenuItem*) pItem->GetPeer()->GetHMenuItem() atIndex:pos]; } - - virtual void Remove( wxMenuItem *pItem ) + + virtual void Remove( wxMenuItem *pItem ) { [m_osxMenu removeItem:(NSMenuItem*) pItem->GetPeer()->GetHMenuItem()]; } - + virtual void MakeRoot() { [NSApp setMainMenu:m_osxMenu]; @@ -163,7 +163,7 @@ public : virtual void Enable( bool WXUNUSED(enable) ) { } - + virtual void SetTitle( const wxString& text ) { wxCFStringRef cfText(text); diff --git a/src/osx/cocoa/menuitem.mm b/src/osx/cocoa/menuitem.mm index b8f33fc0cc..680d3c0cc7 100644 --- a/src/osx/cocoa/menuitem.mm +++ b/src/osx/cocoa/menuitem.mm @@ -168,7 +168,7 @@ void wxMacCocoaMenuItemSetAccelerator( NSMenuItem* menuItem, wxAcceleratorEntry* } } -class wxMenuItemCocoaImpl : public wxMenuItemImpl +class wxMenuItemCocoaImpl : public wxMenuItemImpl { public : wxMenuItemCocoaImpl( wxMenuItem* peer, NSMenuItem* item ) : wxMenuItemImpl(peer), m_osxMenuItem(item) @@ -176,24 +176,24 @@ public : if ( ![m_osxMenuItem isSeparatorItem] ) [(wxNSMenuItem*)m_osxMenuItem setImplementation:this]; } - + ~wxMenuItemCocoaImpl(); - - void SetBitmap( const wxBitmap& bitmap ) + + void SetBitmap( const wxBitmap& bitmap ) { [m_osxMenuItem setImage:bitmap.GetNSImage()]; } - - void Enable( bool enable ) + + void Enable( bool enable ) { [m_osxMenuItem setEnabled:enable]; } - - void Check( bool check ) + + void Check( bool check ) { [m_osxMenuItem setState:( check ? NSOnState : NSOffState) ]; } - + void Hide( bool hide ) { // NB: setHidden is new as of 10.5 so we should not call it below there @@ -202,17 +202,17 @@ public : else wxLogDebug("wxMenuItemCocoaImpl::Hide not yet supported under OS X < 10.5"); } - - void SetLabel( const wxString& text, wxAcceleratorEntry *entry ) + + void SetLabel( const wxString& text, wxAcceleratorEntry *entry ) { wxCFStringRef cfText(text); [m_osxMenuItem setTitle:cfText.AsNSString()]; - + if ( entry ) wxMacCocoaMenuItemSetAccelerator( m_osxMenuItem, entry ); } - + void * GetHMenuItem() { return m_osxMenuItem; } protected : @@ -236,7 +236,7 @@ wxMenuItemImpl* wxMenuItemImpl::Create( wxMenuItem* peer, wxMenu *pParentMenu, { wxMenuItemImpl* c = NULL; NSMenuItem* item = nil; - + if ( kind == wxITEM_SEPARATOR ) { item = [[NSMenuItem separatorItem] retain]; diff --git a/src/osx/cocoa/msgdlg.mm b/src/osx/cocoa/msgdlg.mm index ab6ffb99e6..504e019070 100644 --- a/src/osx/cocoa/msgdlg.mm +++ b/src/osx/cocoa/msgdlg.mm @@ -133,7 +133,7 @@ int wxMessageDialog::ShowModal() else { NSAlert* alert = [[NSAlert alloc] init]; - + wxCFStringRef cfNoString( GetNoLabel(), GetFont().GetEncoding() ); wxCFStringRef cfYesString( GetYesLabel(), GetFont().GetEncoding() ); wxCFStringRef cfOKString( GetOKLabel(), GetFont().GetEncoding() ); @@ -144,7 +144,7 @@ int wxMessageDialog::ShowModal() [alert setMessageText:cfTitle.AsNSString()]; [alert setInformativeText:cfText.AsNSString()]; - + int buttonId[3] = { 0, 0, 0 }; int buttonCount = 0; @@ -186,19 +186,19 @@ int wxMessageDialog::ShowModal() wxNonOwnedWindow* parentWindow = NULL; int button = -1; - - if (GetParent()) + + if (GetParent()) { parentWindow = dynamic_cast(wxGetTopLevelParent(GetParent())); } - + /* if (parentWindow) { NSWindow* nativeParent = parentWindow->GetWXWindow(); - ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; - [alert beginSheetModalForWindow: nativeParent modalDelegate: sheetDelegate - didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) + ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; + [alert beginSheetModalForWindow: nativeParent modalDelegate: sheetDelegate + didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) contextInfo: nil]; [sheetDelegate waitForSheetToFinish]; button = [sheetDelegate code]; @@ -210,7 +210,7 @@ int wxMessageDialog::ShowModal() button = [alert runModal]; } [alert release]; - + if ( button < NSAlertFirstButtonReturn ) resultbutton = wxID_CANCEL; else diff --git a/src/osx/cocoa/nonownedwnd.mm b/src/osx/cocoa/nonownedwnd.mm index c37765cd5c..de47458826 100644 --- a/src/osx/cocoa/nonownedwnd.mm +++ b/src/osx/cocoa/nonownedwnd.mm @@ -59,7 +59,7 @@ wxPoint wxFromNSPoint( NSView* parent, const NSPoint& p ) bool shouldHandleSelector(SEL selector) { - if (selector == @selector(noop:) + if (selector == @selector(noop:) || selector == @selector(complete:) || selector == @selector(deleteBackward:) || selector == @selector(deleteForward:) @@ -72,7 +72,7 @@ bool shouldHandleSelector(SEL selector) || selector == @selector(scrollToBeginningOfDocument:) || selector == @selector(scrollToEndOfDocument:)) return false; - + return true; } @@ -107,7 +107,7 @@ typedef void (*wxOSX_NoResponderHandlerPtr)(NSView* self, SEL _cmd, SEL selector - (void)doCommandBySelector:(SEL)selector { - if (shouldHandleSelector(selector) && + if (shouldHandleSelector(selector) && !(selector == @selector(cancel:) || selector == @selector(cancelOperation:)) ) [super doCommandBySelector:selector]; } @@ -137,7 +137,7 @@ typedef void (*wxOSX_NoResponderHandlerPtr)(NSView* self, SEL _cmd, SEL selector - (void)noResponderFor: (SEL) selector; @end -@implementation wxNSPanel +@implementation wxNSPanel - (void)setImplementation: (wxNonOwnedWindowCocoaImpl *) theImplementation { @@ -281,8 +281,8 @@ typedef void (*wxOSX_NoResponderHandlerPtr)(NSView* self, SEL _cmd, SEL selector if ( wxpeer ) { wxpeer->HandleActivated(0, false); - // Needed for popup window since the firstResponder - // (focus in wx) doesn't change when this + // 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); @@ -315,19 +315,19 @@ typedef void (*wxOSX_NoResponderHandlerPtr)(NSView* self, SEL _cmd, SEL selector IMPLEMENT_DYNAMIC_CLASS( wxNonOwnedWindowCocoaImpl , wxNonOwnedWindowImpl ) -wxNonOwnedWindowCocoaImpl::wxNonOwnedWindowCocoaImpl( wxNonOwnedWindow* nonownedwnd) : +wxNonOwnedWindowCocoaImpl::wxNonOwnedWindowCocoaImpl( wxNonOwnedWindow* nonownedwnd) : wxNonOwnedWindowImpl(nonownedwnd) { m_macWindow = NULL; m_macFullScreenData = NULL; } - -wxNonOwnedWindowCocoaImpl::wxNonOwnedWindowCocoaImpl() + +wxNonOwnedWindowCocoaImpl::wxNonOwnedWindowCocoaImpl() { m_macWindow = NULL; m_macFullScreenData = NULL; } - + wxNonOwnedWindowCocoaImpl::~wxNonOwnedWindowCocoaImpl() { [m_macWindow setImplementation:nil]; @@ -344,23 +344,23 @@ void wxNonOwnedWindowCocoaImpl::Create( wxWindow* WXUNUSED(parent), const wxPoin long style, long extraStyle, const wxString& WXUNUSED(name) ) { static wxNonOwnedWindowController* controller = NULL; - + if ( !controller ) controller =[[wxNonOwnedWindowController alloc] init]; int windowstyle = NSBorderlessWindowMask; - - if ( style & wxFRAME_TOOL_WINDOW || ( style & wxPOPUP_WINDOW ) || + + if ( style & wxFRAME_TOOL_WINDOW || ( style & wxPOPUP_WINDOW ) || GetWXPeer()->GetExtraStyle() & wxTOPLEVEL_EX_DIALOG ) { m_macWindow = [wxNSPanel alloc]; } else m_macWindow = [wxNSWindow alloc]; - + CGWindowLevel level = kCGNormalWindowLevel; - + if ( style & wxFRAME_TOOL_WINDOW ) { windowstyle |= NSUtilityWindowMask; @@ -437,21 +437,21 @@ long style, long extraStyle, const wxString& WXUNUSED(name) ) if ( ( style & wxSTAY_ON_TOP ) ) level = kCGUtilityWindowLevel; - + NSRect r = wxToNSRect( NULL, wxRect( pos, size) ); - + [m_macWindow setImplementation:this]; - + [m_macWindow initWithContentRect:r styleMask:windowstyle backing:NSBackingStoreBuffered - defer:NO + defer:NO ]; - + [m_macWindow setLevel:level]; [m_macWindow setDelegate:controller]; - + [m_macWindow setAcceptsMouseMovedEvents: YES]; } @@ -465,7 +465,7 @@ void wxNonOwnedWindowCocoaImpl::Raise() { [m_macWindow orderWindow:NSWindowAbove relativeTo:0]; } - + void wxNonOwnedWindowCocoaImpl::Lower() { [m_macWindow orderWindow:NSWindowBelow relativeTo:0]; @@ -478,11 +478,11 @@ bool wxNonOwnedWindowCocoaImpl::Show(bool show) [m_macWindow makeKeyAndOrderFront:nil]; [[m_macWindow contentView] setNeedsDisplay:YES]; } - else + else [m_macWindow orderOut:nil]; return true; } - + bool wxNonOwnedWindowCocoaImpl::ShowWithEffect(bool show, wxShowEffect WXUNUSED(effect), unsigned WXUNUSED(timeout)) { return Show(show); @@ -517,15 +517,15 @@ void wxNonOwnedWindowCocoaImpl::SetExtraStyle( long exStyle ) else if ( !metal && (windowStyle & NSTexturedBackgroundWindowMask ) ) { wxFAIL_MSG( wxT("Metal Style cannot be changed after creation") ); - } + } } } - + bool wxNonOwnedWindowCocoaImpl::SetBackgroundStyle(wxBackgroundStyle WXUNUSED(style)) { return true; } - + bool wxNonOwnedWindowCocoaImpl::CanSetTransparent() { return true; @@ -562,27 +562,27 @@ void wxNonOwnedWindowCocoaImpl::GetContentArea( int& left, int &top, int &width, width = (int)rect.size.width; height = (int)rect.size.height; } - + bool wxNonOwnedWindowCocoaImpl::SetShape(const wxRegion& WXUNUSED(region)) { return false; } -void wxNonOwnedWindowCocoaImpl::SetTitle( const wxString& title, wxFontEncoding encoding ) +void wxNonOwnedWindowCocoaImpl::SetTitle( const wxString& title, wxFontEncoding encoding ) { [m_macWindow setTitle:wxCFStringRef( title , encoding ).AsNSString()]; } - + bool wxNonOwnedWindowCocoaImpl::IsMaximized() const { return [m_macWindow isZoomed]; } - + bool wxNonOwnedWindowCocoaImpl::IsIconized() const { return [m_macWindow isMiniaturized]; } - + void wxNonOwnedWindowCocoaImpl::Iconize( bool iconize ) { if ( iconize ) @@ -590,12 +590,12 @@ void wxNonOwnedWindowCocoaImpl::Iconize( bool iconize ) else [m_macWindow deminiaturize:nil]; } - + void wxNonOwnedWindowCocoaImpl::Maximize(bool WXUNUSED(maximize)) { [m_macWindow zoom:nil]; } - + // http://cocoadevcentral.com/articles/000028.php @@ -609,7 +609,7 @@ bool wxNonOwnedWindowCocoaImpl::IsFullScreen() const { return m_macFullScreenData != NULL ; } - + bool wxNonOwnedWindowCocoaImpl::ShowFullScreen(bool show, long WXUNUSED(style)) { if ( show ) @@ -634,7 +634,7 @@ bool wxNonOwnedWindowCocoaImpl::ShowFullScreen(bool show, long WXUNUSED(style)) delete data ; m_macFullScreenData = NULL ; } - + return true; } @@ -650,7 +650,7 @@ void wxNonOwnedWindowCocoaImpl::ScreenToWindow( int *x, int *y ) nspt = [[m_macWindow contentView] convertPoint:nspt fromView:nil]; p = wxFromNSPoint([m_macWindow contentView], nspt); if ( x ) - *x = p.x; + *x = p.x; if ( y ) *y = p.y; } diff --git a/src/osx/cocoa/notebook.mm b/src/osx/cocoa/notebook.mm index b62b66e6f1..a23bf5157a 100644 --- a/src/osx/cocoa/notebook.mm +++ b/src/osx/cocoa/notebook.mm @@ -86,7 +86,7 @@ + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); @@ -101,8 +101,8 @@ public: wxCocoaTabView( wxWindowMac* peer , WXWidget w ) : wxWidgetCocoaImpl(peer, w) { } - - void GetContentArea( int &left , int &top , int &width , int &height ) const + + void GetContentArea( int &left , int &top , int &width , int &height ) const { wxNSTabView* slf = (wxNSTabView*) m_osxView; NSRect r = [slf contentRect]; @@ -111,8 +111,8 @@ public: width = (int)r.size.width; height = (int)r.size.height; } - - void SetValue( wxInt32 value ) + + void SetValue( wxInt32 value ) { wxNSTabView* slf = (wxNSTabView*) m_osxView; // avoid 'changed' events when setting the tab programmatically @@ -121,7 +121,7 @@ public: [slf selectTabViewItemAtIndex:(value-1)]; [slf setDelegate:controller]; } - + wxInt32 GetValue() const { wxNSTabView* slf = (wxNSTabView*) m_osxView; @@ -131,7 +131,7 @@ public: else return [slf indexOfTabViewItem:selectedItem]+1; } - + void SetMaximum( wxInt32 maximum ) { wxNSTabView* slf = (wxNSTabView*) m_osxView; @@ -139,7 +139,7 @@ public: // avoid 'changed' events when setting the tab programmatically wxTabViewController* controller = [slf delegate]; [slf setDelegate:nil]; - + if ( maximum > cocoacount ) { for ( int i = cocoacount ; i < maximum ; ++i ) @@ -163,9 +163,9 @@ public: void SetupTabs( const wxNotebook& notebook) { int pcount = notebook.GetPageCount(); - + SetMaximum( pcount ); - + for ( int i = 0 ; i < pcount ; ++i ) { wxNotebookPage* page = notebook.GetPage(i); @@ -226,12 +226,12 @@ public: verify_noerr( err ); #endif */ -wxWidgetImplType* wxWidgetImpl::CreateTabView( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), - const wxPoint& pos, +wxWidgetImplType* wxWidgetImpl::CreateTabView( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { static wxTabViewController* controller = NULL; @@ -240,7 +240,7 @@ wxWidgetImplType* wxWidgetImpl::CreateTabView( wxWindowMac* wxpeer, controller =[[wxTabViewController alloc] init]; NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; - + NSTabViewType tabstyle = NSTopTabsBezelBorder; if ( style & wxBK_LEFT ) tabstyle = NSLeftTabsBezelBorder; @@ -248,7 +248,7 @@ wxWidgetImplType* wxWidgetImpl::CreateTabView( wxWindowMac* wxpeer, tabstyle = NSRightTabsBezelBorder; else if ( style & wxBK_BOTTOM ) tabstyle = NSBottomTabsBezelBorder; - + wxNSTabView* v = [[wxNSTabView alloc] initWithFrame:r]; [v setTabViewType:tabstyle]; wxWidgetCocoaImpl* c = new wxCocoaTabView( wxpeer, v ); diff --git a/src/osx/cocoa/printdlg.mm b/src/osx/cocoa/printdlg.mm index d10cea723a..c307a028ba 100644 --- a/src/osx/cocoa/printdlg.mm +++ b/src/osx/cocoa/printdlg.mm @@ -64,7 +64,7 @@ int wxMacPrintDialog::ShowModal() m_printDialogData.GetPrintData().ConvertToNative(); int result = wxID_CANCEL; - + NSPrintPanel* panel = [NSPrintPanel printPanel]; NSPrintInfo* printInfo = ((wxOSXCocoaPrintData*)m_printDialogData.GetPrintData().GetNativeData())->GetNSPrintInfo(); if ( (NSInteger)[panel runModalWithPrintInfo:printInfo] == NSOKButton ) @@ -92,7 +92,7 @@ int wxMacPageSetupDialog::ShowModal() m_pageSetupData.GetPrintData().ConvertFromNative(); m_pageSetupData.SetPaperSize( m_pageSetupData.GetPrintData().GetPaperSize() ); } - + return result; } diff --git a/src/osx/cocoa/radiobut.mm b/src/osx/cocoa/radiobut.mm index 195860144b..a64d2875e4 100644 --- a/src/osx/cocoa/radiobut.mm +++ b/src/osx/cocoa/radiobut.mm @@ -2,7 +2,7 @@ // Name: src/osx/cocoa/radiobut.mm // Purpose: wxRadioButton // Author: Stefan Csomor -// Modified by: +// Modified by: // Created: ??/??/98 // RCS-ID: $Id: radiobut.cpp 54129 2008-06-11 19:30:52Z SC $ // Copyright: (c) AUTHOR @@ -16,20 +16,20 @@ #include "wx/radiobut.h" #include "wx/osx/private.h" -wxWidgetImplType* wxWidgetImpl::CreateRadioButton( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateRadioButton( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), - long WXUNUSED(extraStyle)) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; - [v setButtonType:NSRadioButton]; - + [v setButtonType:NSRadioButton]; + wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); return c; } diff --git a/src/osx/cocoa/scrolbar.mm b/src/osx/cocoa/scrolbar.mm index 4814d87f64..dd9c9e18dc 100644 --- a/src/osx/cocoa/scrolbar.mm +++ b/src/osx/cocoa/scrolbar.mm @@ -32,7 +32,7 @@ + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods(self); @@ -48,13 +48,13 @@ public : { m_maximum = 1; } - + void SetMaximum(wxInt32 v) { m_maximum = (v == 0) ? 1 : v; } - - void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) + + void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) { double v = ((double) value)/m_maximum; double t = ((double) thumbSize)/(m_maximum+thumbSize); @@ -65,12 +65,12 @@ public : [(wxNSScroller*) m_osxView setKnobProportion:t]; #endif } - + virtual wxInt32 GetValue() const { return wxRound([(wxNSScroller*) m_osxView floatValue] * m_maximum); } - + virtual wxInt32 GetMaximum() const { return m_maximum; @@ -82,16 +82,16 @@ protected: wxInt32 m_maximum; }; -// we will have a mouseDown, then in the native +// we will have a mouseDown, then in the native // implementation of mouseDown the tracking code // is calling clickedAction, therefore we wire this -// to thumbtrack and only after super mouseDown +// to thumbtrack and only after super mouseDown // returns we will call the thumbrelease void wxOSXScrollBarCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd), void *WXUNUSED(sender)) { wxEventType scrollEvent = wxEVT_NULL; - switch ([(NSScroller*)m_osxView hitPart]) + switch ([(NSScroller*)m_osxView hitPart]) { case NSScrollerIncrementLine: scrollEvent = wxEVT_SCROLL_LINEDOWN; @@ -122,7 +122,7 @@ void wxOSXScrollBarCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNU void wxOSXScrollBarCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd) { wxWidgetCocoaImpl::mouseEvent(event, slf, _cmd); - + // send a release event in case we've been tracking the thumb if ( strcmp( sel_getName((SEL) _cmd) , "mouseDown:") == 0 ) { @@ -136,16 +136,16 @@ void wxOSXScrollBarCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_ } } -wxWidgetImplType* wxWidgetImpl::CreateScrollBar( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), - const wxPoint& pos, +wxWidgetImplType* wxWidgetImpl::CreateScrollBar( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; - // the creation rect defines the orientation + // the creation rect defines the orientation NSRect createRect = ( style & wxSB_HORIZONTAL ) ? NSMakeRect(r.origin.x, r.origin.y , 17, 16) : NSMakeRect(r.origin.x, r.origin.y , 16, 17); wxNSScroller* v = [[wxNSScroller alloc] initWithFrame:createRect]; diff --git a/src/osx/cocoa/slider.mm b/src/osx/cocoa/slider.mm index 90ea3f7274..fbde6dc22a 100644 --- a/src/osx/cocoa/slider.mm +++ b/src/osx/cocoa/slider.mm @@ -26,7 +26,7 @@ + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods(self); @@ -42,7 +42,7 @@ public : wxWidgetCocoaImpl(peer, w) { } - + ~wxSliderCocoaImpl() { } @@ -51,10 +51,10 @@ public : virtual void mouseEvent(WX_NSEvent event, WXWidget slf, void* _cmd); }; -// we will have a mouseDown, then in the native +// we will have a mouseDown, then in the native // implementation of mouseDown the tracking code // is calling clickedAction, therefore we wire this -// to thumbtrack and only after super mouseDown +// to thumbtrack and only after super mouseDown // returns we will call the thumbrelease void wxSliderCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd), void *WXUNUSED(sender)) @@ -67,7 +67,7 @@ void wxSliderCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSED(_c void wxSliderCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd) { wxWidgetCocoaImpl::mouseEvent(event, slf, _cmd); - + if ( strcmp( sel_getName((SEL) _cmd) , "mouseDown:") == 0 ) { wxWindow* wxpeer = (wxWindow*) GetWXPeer(); @@ -78,15 +78,15 @@ void wxSliderCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd) -wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), wxInt32 value, wxInt32 minimum, wxInt32 maximum, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; @@ -101,7 +101,7 @@ wxWidgetImplType* wxWidgetImpl::CreateSlider( wxWindowMac* wxpeer, // it to a UInt16 while (tickMarks > 20) tickMarks /= 5; - + [v setNumberOfTickMarks:tickMarks]; [v setTickMarkPosition:NSTickMarkBelow]; } diff --git a/src/osx/cocoa/spinbutt.mm b/src/osx/cocoa/spinbutt.mm index 6511abb5f4..4230bad5e9 100644 --- a/src/osx/cocoa/spinbutt.mm +++ b/src/osx/cocoa/spinbutt.mm @@ -26,7 +26,7 @@ + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods(self); @@ -43,7 +43,7 @@ public : { m_formerValue = 0; } - + ~wxSpinButtonCocoaImpl() { } @@ -56,7 +56,7 @@ private: void wxSpinButtonCocoaImpl::mouseEvent(WX_NSEvent event, WXWidget slf, void *_cmd) { - + // send a release event in case we've been tracking the thumb if ( strcmp( sel_getName((SEL) _cmd) , "mouseDown:") == 0 ) { @@ -71,19 +71,19 @@ void wxSpinButtonCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSE wxWindow* wxpeer = (wxWindow*) GetWXPeer(); if ( wxpeer ) { - // because wx expects to be able to veto + // because wx expects to be able to veto // a change we must revert the value change // and expose it int currentValue = [(NSStepper*)m_osxView intValue]; [(NSStepper*)m_osxView setIntValue:m_formerValue]; int inc = currentValue-m_formerValue; - + // adjust for wrap arounds if ( inc > 1 ) inc = -1; else if (inc < -1 ) inc = 1; - + if ( inc == 1 ) wxpeer->TriggerScrollEvent(wxEVT_SCROLL_LINEUP); else if ( inc == -1 ) @@ -93,15 +93,15 @@ void wxSpinButtonCocoaImpl::controlAction( WXWidget WXUNUSED(slf), void *WXUNUSE } } -wxWidgetImplType* wxWidgetImpl::CreateSpinButton( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateSpinButton( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), wxInt32 value, wxInt32 minimum, wxInt32 maximum, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; @@ -110,10 +110,10 @@ wxWidgetImplType* wxWidgetImpl::CreateSpinButton( wxWindowMac* wxpeer, [v setMinValue: minimum]; [v setMaxValue: maximum]; [v setIntValue: value]; - + if ( style & wxSP_WRAP ) [v setValueWraps:YES]; - + wxWidgetCocoaImpl* c = new wxSpinButtonCocoaImpl( wxpeer, v ); return c; } diff --git a/src/osx/cocoa/srchctrl.mm b/src/osx/cocoa/srchctrl.mm index 6b761d7f97..399729c183 100644 --- a/src/osx/cocoa/srchctrl.mm +++ b/src/osx/cocoa/srchctrl.mm @@ -40,7 +40,7 @@ + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); @@ -102,7 +102,7 @@ public : [m_searchFieldCell setSearchButtonCell:nil]; [m_searchField setNeedsDisplay:YES]; } - + virtual bool IsSearchButtonVisible() const { return [m_searchFieldCell searchButtonCell] != nil; @@ -116,7 +116,7 @@ public : [m_searchFieldCell setCancelButtonCell:nil]; [m_searchField setNeedsDisplay:YES]; } - + virtual bool IsCancelButtonVisible() const { return [m_searchFieldCell cancelButtonCell] != nil; @@ -136,7 +136,7 @@ public : [m_searchFieldCell setPlaceholderString: wxCFStringRef( text , m_wxPeer->GetFont().GetEncoding() ).AsNSString()]; } - + virtual bool SetFocus() { return wxNSTextFieldControl::SetFocus(); @@ -151,13 +151,13 @@ wxNSSearchFieldControl::~wxNSSearchFieldControl() { } -wxWidgetImplType* wxWidgetImpl::CreateSearchControl( wxTextCtrl* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateSearchControl( wxTextCtrl* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& str, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; diff --git a/src/osx/cocoa/statbox.mm b/src/osx/cocoa/statbox.mm index d36fde1d35..aad08e0f76 100644 --- a/src/osx/cocoa/statbox.mm +++ b/src/osx/cocoa/statbox.mm @@ -21,7 +21,7 @@ + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); @@ -30,7 +30,7 @@ @end -namespace +namespace { class wxStaticBoxCocoaImpl : public wxWidgetCocoaImpl { @@ -39,35 +39,35 @@ namespace : wxWidgetCocoaImpl(wxpeer, v) { } - + virtual void SetLabel( const wxString& title, wxFontEncoding encoding ) { if (title.empty()) [GetNSBox() setTitlePosition:NSNoTitle]; else [GetNSBox() setTitlePosition:NSAtTop]; - + wxWidgetCocoaImpl::SetLabel(title, encoding); } - + private: NSBox *GetNSBox() const { wxASSERT( [m_osxView isKindOfClass:[NSBox class]] ); - + return static_cast(m_osxView); } }; } // anonymous namespace -wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateGroupBox( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; diff --git a/src/osx/cocoa/statline.mm b/src/osx/cocoa/statline.mm index d793adbe3f..ea94dcd6dc 100644 --- a/src/osx/cocoa/statline.mm +++ b/src/osx/cocoa/statline.mm @@ -33,13 +33,13 @@ #include "wx/osx/private.h" -wxWidgetImplType* wxWidgetImpl::CreateStaticLine( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), - const wxPoint& pos, +wxWidgetImplType* wxWidgetImpl::CreateStaticLine( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), - long WXUNUSED(extraStyle)) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSBox* v = [[wxNSBox alloc] initWithFrame:r]; diff --git a/src/osx/cocoa/stattext.mm b/src/osx/cocoa/stattext.mm index da93c8ac63..b9f812e308 100644 --- a/src/osx/cocoa/stattext.mm +++ b/src/osx/cocoa/stattext.mm @@ -38,8 +38,8 @@ + (void)initialize { static BOOL initialized = NO; - if (!initialized) - { + if (!initialized) + { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); } @@ -54,9 +54,9 @@ public: { m_lineBreak = lineBreak; } - - virtual void SetLabel(const wxString& title, wxFontEncoding encoding) - { + + virtual void SetLabel(const wxString& title, wxFontEncoding encoding) + { wxNSStaticTextView* v = (wxNSStaticTextView*)GetWXWidget(); wxWindow* wxpeer = GetWXPeer(); NSCell* cell = [v cell]; @@ -69,7 +69,7 @@ public: [paragraphStyle setAlignment: NSCenterTextAlignment]; else if (style & wxALIGN_RIGHT) [paragraphStyle setAlignment: NSRightTextAlignment]; - + NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:paragraphStyle, NSParagraphStyleAttributeName, nil]; NSAttributedString *attrstring = [[NSAttributedString alloc] initWithString:text.AsNSString() attributes:dict]; [cell setAttributedStringValue:attrstring]; @@ -102,7 +102,7 @@ wxWidgetImplType* wxWidgetImpl::CreateStaticText( wxWindowMac* wxpeer, [v setSelectable: NO]; [v setBezeled:NO]; [v setBordered:NO]; - + NSLineBreakMode linebreak = NSLineBreakByWordWrapping; if ( ((wxStaticText*)wxpeer)->IsEllipsized() ) { @@ -113,11 +113,11 @@ wxWidgetImplType* wxWidgetImpl::CreateStaticText( wxWindowMac* wxpeer, else if (style & wxST_ELLIPSIZE_START ) linebreak = NSLineBreakByTruncatingHead; } - else + else { [[v cell] setWraps:YES]; } - + wxWidgetCocoaImpl* c = new wxStaticTextCocoaImpl( wxpeer, v, linebreak ); return c; } diff --git a/src/osx/cocoa/taskbar.mm b/src/osx/cocoa/taskbar.mm index 00486c8922..2f5762665c 100644 --- a/src/osx/cocoa/taskbar.mm +++ b/src/osx/cocoa/taskbar.mm @@ -48,9 +48,9 @@ public: inline wxTaskBarIcon* GetTaskBarIcon() { return m_taskBarIcon; } wxMenu * CreatePopupMenu() { return m_taskBarIcon->CreatePopupMenu(); } - + wxDECLARE_NO_COPY_CLASS(wxTaskBarIconImpl); - + protected: wxTaskBarIcon *m_taskBarIcon; wxTaskBarIconWindow *m_iconWindow; @@ -162,7 +162,7 @@ wxTaskBarIcon::~wxTaskBarIcon() // Operations bool wxTaskBarIcon::IsIconInstalled() const -{ +{ return false; } diff --git a/src/osx/cocoa/textctrl.mm b/src/osx/cocoa/textctrl.mm index 77a6ba4d02..14bfab4447 100644 --- a/src/osx/cocoa/textctrl.mm +++ b/src/osx/cocoa/textctrl.mm @@ -49,7 +49,7 @@ #include "wx/osx/private.h" #include "wx/osx/cocoa/private/textimpl.h" -@interface NSView(EditableView) +@interface NSView(EditableView) - (BOOL)isEditable; - (void)setEditable:(BOOL)flag; @end @@ -78,12 +78,12 @@ protected : NSView* m_textView; } ; -@implementation wxNSSecureTextField +@implementation wxNSSecureTextField + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); @@ -128,8 +128,8 @@ protected : + (void)initialize { static BOOL initialized = NO; - if (!initialized) - { + if (!initialized) + { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); } @@ -184,7 +184,7 @@ protected : + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); @@ -198,7 +198,7 @@ protected : + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); @@ -273,7 +273,7 @@ typedef BOOL (*wxOSX_insertNewlineHandlerPtr)(NSView* self, SEL _cmd, NSControl if ( impl ) { wxWindow* wxpeer = (wxWindow*) impl->GetWXPeer(); - if ( wxpeer && wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER ) + if ( wxpeer && wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER ) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, wxpeer->GetId()); event.SetEventObject( wxpeer ); @@ -282,7 +282,7 @@ typedef BOOL (*wxOSX_insertNewlineHandlerPtr)(NSView* self, SEL _cmd, NSControl } } } - + return NO; } @@ -303,24 +303,24 @@ wxNSTextViewControl::wxNSTextViewControl( wxTextCtrl *wxPeer, WXWidget w ) : wxW { wxNSTextScrollView* sv = (wxNSTextScrollView*) w; m_scrollView = sv; - + [m_scrollView setHasVerticalScroller:YES]; [m_scrollView setHasHorizontalScroller:NO]; [m_scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; NSSize contentSize = [m_scrollView contentSize]; - + wxNSTextView* tv = [[wxNSTextView alloc] initWithFrame: NSMakeRect(0, 0, contentSize.width, contentSize.height)]; m_textView = tv; [tv setVerticallyResizable:YES]; [tv setHorizontallyResizable:NO]; [tv setAutoresizingMask:NSViewWidthSizable]; - + [m_scrollView setDocumentView: tv]; [tv setDelegate: w]; - - InstallEventHandler(tv); + + InstallEventHandler(tv); } wxNSTextViewControl::~wxNSTextViewControl() @@ -329,9 +329,9 @@ wxNSTextViewControl::~wxNSTextViewControl() [m_textView setDelegate: nil]; } -wxString wxNSTextViewControl::GetStringValue() const +wxString wxNSTextViewControl::GetStringValue() const { - if (m_textView) + if (m_textView) { wxString result = wxCFStringRef::AsString([m_textView string], m_wxPeer->GetFont().GetEncoding()); wxMacConvertNewlines13To10( &result ) ; @@ -339,7 +339,7 @@ wxString wxNSTextViewControl::GetStringValue() const } return wxEmptyString; } -void wxNSTextViewControl::SetStringValue( const wxString &str) +void wxNSTextViewControl::SetStringValue( const wxString &str) { wxString st = str; wxMacConvertNewlines10To13( &st ); @@ -349,37 +349,37 @@ void wxNSTextViewControl::SetStringValue( const wxString &str) [m_textView setString: wxCFStringRef( st , m_wxPeer->GetFont().GetEncoding() ).AsNSString()]; } -void wxNSTextViewControl::Copy() +void wxNSTextViewControl::Copy() { if (m_textView) [m_textView copy:nil]; } -void wxNSTextViewControl::Cut() +void wxNSTextViewControl::Cut() { if (m_textView) [m_textView cut:nil]; } -void wxNSTextViewControl::Paste() +void wxNSTextViewControl::Paste() { if (m_textView) [m_textView paste:nil]; } -bool wxNSTextViewControl::CanPaste() const -{ +bool wxNSTextViewControl::CanPaste() const +{ return true; } -void wxNSTextViewControl::SetEditable(bool editable) +void wxNSTextViewControl::SetEditable(bool editable) { if (m_textView) [m_textView setEditable: editable]; } -void wxNSTextViewControl::GetSelection( long* from, long* to) const +void wxNSTextViewControl::GetSelection( long* from, long* to) const { if (m_textView) { @@ -411,12 +411,12 @@ void wxNSTextViewControl::SetSelection( long from , long to ) [m_textView scrollRangeToVisible:selrange]; } -void wxNSTextViewControl::WriteText(const wxString& str) +void wxNSTextViewControl::WriteText(const wxString& str) { wxString st = str; wxMacConvertNewlines10To13( &st ); wxMacEditHelper helper(m_textView); - + [m_textView insertText:wxCFStringRef( st , m_wxPeer->GetFont().GetEncoding() ).AsNSString()]; } @@ -443,18 +443,18 @@ wxNSTextFieldControl::~wxNSTextFieldControl() [m_textField setDelegate: nil]; } -wxString wxNSTextFieldControl::GetStringValue() const +wxString wxNSTextFieldControl::GetStringValue() const { return wxCFStringRef::AsString([m_textField stringValue], m_wxPeer->GetFont().GetEncoding()); } -void wxNSTextFieldControl::SetStringValue( const wxString &str) +void wxNSTextFieldControl::SetStringValue( const wxString &str) { wxMacEditHelper helper(m_textField); [m_textField setStringValue: wxCFStringRef( str , m_wxPeer->GetFont().GetEncoding() ).AsNSString()]; } -void wxNSTextFieldControl::Copy() +void wxNSTextFieldControl::Copy() { NSText* editor = [m_textField currentEditor]; if ( editor ) @@ -463,7 +463,7 @@ void wxNSTextFieldControl::Copy() } } -void wxNSTextFieldControl::Cut() +void wxNSTextFieldControl::Cut() { NSText* editor = [m_textField currentEditor]; if ( editor ) @@ -472,7 +472,7 @@ void wxNSTextFieldControl::Cut() } } -void wxNSTextFieldControl::Paste() +void wxNSTextFieldControl::Paste() { NSText* editor = [m_textField currentEditor]; if ( editor ) @@ -481,17 +481,17 @@ void wxNSTextFieldControl::Paste() } } -bool wxNSTextFieldControl::CanPaste() const -{ +bool wxNSTextFieldControl::CanPaste() const +{ return true; } -void wxNSTextFieldControl::SetEditable(bool editable) +void wxNSTextFieldControl::SetEditable(bool editable) { [m_textField setEditable:editable]; } -void wxNSTextFieldControl::GetSelection( long* from, long* to) const +void wxNSTextFieldControl::GetSelection( long* from, long* to) const { NSText* editor = [m_textField currentEditor]; if ( editor ) @@ -536,7 +536,7 @@ void wxNSTextFieldControl::SetSelection( long from , long to ) } } -void wxNSTextFieldControl::WriteText(const wxString& str) +void wxNSTextFieldControl::WriteText(const wxString& str) { NSText* editor = [m_textField currentEditor]; if ( editor ) @@ -556,11 +556,11 @@ void wxNSTextFieldControl::WriteText(const wxString& str) } } -void wxNSTextFieldControl::controlAction(WXWidget WXUNUSED(slf), +void wxNSTextFieldControl::controlAction(WXWidget WXUNUSED(slf), void* WXUNUSED(_cmd), void *WXUNUSED(sender)) { wxWindow* wxpeer = (wxWindow*) GetWXPeer(); - if ( wxpeer && (wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER) ) + if ( wxpeer && (wxpeer->GetWindowStyle() & wxTE_PROCESS_ENTER) ) { wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, wxpeer->GetId()); event.SetEventObject( wxpeer ); @@ -573,18 +573,18 @@ void wxNSTextFieldControl::controlAction(WXWidget WXUNUSED(slf), // // -wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& str, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxWidgetCocoaImpl* c = NULL; - + if ( style & wxTE_MULTILINE || style & wxTE_RICH || style & wxTE_RICH2 ) { wxNSTextScrollView* v = nil; @@ -592,27 +592,27 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, c = new wxNSTextViewControl( wxpeer, v ); static_cast(c)->SetStringValue(str); } - else + else { NSTextField* v = nil; if ( style & wxTE_PASSWORD ) v = [[wxNSSecureTextField alloc] initWithFrame:r]; else v = [[wxNSTextField alloc] initWithFrame:r]; - + if ( style & wxNO_BORDER ) { // FIXME: How can we remove the native control's border? // setBordered is separate from the text ctrl's border. } - + [v setBezeled:NO]; [v setBordered:NO]; - + c = new wxNSTextFieldControl( wxpeer, v ); static_cast(c)->SetStringValue(str); } - + return c; } diff --git a/src/osx/cocoa/tglbtn.mm b/src/osx/cocoa/tglbtn.mm index a3002b3d94..8b4fe03b96 100644 --- a/src/osx/cocoa/tglbtn.mm +++ b/src/osx/cocoa/tglbtn.mm @@ -25,36 +25,36 @@ #include "wx/tglbtn.h" #include "wx/osx/private.h" -wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateToggleButton( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) { NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; - - [v setBezelStyle:NSSmallSquareBezelStyle]; + + [v setBezelStyle:NSSmallSquareBezelStyle]; [v setButtonType:NSOnOffButton]; wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); return c; } -wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateBitmapToggleButton( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxBitmap& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), + long WXUNUSED(style), long WXUNUSED(extraStyle)) -{ +{ NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSButton* v = [[wxNSButton alloc] initWithFrame:r]; - + [v setBezelStyle:NSRegularSquareBezelStyle]; [v setButtonType:NSOnOffButton]; wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); diff --git a/src/osx/cocoa/toolbar.mm b/src/osx/cocoa/toolbar.mm index 70b6de32d0..3d24514ef0 100644 --- a/src/osx/cocoa/toolbar.mm +++ b/src/osx/cocoa/toolbar.mm @@ -153,9 +153,9 @@ public: bool DoEnable( bool enable ); void UpdateImages(); - + void UpdateToggleImage( bool toggle ); - + void UpdateLabel() { #if wxOSX_USE_NATIVE_TOOLBAR @@ -167,7 +167,7 @@ public: wxCFStringRef l(labelStr, GetToolBarFontEncoding()); [m_toolbarItem setLabel:l.AsNSString()]; - + wxCFStringRef sh( GetShortHelp(), GetToolBarFontEncoding() ); [m_toolbarItem setToolTip:sh.AsNSString()]; } @@ -187,7 +187,7 @@ public: tbar->OnLeftClick( GetId(), IsToggled() ); } - + #if wxOSX_USE_NATIVE_TOOLBAR void SetToolbarItemRef( NSToolbarItem* ref ) { @@ -274,7 +274,7 @@ private: } - (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier:(NSString *)itemIdentifier willBeInsertedIntoToolbar:(BOOL)flag; - + - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar*)toolbar; - (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar*)toolbar; @@ -479,7 +479,7 @@ void wxToolBarTool::SetPosition( const wxPoint& position ) frame.origin.y = mac_y; [m_controlHandle setFrame:frame]; } - } + } } void wxToolBarTool::UpdateImages() @@ -499,7 +499,7 @@ void wxToolBarTool::UpdateImages() dc.DrawRectangle( 0, 0, w, h ); dc.DrawBitmap( m_bmpNormal, 0, 0, true ); dc.SelectObject( wxNullBitmap ); - + [(NSButton*) m_controlHandle setAlternateImage:m_alternateBitmap.GetNSImage()]; } UpdateToggleImage( CanBeToggled() && IsToggled() ); @@ -598,19 +598,19 @@ bool wxToolBar::Create( if (parent->IsKindOf(CLASSINFO(wxFrame)) && wxSystemOptions::GetOptionInt(wxT("mac.toolbar.no-native")) != 1) { static wxNSToolbarDelegate* controller = nil; - + if ( controller == nil ) controller = [[wxNSToolbarDelegate alloc] init]; wxString identifier = wxString::Format( wxT("%p"), this ); wxCFStringRef cfidentifier(identifier); NSToolbar* tb = [[NSToolbar alloc] initWithIdentifier:cfidentifier.AsNSString()]; - + m_macToolbar = tb ; - + if (m_macToolbar != NULL) { [tb setDelegate:controller]; - + NSToolbarDisplayMode mode = NSToolbarDisplayModeDefault; NSToolbarSizeMode displaySize = NSToolbarSizeModeSmall; @@ -706,7 +706,7 @@ void wxToolBar::DoGetSize( int *width, int *height ) const WXWindow tlw = MacGetTopLevelWindowRef(); float toolbarHeight = 0.0; NSRect windowFrame = NSMakeRect(0, 0, 0, 0); - + if(m_macToolbar && [(NSToolbar*)m_macToolbar isVisible]) { windowFrame = [NSWindow contentRectForFrameRect:[tlw frame] @@ -714,7 +714,7 @@ void wxToolBar::DoGetSize( int *width, int *height ) const toolbarHeight = NSHeight(windowFrame) - NSHeight([[tlw contentView] frame]); } - + if ( width != NULL ) *width = (int)windowFrame.size.width; if ( height != NULL ) @@ -810,7 +810,7 @@ bool wxToolBar::MacInstallNativeToolbar(bool usesNative) bResult = true; [tlw setToolbar:(NSToolbar*) m_macToolbar]; [(NSToolbar*) m_macToolbar setVisible:YES]; - + m_peer->Move(0,0,0,0 ); SetSize( wxSIZE_AUTO_WIDTH, 0 ); m_peer->SetVisibility( false ); @@ -1236,9 +1236,9 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *toolBase) [v setBordered:NO]; [v setButtonType: ( tool->CanBeToggled() ? NSOnOffButton : NSMomentaryPushInButton )]; [v setImplementation:tool]; - + controlHandle = v; - + #if wxOSX_USE_NATIVE_TOOLBAR if (m_macToolbar != NULL) { diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index 194abcd750..4b22268b3f 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -52,7 +52,7 @@ void wxBell() void wxMacWakeUp() { - NSEvent* wakeupEvent = [NSEvent otherEventWithType:NSApplicationDefined location:NSZeroPoint + NSEvent* wakeupEvent = [NSEvent otherEventWithType:NSApplicationDefined location:NSZeroPoint modifierFlags:NSAnyEventMask timestamp:0 windowNumber:0 context:nil subtype:0 data1:0 data2:0]; [NSApp postEvent:wakeupEvent atStart:NO]; } @@ -148,9 +148,9 @@ void wxMacWakeUp() } @end -/* +/* allows ShowModal to work when using sheets. - see include/wx/osx/cocoa/private.h for more info + see include/wx/osx/cocoa/private.h for more info */ @implementation ModalDialogDelegate - (id)init @@ -161,7 +161,7 @@ void wxMacWakeUp() return self; } -- (BOOL)finished +- (BOOL)finished { return sheetFinished; } @@ -300,7 +300,7 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const // called from OnPaint, even with the window's paint dc as source (see wxHTMLWindow) NSBitmapImageRep *rep = [[[NSBitmapImageRep alloc] initWithFocusedViewRect: [view bounds]] retain]; [view unlockFocus]; - + wxBitmap bitmap(width, height); if ( [rep respondsToSelector:@selector(CGImage)] ) { diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index f645830968..fed5b07659 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -82,12 +82,12 @@ NSRect wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const NSTrackingRectTag rectTag; } -// the tracking tag is needed to track mouse enter / exit events +// the tracking tag is needed to track mouse enter / exit events - (void) setTrackingTag: (NSTrackingRectTag)tag; - (NSTrackingRectTag) trackingTag; @end // wxNSView -@interface NSView(PossibleMethods) +@interface NSView(PossibleMethods) - (void)setTitle:(NSString *)aString; - (void)setStringValue:(NSString *)aString; - (void)setIntValue:(int)anInt; @@ -114,14 +114,14 @@ NSRect wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const - (void)setTarget:(id)anObject; - (void)setAction:(SEL)aSelector; - (void)setDoubleAction:(SEL)aSelector; -@end +@end long wxOSXTranslateCocoaKey( NSEvent* event ) { long retval = 0; if ([event type] != NSFlagsChanged) - { + { NSString* s = [event charactersIgnoringModifiers]; // backspace char reports as delete w/modifiers for some reason if ([s length] == 1) @@ -130,7 +130,7 @@ long wxOSXTranslateCocoaKey( NSEvent* event ) { // backspace key case 0x7F : - case 8 : + case 8 : retval = WXK_BACK; break; case NSUpArrowFunctionKey : @@ -177,7 +177,7 @@ long wxOSXTranslateCocoaKey( NSEvent* event ) } } } - + // Some keys don't seem to have constants. The code mimics the approach // taken by WebKit. See: // http://trac.webkit.org/browser/trunk/WebCore/platform/mac/KeyEventMac.mm @@ -208,17 +208,17 @@ long wxOSXTranslateCocoaKey( NSEvent* event ) retval = WXK_CONTROL; break; // clear key - case 71: + case 71: retval = WXK_CLEAR; break; // tab key - case 48: + case 48: retval = WXK_TAB; break; case 75: // / retval = WXK_NUMPAD_DIVIDE; - break; + break; case 67: // * retval = WXK_NUMPAD_MULTIPLY; break; @@ -280,10 +280,10 @@ void SetupKeyEvent( wxKeyEvent &wxevent , NSEvent * nsEvent, NSString* charStrin wxevent.m_controlDown = modifiers & NSControlKeyMask; wxevent.m_altDown = modifiers & NSAlternateKeyMask; wxevent.m_metaDown = modifiers & NSCommandKeyMask; - + wxevent.m_rawCode = [nsEvent keyCode]; wxevent.m_rawFlags = modifiers; - + wxevent.SetTimestamp( (int)([nsEvent timestamp] * 1000) ) ; wxString chars; @@ -301,10 +301,10 @@ void SetupKeyEvent( wxKeyEvent &wxevent , NSEvent * nsEvent, NSString* charStrin chars = wxCFStringRef::AsString(nschars); } } - + int aunichar = chars.Length() > 0 ? chars[0] : 0; long keyval = 0; - + if (wxevent.GetEventType() != wxEVT_CHAR) { keyval = wxOSXTranslateCocoaKey(nsEvent) ; @@ -345,7 +345,7 @@ void SetupKeyEvent( wxKeyEvent &wxevent , NSEvent * nsEvent, NSString* charStrin else keyval = aunichar; } - + #if wxUSE_UNICODE wxevent.m_uniChar = aunichar; #endif @@ -373,7 +373,7 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEvent ) wxevent.m_metaDown = modifiers & NSCommandKeyMask; wxevent.SetTimestamp( (int)([nsEvent timestamp] * 1000) ) ; - UInt32 mouseChord = 0; + UInt32 mouseChord = 0; switch (eventType) { @@ -519,9 +519,9 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEvent ) default : break ; } - + wxevent.m_clickCount = clickCount; - + } @implementation wxNSView @@ -529,7 +529,7 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSEvent * nsEvent ) + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXCocoaClassAddWXMethods( self ); @@ -562,7 +562,7 @@ NSDragOperation wxOSX_draggingEntered( id self, SEL _cmd, id sen wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return NSDragOperationNone; - + return impl->draggingEntered(sender, self, _cmd); } @@ -571,7 +571,7 @@ void wxOSX_draggingExited( id self, SEL _cmd, id sender ) wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return ; - + return impl->draggingExited(sender, self, _cmd); } @@ -580,7 +580,7 @@ NSDragOperation wxOSX_draggingUpdated( id self, SEL _cmd, id sen wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return NSDragOperationNone; - + return impl->draggingUpdated(sender, self, _cmd); } @@ -589,45 +589,45 @@ BOOL wxOSX_performDragOperation( id self, SEL _cmd, id sender ) wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return NSDragOperationNone; - + return impl->performDragOperation(sender, self, _cmd) ? YES:NO ; } #endif -void wxOSX_mouseEvent(NSView* self, SEL _cmd, NSEvent *event) +void wxOSX_mouseEvent(NSView* self, SEL _cmd, NSEvent *event) { wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return; - + impl->mouseEvent(event, self, _cmd); } -void wxOSX_keyEvent(NSView* self, SEL _cmd, NSEvent *event) +void wxOSX_keyEvent(NSView* self, SEL _cmd, NSEvent *event) { wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return; - + impl->keyEvent(event, self, _cmd); } -void wxOSX_insertText(NSView* self, SEL _cmd, NSString* text) +void wxOSX_insertText(NSView* self, SEL _cmd, NSString* text) { wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return; - + impl->insertText(text, self, _cmd); } -BOOL wxOSX_performKeyEquivalent(NSView* self, SEL _cmd, NSEvent *event) +BOOL wxOSX_performKeyEquivalent(NSView* self, SEL _cmd, NSEvent *event) { wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return NO; - + return impl->performKeyEquivalent(event, self, _cmd); } @@ -636,7 +636,7 @@ BOOL wxOSX_acceptsFirstResponder(NSView* self, SEL _cmd) wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return NO; - + return impl->acceptsFirstResponder(self, _cmd); } @@ -645,7 +645,7 @@ BOOL wxOSX_becomeFirstResponder(NSView* self, SEL _cmd) wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return NO; - + return impl->becomeFirstResponder(self, _cmd); } @@ -654,7 +654,7 @@ BOOL wxOSX_resignFirstResponder(NSView* self, SEL _cmd) wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return NO; - + return impl->resignFirstResponder(self, _cmd); } @@ -663,7 +663,7 @@ void wxOSX_resetCursorRects(NSView* self, SEL _cmd) wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return; - + impl->resetCursorRects(self, _cmd); } @@ -672,7 +672,7 @@ BOOL wxOSX_isFlipped(NSView* self, SEL _cmd) wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return NO; - + return impl->isFlipped(self, _cmd) ? YES:NO; } @@ -681,7 +681,7 @@ void wxOSX_drawRect(NSView* self, SEL _cmd, NSRect rect) wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return; - + return impl->drawRect(&rect, self, _cmd); } @@ -690,7 +690,7 @@ void wxOSX_controlAction(NSView* self, SEL _cmd, id sender) wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return; - + impl->controlAction(self, _cmd, sender); } @@ -699,7 +699,7 @@ void wxOSX_controlDoubleAction(NSView* self, SEL _cmd, id sender) wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return; - + impl->controlDoubleAction(self, _cmd, sender); } @@ -708,11 +708,11 @@ unsigned int wxWidgetCocoaImpl::draggingEntered(void* s, WXWidget WXUNUSED(slf), id sender = (id ) s; NSPasteboard *pboard = [sender draggingPasteboard]; NSDragOperation sourceDragMask = [sender draggingSourceOperationMask]; - + wxWindow* wxpeer = GetWXPeer(); if ( wxpeer == NULL ) return NSDragOperationNone; - + wxDropTarget* target = wxpeer->GetDropTarget(); if ( target == NULL ) return NSDragOperationNone; @@ -728,12 +728,12 @@ unsigned int wxWidgetCocoaImpl::draggingEntered(void* s, WXWidget WXUNUSED(slf), else if ( sourceDragMask & NSDragOperationMove ) result = wxDragMove; - PasteboardRef pboardRef; + PasteboardRef pboardRef; PasteboardCreate((CFStringRef)[pboard name], &pboardRef); target->SetCurrentDragPasteboard(pboardRef); result = target->OnEnter(pt.x, pt.y, result); CFRelease(pboardRef); - + NSDragOperation nsresult = NSDragOperationNone; switch (result ) { @@ -753,16 +753,16 @@ void wxWidgetCocoaImpl::draggingExited(void* s, WXWidget WXUNUSED(slf), void *WX { id sender = (id ) s; NSPasteboard *pboard = [sender draggingPasteboard]; - + wxWindow* wxpeer = GetWXPeer(); if ( wxpeer == NULL ) return; - + wxDropTarget* target = wxpeer->GetDropTarget(); if ( target == NULL ) return; - - PasteboardRef pboardRef; + + PasteboardRef pboardRef; PasteboardCreate((CFStringRef)[pboard name], &pboardRef); target->SetCurrentDragPasteboard(pboardRef); target->OnLeave(); @@ -774,11 +774,11 @@ unsigned int wxWidgetCocoaImpl::draggingUpdated(void* s, WXWidget WXUNUSED(slf), id sender = (id ) s; NSPasteboard *pboard = [sender draggingPasteboard]; NSDragOperation sourceDragMask = [sender draggingSourceOperationMask]; - + wxWindow* wxpeer = GetWXPeer(); if ( wxpeer == NULL ) return NSDragOperationNone; - + wxDropTarget* target = wxpeer->GetDropTarget(); if ( target == NULL ) return NSDragOperationNone; @@ -794,12 +794,12 @@ unsigned int wxWidgetCocoaImpl::draggingUpdated(void* s, WXWidget WXUNUSED(slf), else if ( sourceDragMask & NSDragOperationMove ) result = wxDragMove; - PasteboardRef pboardRef; + PasteboardRef pboardRef; PasteboardCreate((CFStringRef)[pboard name], &pboardRef); target->SetCurrentDragPasteboard(pboardRef); result = target->OnDragOver(pt.x, pt.y, result); CFRelease(pboardRef); - + NSDragOperation nsresult = NSDragOperationNone; switch (result ) { @@ -821,7 +821,7 @@ bool wxWidgetCocoaImpl::performDragOperation(void* s, WXWidget WXUNUSED(slf), vo NSPasteboard *pboard = [sender draggingPasteboard]; NSDragOperation sourceDragMask = [sender draggingSourceOperationMask]; - + wxWindow* wxpeer = GetWXPeer(); wxDropTarget* target = wxpeer->GetDropTarget(); wxDragResult result = wxDragNone; @@ -835,7 +835,7 @@ bool wxWidgetCocoaImpl::performDragOperation(void* s, WXWidget WXUNUSED(slf), vo else if ( sourceDragMask & NSDragOperationMove ) result = wxDragMove; - PasteboardRef pboardRef; + PasteboardRef pboardRef; PasteboardCreate((CFStringRef)[pboard name], &pboardRef); target->SetCurrentDragPasteboard(pboardRef); @@ -843,7 +843,7 @@ bool wxWidgetCocoaImpl::performDragOperation(void* s, WXWidget WXUNUSED(slf), vo result = target->OnData(pt.x, pt.y, result); CFRelease(pboardRef); - + return result != wxDragNone; } @@ -908,7 +908,7 @@ bool wxWidgetCocoaImpl::becomeFirstResponder(WXWidget slf, void *_cmd) { wxOSX_FocusHandlerPtr superimpl = (wxOSX_FocusHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd]; // get the current focus before running becomeFirstResponder - NSView* otherView = FindFocus(); + NSView* otherView = FindFocus(); wxWidgetImpl* otherWindow = FindFromWXWidget(otherView); BOOL r = superimpl(slf, (SEL)_cmd); @@ -927,7 +927,7 @@ bool wxWidgetCocoaImpl::resignFirstResponder(WXWidget slf, void *_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(); + NSView* otherView = FindFocus(); wxWidgetImpl* otherWindow = FindFromWXWidget(otherView); // 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 @@ -956,7 +956,7 @@ void wxWidgetCocoaImpl::resetCursorRects(WXWidget slf, void *_cmd) } } } - + bool wxWidgetCocoaImpl::isFlipped(WXWidget WXUNUSED(slf), void *WXUNUSED(_cmd)) { return m_isFlipped; @@ -969,7 +969,7 @@ void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *WXUNUSED(_cmd)) { CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort]; CGContextSaveGState( context ); - + #if OSX_DEBUG_DRAWING CGContextBeginPath( context ); CGContextMoveToPoint(context, 0, 0); @@ -990,7 +990,7 @@ void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *WXUNUSED(_cmd)) CGContextTranslateCTM( context, 0, [m_osxView bounds].size.height ); CGContextScaleCTM( context, 1, -1 ); } - + wxRegion updateRgn; const NSRect *rects; NSInteger count; @@ -1004,9 +1004,9 @@ void wxWidgetCocoaImpl::drawRect(void* rect, WXWidget slf, void *WXUNUSED(_cmd)) wxWindow* wxpeer = GetWXPeer(); wxpeer->GetUpdateRegion() = updateRgn; wxpeer->MacSetCGContextRef( context ); - + bool handled = wxpeer->MacDoRedraw( 0 ); - + CGContextRestoreGState( context ); CGContextSaveGState( context ); @@ -1035,7 +1035,7 @@ void wxWidgetCocoaImpl::controlDoubleAction( WXWidget WXUNUSED(slf), void *WXUNU { } -// +// #if OBJC_API_VERSION >= 2 @@ -1074,11 +1074,11 @@ void wxOSXCocoaClassAddWXMethods(Class c) wxOSX_CLASS_ADD_METHOD(c, @selector(scrollWheel:), (IMP) wxOSX_mouseEvent, "v@:@" ) wxOSX_CLASS_ADD_METHOD(c, @selector(mouseEntered:), (IMP) wxOSX_mouseEvent, "v@:@" ) wxOSX_CLASS_ADD_METHOD(c, @selector(mouseExited:), (IMP) wxOSX_mouseEvent, "v@:@" ) - + wxOSX_CLASS_ADD_METHOD(c, @selector(keyDown:), (IMP) wxOSX_keyEvent, "v@:@" ) wxOSX_CLASS_ADD_METHOD(c, @selector(keyUp:), (IMP) wxOSX_keyEvent, "v@:@" ) wxOSX_CLASS_ADD_METHOD(c, @selector(flagsChanged:), (IMP) wxOSX_keyEvent, "v@:@" ) - + wxOSX_CLASS_ADD_METHOD(c, @selector(insertText:), (IMP) wxOSX_insertText, "v@:@" ) wxOSX_CLASS_ADD_METHOD(c, @selector(performKeyEquivalent:), (IMP) wxOSX_performKeyEquivalent, "c@:@" ) @@ -1099,8 +1099,8 @@ void wxOSXCocoaClassAddWXMethods(Class c) wxOSX_CLASS_ADD_METHOD(c, @selector(draggingUpdated:), (IMP) wxOSX_draggingUpdated, "I@:@" ) wxOSX_CLASS_ADD_METHOD(c, @selector(draggingExited:), (IMP) wxOSX_draggingExited, "v@:@" ) wxOSX_CLASS_ADD_METHOD(c, @selector(performDragOperation:), (IMP) wxOSX_performDragOperation, "c@:@" ) -#endif - +#endif + #if OBJC_API_VERSION < 2 } ; static int method_count = WXSIZEOF( wxmethods ); @@ -1133,7 +1133,7 @@ wxWidgetCocoaImpl::wxWidgetCocoaImpl( wxWindowMac* peer , WXWidget w, bool isRoo [m_osxView release]; } -wxWidgetCocoaImpl::wxWidgetCocoaImpl() +wxWidgetCocoaImpl::wxWidgetCocoaImpl() { Init(); } @@ -1160,8 +1160,8 @@ wxWidgetCocoaImpl::~wxWidgetCocoaImpl() if ( m_osxView ) CFRelease(m_osxView); } - -bool wxWidgetCocoaImpl::IsVisible() const + +bool wxWidgetCocoaImpl::IsVisible() const { return [m_osxView isHiddenOrHasHiddenAncestor] == NO; } @@ -1175,7 +1175,7 @@ void wxWidgetCocoaImpl::Raise() { // Not implemented } - + void wxWidgetCocoaImpl::Lower() { // Not implemented @@ -1200,7 +1200,7 @@ void wxWidgetCocoaImpl::ScrollRect( const wxRect *WXUNUSED(rect), int WXUNUSED(d void wxWidgetCocoaImpl::Move(int x, int y, int width, int height) { wxWindowMac* parent = GetWXPeer()->GetParent(); - // under Cocoa we might have a contentView in the wxParent to which we have to + // under Cocoa we might have a contentView in the wxParent to which we have to // adjust the coordinates if (parent && [m_osxView superview] != parent->GetHandle() ) { @@ -1215,13 +1215,13 @@ void wxWidgetCocoaImpl::Move(int x, int y, int width, int height) [[m_osxView superview] setNeedsDisplayInRect:[m_osxView frame]]; NSRect r = wxToNSRect( [m_osxView superview], wxRect(x,y,width, height) ); [m_osxView setFrame:r]; - [[m_osxView superview] setNeedsDisplayInRect:r]; - + [[m_osxView superview] setNeedsDisplayInRect:r]; + if ([m_osxView respondsToSelector:@selector(trackingTag)] ) { if ( [(wxNSView*)m_osxView trackingTag] ) [m_osxView removeTrackingRect: [(wxNSView*)m_osxView trackingTag]]; - + [(wxNSView*)m_osxView setTrackingTag: [m_osxView addTrackingRect: [m_osxView bounds] owner: m_osxView userData: nil assumeInside: NO]]; } } @@ -1245,10 +1245,10 @@ void wxWidgetCocoaImpl::GetContentArea( int&left, int &top, int &width, int &hei if ( [m_osxView respondsToSelector:@selector(contentView) ] ) { NSView* cv = [m_osxView contentView]; - + NSRect bounds = [m_osxView bounds]; NSRect rect = [cv frame]; - + int y = (int)rect.origin.y; int x = (int)rect.origin.x; if ( ![ m_osxView isFlipped ] ) @@ -1288,11 +1288,11 @@ bool wxWidgetCocoaImpl::HasFocus() const return ( FindFocus() == m_osxView ); } -bool wxWidgetCocoaImpl::SetFocus() +bool wxWidgetCocoaImpl::SetFocus() { if ( [m_osxView canBecomeKeyView] == NO ) return false; - + [[m_osxView window] makeFirstResponder: m_osxView] ; [[m_osxView window] makeKeyAndOrderFront:nil] ; return true; @@ -1329,21 +1329,21 @@ void wxWidgetCocoaImpl::SetLabel( const wxString& title, wxFontEncoding encoding [m_osxView setStringValue:cf.AsNSString()]; } } - + void wxWidgetImpl::Convert( wxPoint *pt , wxWidgetImpl *from , wxWidgetImpl *to ) { NSPoint p = wxToNSPoint( from->GetWXWidget(), *pt ); - p = [from->GetWXWidget() convertPoint:p toView:to->GetWXWidget() ]; + p = [from->GetWXWidget() convertPoint:p toView:to->GetWXWidget() ]; *pt = wxFromNSPoint( to->GetWXWidget(), p ); } -wxInt32 wxWidgetCocoaImpl::GetValue() const +wxInt32 wxWidgetCocoaImpl::GetValue() const { return [(NSControl*)m_osxView intValue]; } -void wxWidgetCocoaImpl::SetValue( wxInt32 v ) +void wxWidgetCocoaImpl::SetValue( wxInt32 v ) { if ( [m_osxView respondsToSelector:@selector(setIntValue:)] ) { @@ -1359,7 +1359,7 @@ void wxWidgetCocoaImpl::SetValue( wxInt32 v ) } } -void wxWidgetCocoaImpl::SetMinimum( wxInt32 v ) +void wxWidgetCocoaImpl::SetMinimum( wxInt32 v ) { if ( [m_osxView respondsToSelector:@selector(setMinValue:)] ) { @@ -1367,7 +1367,7 @@ void wxWidgetCocoaImpl::SetMinimum( wxInt32 v ) } } -void wxWidgetCocoaImpl::SetMaximum( wxInt32 v ) +void wxWidgetCocoaImpl::SetMaximum( wxInt32 v ) { if ( [m_osxView respondsToSelector:@selector(setMaxValue:)] ) { @@ -1375,7 +1375,7 @@ void wxWidgetCocoaImpl::SetMaximum( wxInt32 v ) } } -wxInt32 wxWidgetCocoaImpl::GetMinimum() const +wxInt32 wxWidgetCocoaImpl::GetMinimum() const { if ( [m_osxView respondsToSelector:@selector(getMinValue:)] ) { @@ -1384,7 +1384,7 @@ wxInt32 wxWidgetCocoaImpl::GetMinimum() const return 0; } -wxInt32 wxWidgetCocoaImpl::GetMaximum() const +wxInt32 wxWidgetCocoaImpl::GetMaximum() const { if ( [m_osxView respondsToSelector:@selector(getMaxValue:)] ) { @@ -1487,10 +1487,10 @@ void wxWidgetCocoaImpl::SetScrollThumb( wxInt32 WXUNUSED(val), wxInt32 WXUNUSED( { } -void wxWidgetCocoaImpl::SetControlSize( wxWindowVariant variant ) +void wxWidgetCocoaImpl::SetControlSize( wxWindowVariant variant ) { NSControlSize size = NSRegularControlSize; - + switch ( variant ) { case wxWINDOW_VARIANT_NORMAL : @@ -1515,12 +1515,12 @@ void wxWidgetCocoaImpl::SetControlSize( wxWindowVariant variant ) } if ( [m_osxView respondsToSelector:@selector(setControlSize:)] ) [m_osxView setControlSize:size]; - else if ([m_osxView respondsToSelector:@selector(cell)]) - { - id cell = [(id)m_osxView cell]; - if ([cell respondsToSelector:@selector(setControlSize:)]) - [cell setControlSize:size]; - } + else if ([m_osxView respondsToSelector:@selector(cell)]) + { + id cell = [(id)m_osxView cell]; + if ([cell respondsToSelector:@selector(setControlSize:)]) + [cell setControlSize:size]; + } } void wxWidgetCocoaImpl::SetFont(wxFont const& font, wxColour const&, long, bool) @@ -1541,7 +1541,7 @@ void wxWidgetCocoaImpl::InstallEventHandler( WXWidget control ) { [c setDoubleAction: @selector(controlDoubleAction:)]; } - + } } @@ -1549,7 +1549,7 @@ bool wxWidgetCocoaImpl::DoHandleCharEvent(NSEvent *event, NSString *text) { wxKeyEvent wxevent(wxEVT_CHAR); SetupKeyEvent( wxevent, event, text ); - wxevent.SetEventObject(GetWXPeer()); + wxevent.SetEventObject(GetWXPeer()); return GetWXPeer()->OSXHandleKeyEvent(wxevent); } @@ -1558,7 +1558,7 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event) { wxKeyEvent wxevent(wxEVT_KEY_DOWN); SetupKeyEvent( wxevent, event ); - wxevent.SetEventObject(GetWXPeer()); + wxevent.SetEventObject(GetWXPeer()); bool result = GetWXPeer()->OSXHandleKeyEvent(wxevent); // this will fire higher level events, like insertText, to help @@ -1580,8 +1580,8 @@ bool wxWidgetCocoaImpl::DoHandleKeyEvent(NSEvent *event) bool wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent *event) { - NSPoint clickLocation; - clickLocation = [m_osxView convertPoint:[event locationInWindow] fromView:nil]; + NSPoint clickLocation; + clickLocation = [m_osxView convertPoint:[event locationInWindow] fromView:nil]; wxPoint pt = wxFromNSPoint( m_osxView, clickLocation ); wxMouseEvent wxevent(wxEVT_LEFT_DOWN); SetupMouseEvent( wxevent , event ) ; @@ -1625,7 +1625,7 @@ void wxWidgetCocoaImpl::DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* oth #endif wxLogTrace(wxT("Focus"), wxT("focus lost(%p)"), static_cast(thisWindow)); - + wxFocusEvent event( wxEVT_KILL_FOCUS, thisWindow->GetId()); event.SetEventObject(thisWindow); if (otherWindow) @@ -1666,7 +1666,7 @@ void wxWidgetCocoaImpl::SetFlipped(bool flipped) // Factory methods // -wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), +wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), wxWindowID WXUNUSED(id), const wxPoint& pos, const wxSize& size, long WXUNUSED(style), long WXUNUSED(extraStyle)) { @@ -1676,12 +1676,12 @@ wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WX // temporary hook for dnd [v registerForDraggedTypes:[NSArray arrayWithObjects: NSStringPboardType, NSFilenamesPboardType, NSTIFFPboardType, NSPICTPboardType, NSPDFPboardType, nil]]; - + wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v ); return c; } -wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) +wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) { NSWindow* tlw = now->GetWXWindow(); wxNSView* v = [[wxNSView alloc] initWithFrame:[[tlw contentView] frame]]; diff --git a/src/osx/core/bitmap.cpp b/src/osx/core/bitmap.cpp index a2f7660435..157cb84b51 100644 --- a/src/osx/core/bitmap.cpp +++ b/src/osx/core/bitmap.cpp @@ -1171,7 +1171,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth) int height = image.GetHeight(); wxBitmapRefData* bitmapRefData; - + m_refData = bitmapRefData = new wxBitmapRefData( width , height , depth ) ; if ( bitmapRefData->IsOk()) @@ -1654,7 +1654,7 @@ WXHBITMAP wxMask::GetHBITMAP() const // Standard Handlers // ---------------------------------------------------------------------------- -#if !defined( __LP64__ ) && !defined(__WXOSX_IPHONE__) +#if !defined( __LP64__ ) && !defined(__WXOSX_IPHONE__) class WXDLLEXPORT wxPICTResourceHandler: public wxBitmapHandler { diff --git a/src/osx/core/cfstring.cpp b/src/osx/core/cfstring.cpp index b603e5b48d..46a9c0c8af 100644 --- a/src/osx/core/cfstring.cpp +++ b/src/osx/core/cfstring.cpp @@ -641,7 +641,7 @@ wxString wxCFStringRef::AsString( CFStringRef ref, wxFontEncoding WXUNUSED_IN_UN char* buf = NULL ; CFStringEncoding cfencoding = 0; - wxString result; + wxString result; #if wxUSE_UNICODE #if wxUSE_UNICODE_WCHAR cfencoding = kCFStringEncodingUTF32Native; @@ -660,7 +660,7 @@ wxString wxCFStringRef::AsString( CFStringRef ref, wxFontEncoding WXUNUSED_IN_UN buf = new char[ cStrLen ] ; CFStringGetBytes( ref , CFRangeMake(0, cflen) , cfencoding, '?' , false , (unsigned char*) buf , cStrLen , &cStrLen) ; - + #if wxUSE_UNICODE #if wxUSE_UNICODE_WCHAR result = wxString( (const wchar_t*) buf , cStrLen/4); @@ -672,7 +672,7 @@ wxString wxCFStringRef::AsString( CFStringRef ref, wxFontEncoding WXUNUSED_IN_UN #else result = wxString(buf, cStrLen) ; #endif - + delete[] buf ; wxMacConvertNewlines10To13( &result); return result ; @@ -684,7 +684,7 @@ wxString wxCFStringRef::AsString(wxFontEncoding encoding) const } #if wxOSX_USE_COCOA_OR_IPHONE -wxString wxCFStringRef::AsString( NSString* ref, wxFontEncoding encoding ) +wxString wxCFStringRef::AsString( NSString* ref, wxFontEncoding encoding ) { return AsString( (CFStringRef) ref, encoding ); } @@ -731,11 +731,11 @@ wxMacUniCharBuffer::~wxMacUniCharBuffer() free( m_ubuf ) ; } -UniCharPtr wxMacUniCharBuffer::GetBuffer() +UniCharPtr wxMacUniCharBuffer::GetBuffer() { return m_ubuf ; } - + UniCharCount wxMacUniCharBuffer::GetChars() { return m_chars ; diff --git a/src/osx/core/colour.cpp b/src/osx/core/colour.cpp index d8746577b0..8191379762 100644 --- a/src/osx/core/colour.cpp +++ b/src/osx/core/colour.cpp @@ -78,7 +78,7 @@ void wxColour::InitRGBA (ChannelType r, ChannelType g, ChannelType b, ChannelTyp else #endif { - CGFloat components[4] = { (CGFloat)(r / 255.0), (CGFloat) (g / 255.0), (CGFloat) (b / 255.0), (CGFloat) (a / 255.0) } ; + CGFloat components[4] = { (CGFloat)(r / 255.0), (CGFloat) (g / 255.0), (CGFloat) (b / 255.0), (CGFloat) (a / 255.0) } ; col = CGColorCreate( wxMacGetGenericRGBColorSpace() , components ) ; } m_cgColour.reset( col ); @@ -94,13 +94,13 @@ void wxColour::InitRGBColor( const RGBColor& col ) 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 } ; + 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 ) ; } m_cgColour.reset( cfcol ); diff --git a/src/osx/core/dcmemory.cpp b/src/osx/core/dcmemory.cpp index a21782eaae..1debcb3c0e 100644 --- a/src/osx/core/dcmemory.cpp +++ b/src/osx/core/dcmemory.cpp @@ -78,8 +78,8 @@ 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.GetWidth(); + m_height = bitmap.GetHeight(); CGColorSpaceRef genericColorSpace = wxMacGetGenericRGBColorSpace(); CGContextRef bmCtx = (CGContextRef) m_selected.GetHBITMAP(); @@ -87,7 +87,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) { CGContextSetFillColorSpace( bmCtx, genericColorSpace ); CGContextSetStrokeColorSpace( bmCtx, genericColorSpace ); - SetGraphicsContext( wxGraphicsContext::CreateFromNative( bmCtx ) ); + SetGraphicsContext( wxGraphicsContext::CreateFromNative( bmCtx ) ); } m_ok = (m_graphicContext != NULL) ; } diff --git a/src/osx/core/glgrab.cpp b/src/osx/core/glgrab.cpp index a3ab663475..ccb2ff76ad 100644 --- a/src/osx/core/glgrab.cpp +++ b/src/osx/core/glgrab.cpp @@ -3,7 +3,7 @@ consideration of your agreement to the following terms, and your use, installation or modification of this Apple software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install or modify this Apple software. - + In consideration of your agreement to abide by the following terms, and subject to these terms, Apple grants you a personal, non-exclusive license, under Apple\xd5s copyrights in this original Apple software (the "Apple Software"), to use and modify the Apple Software, @@ -16,12 +16,12 @@ licenses, express or implied, are granted by Apple herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated. - + The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - + IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, @@ -54,20 +54,20 @@ static void swizzleBitmap(void * data, int rowBytes, int height) void * topP; void * bottomP; void * base; - - + + top = 0; bottom = height - 1; base = data; buffer = malloc(rowBytes); - - + + while ( top < bottom ) { topP = (void *)((top * rowBytes) + (intptr_t)base); bottomP = (void *)((bottom * rowBytes) + (intptr_t)base); - - + + /* * Save and swap scanlines. * @@ -78,7 +78,7 @@ static void swizzleBitmap(void * data, int rowBytes, int height) bcopy( topP, buffer, rowBytes ); bcopy( bottomP, topP, rowBytes ); bcopy( buffer, bottomP, rowBytes ); - + ++top; --bottom; } @@ -102,7 +102,7 @@ static void swizzleBitmap(void * data, int rowBytes, int height) * using CFRelease(). * Returns NULL on an error. */ - + CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) { CGContextRef bitmap; @@ -111,7 +111,7 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) long bytewidth; GLint width, height; long bytes; - + CGLContextObj glContextObj; CGLPixelFormatObj pixelFormatObj ; GLint numPixelFormats ; @@ -122,13 +122,13 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) (CGLPixelFormatAttribute) 0, /* Display mask bit goes here */ (CGLPixelFormatAttribute) 0 } ; - - + + if ( display == kCGNullDirectDisplay ) display = CGMainDisplayID(); attribs[2] = (CGLPixelFormatAttribute) CGDisplayIDToOpenGLDisplayMask(display); - - + + /* Build a full-screen GL context */ CGLChoosePixelFormat( attribs, &pixelFormatObj, &numPixelFormats ); if ( pixelFormatObj == NULL ) // No full screen context support @@ -137,23 +137,23 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) CGLDestroyPixelFormat( pixelFormatObj ) ; if ( glContextObj == NULL ) return NULL; - - + + CGLSetCurrentContext( glContextObj ) ; CGLSetFullScreen( glContextObj ) ; - - + + glReadBuffer(GL_FRONT); - - + + width = (GLint)srcRect.size.width; height = (GLint)srcRect.size.height; - - + + 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); if ( data == NULL ) @@ -165,15 +165,15 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) } bitmap = CGBitmapContextCreate(data, width, height, 8, bytewidth, wxMacGetGenericRGBColorSpace(), kCGImageAlphaNoneSkipFirst /* XRGB */); - - + + /* Read framebuffer into our bitmap */ glFinish(); /* Finish all OpenGL commands */ glPixelStorei(GL_PACK_ALIGNMENT, 4); /* Force 4-byte alignment */ glPixelStorei(GL_PACK_ROW_LENGTH, 0); glPixelStorei(GL_PACK_SKIP_ROWS, 0); glPixelStorei(GL_PACK_SKIP_PIXELS, 0); - + /* * Fetch the data in XRGB format, matching the bitmap context. */ @@ -193,21 +193,21 @@ CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect) * invert it. Pixel reformatting can also be done here. */ swizzleBitmap(data, bytewidth, height); - - + + /* Make an image out of our bitmap; does a cheap vm_copy of the bitmap */ image = CGBitmapContextCreateImage(bitmap); - + /* Get rid of bitmap */ CFRelease(bitmap); free(data); - - + + /* Get rid of GL context */ CGLSetCurrentContext( NULL ); CGLClearDrawable( glContextObj ); // disassociate from full screen CGLDestroyContext( glContextObj ); // and destroy the context - + /* Returned image has a reference count of 1 */ return image; } diff --git a/src/osx/core/hid.cpp b/src/osx/core/hid.cpp index 2a35960274..87098dfd72 100644 --- a/src/osx/core/hid.cpp +++ b/src/osx/core/hid.cpp @@ -655,7 +655,7 @@ class wxHIDModule : public wxModule { for(size_t i = 0; i < sm_keyboards.GetCount(); ++i) delete (wxHIDKeyboard*) sm_keyboards[i]; - sm_keyboards.Clear(); + sm_keyboards.Clear(); } }; diff --git a/src/osx/core/hidjoystick.cpp b/src/osx/core/hidjoystick.cpp index 5fb651f34a..d21e47cc4f 100644 --- a/src/osx/core/hidjoystick.cpp +++ b/src/osx/core/hidjoystick.cpp @@ -901,4 +901,4 @@ void* wxJoystickThread::Entry() } } -#endif // wxUSE_JOYSTICK +#endif // wxUSE_JOYSTICK diff --git a/src/osx/core/printmac.cpp b/src/osx/core/printmac.cpp index 3e14c848dc..53cf637057 100644 --- a/src/osx/core/printmac.cpp +++ b/src/osx/core/printmac.cpp @@ -89,17 +89,17 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) { papersize = data.GetPaperSize(); } - + if ( papersize != wxDefaultSize ) { papersize.x = (wxInt32) (papersize.x * mm2pt); papersize.y = (wxInt32) (papersize.y * mm2pt); - + double height, width; PMPaperGetHeight(m_macPaper, &height); PMPaperGetWidth(m_macPaper, &width); - - if ( fabs( width - papersize.x ) >= 5 || + + if ( fabs( width - papersize.x ) >= 5 || fabs( height - papersize.y ) >= 5 ) { // we have to change the current paper @@ -113,7 +113,7 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) PMPaper paper = (PMPaper) CFArrayGetValueAtIndex( paperlist, i ); PMPaperGetHeight(paper, &height); PMPaperGetWidth(paper, &width); - if ( fabs( width - papersize.x ) < 5 && + if ( fabs( width - papersize.x ) < 5 && fabs( height - papersize.y ) < 5 ) { // TODO test for duplicate hits and use additional @@ -125,7 +125,7 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) if ( bestPaper == kPMNoData ) { const PMPaperMargins margins = { 0.0, 0.0, 0.0, 0.0 }; - wxString id, name(wxT("Custom paper")); + wxString id, name(wxT("Custom paper")); id.Printf(wxT("wxPaperCustom%dx%d"), papersize.x, papersize.y); #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 @@ -135,10 +135,10 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) papersize.x, papersize.y, &margins, &paper); } #endif -#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 +#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 if ( paper == kPMNoData ) { - PMPaperCreate(printer, wxCFStringRef( id, wxFont::GetDefaultEncoding() ), wxCFStringRef( name, wxFont::GetDefaultEncoding() ), + PMPaperCreate(printer, wxCFStringRef( id, wxFont::GetDefaultEncoding() ), wxCFStringRef( name, wxFont::GetDefaultEncoding() ), papersize.x, papersize.y, &margins, &paper); } #endif @@ -159,7 +159,7 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) CFArrayRef printerList; CFIndex index, count; CFStringRef name; - + if (PMServerCreatePrinterList(kPMServerLocal, &printerList) == noErr) { count = CFArrayGetCount(printerList); @@ -180,7 +180,7 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) PMSessionSetCurrentPMPrinter(m_macPrintSession, printer); CFRelease(printerList); } - + PMSetCopies( m_macPrintSettings , data.GetNoCopies() , false ) ; PMSetCollate(m_macPrintSettings, data.GetCollate()); if ( data.IsOrientationReversed() ) @@ -189,7 +189,7 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) else PMSetOrientation( m_macPageFormat , ( data.GetOrientation() == wxLANDSCAPE ) ? kPMLandscape : kPMPortrait , false ) ; - + PMDuplexMode mode = 0 ; switch( data.GetDuplex() ) { @@ -207,15 +207,15 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) PMSetDuplex( m_macPrintSettings, mode ) ; // PMQualityMode not yet accessible via API - - + + if ( data.IsOrientationReversed() ) PMSetOrientation( m_macPageFormat , ( data.GetOrientation() == wxLANDSCAPE ) ? kPMReverseLandscape : kPMReversePortrait , false ) ; else PMSetOrientation( m_macPageFormat , ( data.GetOrientation() == wxLANDSCAPE ) ? kPMLandscape : kPMPortrait , false ) ; - + #ifndef __LP64__ // PMQualityMode not accessible via API // TODO: use our quality property to determine optimal resolution @@ -225,9 +225,9 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) PMSetResolution( m_macPageFormat, &res); #endif - // after setting the new resolution the format has to be updated, otherwise the page rect remains + // after setting the new resolution the format has to be updated, otherwise the page rect remains // at the 'old' scaling - + PMSessionValidatePageFormat(m_macPrintSession, m_macPageFormat, kPMDontWantBoolean); PMSessionValidatePrintSettings(m_macPrintSession, @@ -269,7 +269,7 @@ bool wxOSXPrintData::TransferTo( wxPrintData &data ) Boolean collate; if (PMGetCollate(m_macPrintSettings, &collate) == noErr) data.SetCollate(collate); - + CFStringRef name; PMPrinter printer ; PMSessionGetCurrentPrinter( m_macPrintSession, &printer ); @@ -281,7 +281,7 @@ bool wxOSXPrintData::TransferTo( wxPrintData &data ) CFRetain(name); data.SetPrinterName(wxCFStringRef(name).AsString()); } - + PMDuplexMode mode = 0 ; PMGetDuplex( m_macPrintSettings, &mode ) ; switch( mode ) @@ -298,7 +298,7 @@ bool wxOSXPrintData::TransferTo( wxPrintData &data ) break ; } // PMQualityMode not yet accessible via API - + double height, width; PMPaperGetHeight(m_macPaper, &height); PMPaperGetWidth(m_macPaper, &width); @@ -636,10 +636,10 @@ void wxMacPrintPreview::DetermineScaling(void) wxSize ppiScreen( 72 , 72 ) ; wxSize ppiPrinter( 72 , 72 ) ; - + // Note that with Leopard, screen dpi=72 is no longer a given m_previewPrintout->SetPPIScreen( ppiScreen.x , ppiScreen.y ) ; - + wxCoord w , h ; wxCoord ww, hh; wxRect paperRect; @@ -666,7 +666,7 @@ void wxMacPrintPreview::DetermineScaling(void) } m_pageWidth = w; m_pageHeight = h; - + m_previewPrintout->SetPageSizePixels(w , h) ; m_previewPrintout->SetPageSizeMM(ww, hh); m_previewPrintout->SetPaperRectPixels(paperRect); @@ -694,7 +694,7 @@ wxOSXCarbonPrintData::wxOSXCarbonPrintData() m_macPageFormat); PMGetPageFormatPaper(m_macPageFormat, &m_macPaper); } - + if ( PMCreatePrintSettings(&m_macPrintSettings) == noErr ) { PMSessionDefaultPrintSettings(m_macPrintSession, diff --git a/src/osx/core/stdpaths_cf.cpp b/src/osx/core/stdpaths_cf.cpp index 041b819495..8a1cee42a5 100644 --- a/src/osx/core/stdpaths_cf.cpp +++ b/src/osx/core/stdpaths_cf.cpp @@ -154,7 +154,7 @@ wxString wxStandardPathsCF::GetExecutablePath() const #else FSSpec fsSpec; #endif - + procno.highLongOfPSN = 0 ; procno.lowLongOfPSN = kCurrentProcess ; processinfo.processInfoLength = sizeof(ProcessInfoRec); @@ -164,7 +164,7 @@ wxString wxStandardPathsCF::GetExecutablePath() const #else processinfo.processAppSpec = &fsSpec; #endif - + GetProcessInformation( &procno , &processinfo ) ; #ifdef __LP64__ return wxMacFSRefToPath(&fsRef); @@ -172,7 +172,7 @@ wxString wxStandardPathsCF::GetExecutablePath() const return wxMacFSSpec2MacFilename(&fsSpec); #endif #endif - + #else return wxStandardPathsBase::GetExecutablePath(); #endif diff --git a/src/osx/core/strconv_cf.cpp b/src/osx/core/strconv_cf.cpp index 78f6429c2c..4355ee032a 100644 --- a/src/osx/core/strconv_cf.cpp +++ b/src/osx/core/strconv_cf.cpp @@ -130,11 +130,11 @@ WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_cf(wxFontEncoding encoding) else { // NOTE: Includes NULL iff source did - /* NOTE: This is an approximation. The eventual UTF-32 will + /* NOTE: This is an approximation. The eventual UTF-32 will * possibly have less elements but certainly not more. */ size_t returnSize = CFStringGetLength(theString); - + if (dstSize == 0 || dst == NULL) { return returnSize; @@ -144,13 +144,13 @@ WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_cf(wxFontEncoding encoding) // for an undersized UTF-32 destination buffer. CFRange fullStringRange = CFRangeMake(0, CFStringGetLength(theString)); UniChar *szUniCharBuffer = new UniChar[fullStringRange.length]; - + CFStringGetCharacters(theString, fullStringRange, szUniCharBuffer); - + wxMBConvUTF16 converter; returnSize = converter.ToWChar( dst, dstSize, (const char*)szUniCharBuffer, fullStringRange.length ); delete [] szUniCharBuffer; - + return returnSize; } // NOTREACHED @@ -205,7 +205,7 @@ WXDLLIMPEXP_BASE wxMBConv* new_wxMBConv_cf(wxFontEncoding encoding) CFIndex usedBufLen; CFIndex charsConverted = CFStringGetBytes( - theString, + theString, CFRangeMake(0, CFStringGetLength(theString)), m_encoding, 0, // FAIL on unconvertible characters diff --git a/src/osx/core/timer.cpp b/src/osx/core/timer.cpp index 3f55f8895c..ce0d98d598 100644 --- a/src/osx/core/timer.cpp +++ b/src/osx/core/timer.cpp @@ -69,7 +69,7 @@ bool wxOSXTimerImpl::Start( int milliseconds, bool mode ) wxCHECK_MSG( m_milli > 0, false, wxT("invalid value for timer timeout") ); wxCHECK_MSG( m_info->m_timerRef == NULL, false, wxT("attempting to restart a timer") ); - + CFGregorianUnits gumilli ; memset(&gumilli,0,sizeof(gumilli) ); gumilli.seconds = m_milli / 1000.0; @@ -81,13 +81,13 @@ bool wxOSXTimerImpl::Start( int milliseconds, bool mode ) m_info->m_timer = this; m_info->m_timerRef = CFRunLoopTimerCreate( - kCFAllocatorDefault, + kCFAllocatorDefault, CFAbsoluteTimeAddGregorianUnits( CFAbsoluteTimeGetCurrent() , NULL, gumilli ), IsOneShot() ? 0 : CFTimeInterval( m_milli / 1000.0 ) , 0, 0, wxProcessTimer, &ctx); - + wxASSERT_MSG( m_info->m_timerRef != NULL, wxT("unable to create timer")); - + CFRunLoopRef runLoop = 0; #if wxOSX_USE_IPHONE runLoop = CFRunLoopGetMain(); diff --git a/src/osx/core/utilsexc_base.cpp b/src/osx/core/utilsexc_base.cpp index fe8b87c45e..ee0a748739 100644 --- a/src/osx/core/utilsexc_base.cpp +++ b/src/osx/core/utilsexc_base.cpp @@ -64,14 +64,14 @@ extern bool WXDLLEXPORT wxIsDebuggerRunning() // have a fast version for mac code that returns the version as a return value -long UMAGetSystemVersion() -{ +long UMAGetSystemVersion() +{ static SInt32 sUMASystemVersion = 0 ; if ( sUMASystemVersion == 0 ) { verify_noerr(Gestalt(gestaltSystemVersion, &sUMASystemVersion)); } - return sUMASystemVersion ; + return sUMASystemVersion ; } // our OS version is the same in non GUI and GUI cases diff --git a/src/osx/iphone/button.mm b/src/osx/iphone/button.mm index 71a362daf6..f897fdd5da 100644 --- a/src/osx/iphone/button.mm +++ b/src/osx/iphone/button.mm @@ -31,7 +31,7 @@ wxSize wxButton::DoGetBestSize() const wxSize sz = GetDefaultSize() ; wxRect r ; - + m_peer->GetBestRect(&r); if ( r.GetWidth() == 0 && r.GetHeight() == 0 ) @@ -41,7 +41,7 @@ wxSize wxButton::DoGetBestSize() const sz.y = r.GetHeight(); int wBtn = 72; - + if ((wBtn > sz.x) || ( GetWindowStyle() & wxBU_EXACTFIT)) sz.x = wBtn; @@ -61,7 +61,7 @@ wxSize wxButton::GetDefaultSize() + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXIPhoneClassAddWXMethods( self ); @@ -80,14 +80,14 @@ wxSize wxButton::GetDefaultSize() @end -wxWidgetImplType* wxWidgetImpl::CreateButton( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID id, +wxWidgetImplType* wxWidgetImpl::CreateButton( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID id, const wxString& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), - long WXUNUSED(extraStyle)) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { CGRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; UIButtonType buttonType = UIButtonTypeRoundedRect; @@ -119,7 +119,7 @@ wxWidgetImplType* wxWidgetImpl::CreateButton( wxWindowMac* wxpeer, { // Button height is static in Mac, can't be changed, so we need to force it here int maxHeight; - switch (wxpeer->GetWindowVariant() ) + switch (wxpeer->GetWindowVariant() ) { case wxWINDOW_VARIANT_NORMAL: case wxWINDOW_VARIANT_LARGE: @@ -153,21 +153,21 @@ wxWidgetImplType* wxWidgetImpl::CreateButton( wxWindowMac* wxpeer, } void wxWidgetIPhoneImpl::SetDefaultButton( bool isDefault ) -{ +{ } -void wxWidgetIPhoneImpl::PerformClick() +void wxWidgetIPhoneImpl::PerformClick() { } -wxWidgetImplType* wxWidgetImpl::CreateDisclosureTriangle( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateDisclosureTriangle( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& label, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long WXUNUSED(style), - long WXUNUSED(extraStyle)) + long WXUNUSED(style), + long WXUNUSED(extraStyle)) { CGRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxUIButton* v = [[wxUIButton alloc] initWithFrame:r]; diff --git a/src/osx/iphone/checkbox.mm b/src/osx/iphone/checkbox.mm index efe49c6281..2fd405258e 100644 --- a/src/osx/iphone/checkbox.mm +++ b/src/osx/iphone/checkbox.mm @@ -27,7 +27,7 @@ + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXIPhoneClassAddWXMethods( self ); @@ -46,21 +46,21 @@ @end -wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer, - wxWindowMac* WXUNUSED(parent), - wxWindowID WXUNUSED(id), +wxWidgetImplType* wxWidgetImpl::CreateCheckBox( wxWindowMac* wxpeer, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxString& WXUNUSED(label), - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, - long WXUNUSED(extraStyle)) + long style, + long WXUNUSED(extraStyle)) { CGRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxUISwitch* v = [[wxUISwitch alloc] initWithFrame:r]; // if (style & wxCHK_3STATE) // [v setAllowsMixedState:YES]; - + wxWidgetIPhoneImpl* c = new wxWidgetIPhoneImpl( wxpeer, v ); return c; } diff --git a/src/osx/iphone/msgdlg.mm b/src/osx/iphone/msgdlg.mm index 4567f105b0..e7598c74a8 100644 --- a/src/osx/iphone/msgdlg.mm +++ b/src/osx/iphone/msgdlg.mm @@ -57,7 +57,7 @@ int wxMessageDialog::ShowModal() msgtitle = m_message; msgtext = m_extendedMessage; } - + wxCFStringRef cfNoString( GetNoLabel(), GetFont().GetEncoding() ); wxCFStringRef cfYesString( GetYesLabel(), GetFont().GetEncoding() ); wxCFStringRef cfOKString( GetOKLabel(), GetFont().GetEncoding() ); @@ -67,7 +67,7 @@ int wxMessageDialog::ShowModal() wxCFStringRef cfText( msgtext, GetFont().GetEncoding() ); UIAlertView* alert = [[UIAlertView alloc] initWithTitle:cfTitle.AsNSString() message:cfText.AsNSString() delegate:nil cancelButtonTitle:nil otherButtonTitles:nil]; - + int buttonId[3] = { 0, 0, 0 }; int buttonCount = 0; @@ -109,8 +109,8 @@ int wxMessageDialog::ShowModal() wxNonOwnedWindow* parentWindow = NULL; int button = -1; - - if (GetParent()) + + if (GetParent()) { parentWindow = dynamic_cast(wxGetTopLevelParent(GetParent())); } @@ -119,9 +119,9 @@ int wxMessageDialog::ShowModal() if (parentWindow) { NSWindow* nativeParent = parentWindow->GetWXWindow(); - ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; - [alert beginSheetModalForWindow: nativeParent modalDelegate: sheetDelegate - didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) + ModalDialogDelegate* sheetDelegate = [[ModalDialogDelegate alloc] init]; + [alert beginSheetModalForWindow: nativeParent modalDelegate: sheetDelegate + didEndSelector: @selector(sheetDidEnd:returnCode:contextInfo:) contextInfo: nil]; [sheetDelegate waitForSheetToFinish]; button = [sheetDelegate code]; @@ -133,6 +133,6 @@ int wxMessageDialog::ShowModal() [alert show]; } // [alert release]; - + return wxID_CANCEL; } diff --git a/src/osx/iphone/nonownedwnd.mm b/src/osx/iphone/nonownedwnd.mm index 609b4039bd..6b484a5fda 100644 --- a/src/osx/iphone/nonownedwnd.mm +++ b/src/osx/iphone/nonownedwnd.mm @@ -51,19 +51,19 @@ wxPoint wxFromNSPoint( UIView* parent, const CGPoint& p ) IMPLEMENT_DYNAMIC_CLASS( wxNonOwnedWindowIPhoneImpl , wxNonOwnedWindowImpl ) -wxNonOwnedWindowIPhoneImpl::wxNonOwnedWindowIPhoneImpl( wxNonOwnedWindow* nonownedwnd) : +wxNonOwnedWindowIPhoneImpl::wxNonOwnedWindowIPhoneImpl( wxNonOwnedWindow* nonownedwnd) : wxNonOwnedWindowImpl(nonownedwnd) { m_macWindow = NULL; m_macFullScreenData = NULL; } - -wxNonOwnedWindowIPhoneImpl::wxNonOwnedWindowIPhoneImpl() + +wxNonOwnedWindowIPhoneImpl::wxNonOwnedWindowIPhoneImpl() { m_macWindow = NULL; m_macFullScreenData = NULL; } - + wxNonOwnedWindowIPhoneImpl::~wxNonOwnedWindowIPhoneImpl() { [m_macWindow release]; @@ -78,11 +78,11 @@ void wxNonOwnedWindowIPhoneImpl::Create( wxWindow* parent, const wxPoint& pos, c long style, long extraStyle, const wxString& name ) { m_macWindow = [UIWindow alloc]; - + UIWindowLevel level = UIWindowLevelNormal; - + // most styles are not supported on the iphone - + if ( style & wxFRAME_TOOL_WINDOW ) { level = UIWindowLevelAlert; ; @@ -102,11 +102,11 @@ long style, long extraStyle, const wxString& name ) } if ( ( style & wxSTAY_ON_TOP ) ) - level = UIWindowLevelAlert; + level = UIWindowLevelAlert; CGRect r = CGRectMake( 0, 0, size.x, size.y) ; - + [m_macWindow initWithFrame:r ]; - + [m_macWindow setWindowLevel:level]; // [m_macWindow makeKeyAndOrderFront:nil]; } @@ -120,7 +120,7 @@ WXWindow wxNonOwnedWindowIPhoneImpl::GetWXWindow() const void wxNonOwnedWindowIPhoneImpl::Raise() { } - + void wxNonOwnedWindowIPhoneImpl::Lower() { } @@ -135,7 +135,7 @@ bool wxNonOwnedWindowIPhoneImpl::Show(bool show) } return true; } - + bool wxNonOwnedWindowIPhoneImpl::ShowWithEffect(bool show, wxShowEffect effect, unsigned timeout) { return Show(show); @@ -161,12 +161,12 @@ void wxNonOwnedWindowIPhoneImpl::SetExtraStyle( long exStyle ) { // no special styles supported } - + bool wxNonOwnedWindowIPhoneImpl::SetBackgroundStyle(wxBackgroundStyle style) { return true; } - + bool wxNonOwnedWindowIPhoneImpl::CanSetTransparent() { return true; @@ -200,31 +200,31 @@ void wxNonOwnedWindowIPhoneImpl::GetContentArea( int& left, int &top, int &width left = rect.origin.x; top = rect.origin.y; } - + bool wxNonOwnedWindowIPhoneImpl::SetShape(const wxRegion& region) { return false; } -void wxNonOwnedWindowIPhoneImpl::SetTitle( const wxString& title, wxFontEncoding encoding ) +void wxNonOwnedWindowIPhoneImpl::SetTitle( const wxString& title, wxFontEncoding encoding ) { // TODO change title of app ? } - + bool wxNonOwnedWindowIPhoneImpl::IsMaximized() const { return false; } - + bool wxNonOwnedWindowIPhoneImpl::IsIconized() const { return false; } - + void wxNonOwnedWindowIPhoneImpl::Iconize( bool iconize ) { } - + void wxNonOwnedWindowIPhoneImpl::Maximize(bool maximize) { } @@ -233,9 +233,9 @@ bool wxNonOwnedWindowIPhoneImpl::IsFullScreen() const { return m_macFullScreenData != NULL ; } - + bool wxNonOwnedWindowIPhoneImpl::ShowFullScreen(bool show, long style) -{ +{ return true; } diff --git a/src/osx/iphone/utils.mm b/src/osx/iphone/utils.mm index 8c780ac93d..565f345f3d 100644 --- a/src/osx/iphone/utils.mm +++ b/src/osx/iphone/utils.mm @@ -145,7 +145,7 @@ void wxClientDisplayRect(int *x, int *y, int *width, int *height) *width = r.size.width; if ( height ) *height = r.size.height; - + } void wxGetMousePosition( int* x, int* y ) @@ -163,7 +163,7 @@ int wxDisplayDepth() void wxDisplaySize(int *width, int *height) { CGRect bounds = [[UIScreen mainScreen] bounds]; - + if ( width ) *width = (int)bounds.size.width ; if ( height ) @@ -224,21 +224,21 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const // call this method when a Blit is performed with it as a source. if (!m_window) return wxNullBitmap; - + wxSize sz = m_window->GetSize(); - + int left = subrect != NULL ? subrect->x : 0 ; int top = subrect != NULL ? subrect->y : 0 ; int width = subrect != NULL ? subrect->width : sz.x; int height = subrect != NULL ? subrect->height : sz.y ; - + wxBitmap bmp = wxBitmap(width, height, 32); - + CGContextRef context = (CGContextRef)bmp.GetHBITMAP(); - + CGContextSaveGState(context); - - + + CGContextTranslateCTM( context, 0, height ); CGContextScaleCTM( context, 1, -1 ); diff --git a/src/osx/iphone/window.mm b/src/osx/iphone/window.mm index bcb8bc4365..fba3d8c8f7 100644 --- a/src/osx/iphone/window.mm +++ b/src/osx/iphone/window.mm @@ -30,7 +30,7 @@ WXWidget wxWidgetImpl::FindFocus() { /* NSResponder* responder = [keyWindow firstResponder]; - if ( [responder isKindOfClass:[NSTextView class]] && + if ( [responder isKindOfClass:[NSTextView class]] && [keyWindow fieldEditor:NO forObject:nil] != nil ) { focusedView = [(NSTextView*)responder delegate]; @@ -98,7 +98,7 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSSet* touches, UIEvent * nsEvent UITouch *touch = [touches anyObject]; // these parameters are not given for all events - UInt32 button = 0; // no secondary button + UInt32 button = 0; // no secondary button UInt32 clickCount = [touch tapCount]; UInt32 mouseChord = 0; // TODO does this exist for cocoa @@ -196,7 +196,7 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSSet* touches, UIEvent * nsEvent + (void)initialize { static BOOL initialized = NO; - if (!initialized) + if (!initialized) { initialized = YES; wxOSXIPhoneClassAddWXMethods( self ); @@ -214,13 +214,13 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSSet* touches, UIEvent * nsEvent CGContextRef context = (CGContextRef) UIGraphicsGetCurrentContext(); CGContextSaveGState( context ); // draw background - + CGContextSetFillColorWithColor( context, impl->GetWXPeer()->GetBackgroundColour().GetCGColor()); CGContextFillRect(context, rect ); impl->GetWXPeer()->MacSetCGContextRef( context ); - impl->GetWXPeer()->GetUpdateRegion() = + impl->GetWXPeer()->GetUpdateRegion() = wxRegion(rect.origin.x,rect.origin.y,rect.size.width,rect.size.height) ; wxPaintEvent event; @@ -233,25 +233,25 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSSet* touches, UIEvent * nsEvent } -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [self handleTouchEvent:touches withEvent:event]; } -- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { [self handleTouchEvent:touches withEvent:event]; } -- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { [self handleTouchEvent:touches withEvent:event]; } --(void)handleTouchEvent:(NSSet *)touches withEvent:(UIEvent *)event -{ +-(void)handleTouchEvent:(NSSet *)touches withEvent:(UIEvent *)event +{ wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( self ); - CGPoint clickLocation; + CGPoint clickLocation; UITouch *touch = [touches anyObject]; clickLocation = [touch locationInView:self]; @@ -266,12 +266,12 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSSet* touches, UIEvent * nsEvent */ -void wxOSX_touchEvent(UIView* self, SEL _cmd, NSSet* touches, UIEvent *event ) +void wxOSX_touchEvent(UIView* self, SEL _cmd, NSSet* touches, UIEvent *event ) { wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return; - + impl->touchEvent(touches, event, self, _cmd); } @@ -280,7 +280,7 @@ BOOL wxOSX_becomeFirstResponder(UIView* self, SEL _cmd) wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return NO; - + return impl->becomeFirstResponder(self, _cmd); } @@ -289,7 +289,7 @@ BOOL wxOSX_resignFirstResponder(UIView* self, SEL _cmd) wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return NO; - + return impl->resignFirstResponder(self, _cmd); } @@ -298,7 +298,7 @@ void wxOSX_drawRect(UIView* self, SEL _cmd, CGRect rect) wxWidgetIPhoneImpl* impl = (wxWidgetIPhoneImpl* ) wxWidgetImpl::FindFromWXWidget( self ); if (impl == NULL) return; - + return impl->drawRect(&rect, self, _cmd); } @@ -344,7 +344,7 @@ wxWidgetIPhoneImpl::wxWidgetIPhoneImpl( wxWindowMac* peer , WXWidget w, bool isR { } -wxWidgetIPhoneImpl::wxWidgetIPhoneImpl() +wxWidgetIPhoneImpl::wxWidgetIPhoneImpl() { } @@ -365,8 +365,8 @@ wxWidgetIPhoneImpl::~wxWidgetIPhoneImpl() } [m_osxView release]; } - -bool wxWidgetIPhoneImpl::IsVisible() const + +bool wxWidgetIPhoneImpl::IsVisible() const { // TODO reflect Superviews state return [m_osxView isHidden] == NO; @@ -381,7 +381,7 @@ void wxWidgetIPhoneImpl::Raise() { [[m_osxView superview] bringSubviewToFront:m_osxView]; } - + void wxWidgetIPhoneImpl::Lower() { [[m_osxView superview] sendSubviewToBack:m_osxView]; @@ -446,7 +446,7 @@ bool wxWidgetIPhoneImpl::HasFocus() const return [m_osxView isFirstResponder] == YES; } -bool wxWidgetIPhoneImpl::SetFocus() +bool wxWidgetIPhoneImpl::SetFocus() { // [m_osxView makeKeyWindow] ; // TODO @@ -469,7 +469,7 @@ void wxWidgetIPhoneImpl::Embed( wxWidgetImpl *parent ) void wxWidgetImpl::Convert( wxPoint *pt , wxWidgetImpl *from , wxWidgetImpl *to ) { CGPoint p = CGPointMake( pt->x , pt->y ); - p = [from->GetWXWidget() convertPoint:p toView:to->GetWXWidget() ]; + p = [from->GetWXWidget() convertPoint:p toView:to->GetWXWidget() ]; pt->x = (int)p.x; pt->y = (int)p.y; } @@ -579,7 +579,7 @@ void wxWidgetIPhoneImpl::SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) { } -void wxWidgetIPhoneImpl::SetControlSize( wxWindowVariant variant ) +void wxWidgetIPhoneImpl::SetControlSize( wxWindowVariant variant ) { } @@ -634,7 +634,7 @@ void wxWidgetIPhoneImpl::DoNotifyFocusEvent(bool receivedFocus, wxWidgetImpl* ot #endif wxLogTrace(wxT("Focus"), wxT("focus lost(%p)"), static_cast(thisWindow)); - + wxFocusEvent event( wxEVT_KILL_FOCUS, thisWindow->GetId()); event.SetEventObject(thisWindow); if (otherWindow) @@ -650,7 +650,7 @@ bool wxWidgetIPhoneImpl::becomeFirstResponder(WXWidget slf, void *_cmd) { wxOSX_FocusHandlerPtr superimpl = (wxOSX_FocusHandlerPtr) [[slf superclass] instanceMethodForSelector:(SEL)_cmd]; // get the current focus before running becomeFirstResponder - UIView* otherView = FindFocus(); + UIView* otherView = FindFocus(); wxWidgetImpl* otherWindow = FindFromWXWidget(otherView); BOOL r = superimpl(slf, (SEL)_cmd); if ( r ) @@ -665,7 +665,7 @@ bool wxWidgetIPhoneImpl::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 - UIView* otherView = FindFocus(); + UIView* otherView = FindFocus(); wxWidgetImpl* otherWindow = FindFromWXWidget(otherView); // NSTextViews have an editor as true responder, therefore the might get the // resign notification if their editor takes over, don't trigger any event hen @@ -681,13 +681,13 @@ void wxWidgetIPhoneImpl::drawRect(CGRect* rect, WXWidget slf, void *WXUNUSED(_cm CGContextRef context = (CGContextRef) UIGraphicsGetCurrentContext(); CGContextSaveGState( context ); // draw background - + CGContextSetFillColorWithColor( context, GetWXPeer()->GetBackgroundColour().GetCGColor()); CGContextFillRect(context, *rect ); GetWXPeer()->MacSetCGContextRef( context ); - GetWXPeer()->GetUpdateRegion() = + GetWXPeer()->GetUpdateRegion() = wxRegion(rect->origin.x,rect->origin.y,rect->size.width,rect->size.height) ; wxRegion updateRgn( wxFromNSRect( slf, *rect ) ); @@ -695,9 +695,9 @@ void wxWidgetIPhoneImpl::drawRect(CGRect* rect, WXWidget slf, void *WXUNUSED(_cm wxWindow* wxpeer = GetWXPeer(); wxpeer->GetUpdateRegion() = updateRgn; wxpeer->MacSetCGContextRef( context ); - + bool handled = wxpeer->MacDoRedraw( 0 ); - + CGContextRestoreGState( context ); CGContextSaveGState( context ); @@ -718,7 +718,7 @@ void wxWidgetIPhoneImpl::drawRect(CGRect* rect, WXWidget slf, void *WXUNUSED(_cm void wxWidgetIPhoneImpl::touchEvent(NSSet* touches, UIEvent *event, WXWidget slf, void *WXUNUSED(_cmd)) { - CGPoint clickLocation; + CGPoint clickLocation; UITouch *touch = [touches anyObject]; clickLocation = [touch locationInView:slf]; wxPoint pt = wxFromNSPoint( m_osxView, clickLocation ); @@ -741,12 +741,12 @@ void wxWidgetIPhoneImpl::touchUpInsideAction(void* sender, WX_UIEvent evt, WXWid // Factory methods // -wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), +wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WXUNUSED(parent), wxWindowID WXUNUSED(id), const wxPoint& pos, const wxSize& size, long WXUNUSED(style), long WXUNUSED(extraStyle)) { UIView* sv = (wxpeer->GetParent()->GetHandle() ); - + CGRect r = CGRectMake( pos.x, pos.y, size.x, size.y) ; // Rect bounds = wxMacGetBoundsForControl( wxpeer, pos , size ) ; wxUIView* v = [[wxUIView alloc] initWithFrame:r]; @@ -757,7 +757,7 @@ wxWidgetImpl* wxWidgetImpl::CreateUserPane( wxWindowMac* wxpeer, wxWindowMac* WX return c; } -wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) +wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) { UIWindow* toplevelwindow = now->GetWXWindow(); @@ -768,18 +768,18 @@ wxWidgetImpl* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) /* UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; // left orientation not yet implemented ! - if (orientation == UIInterfaceOrientationLandscapeRight ) + if (orientation == UIInterfaceOrientationLandscapeRight ) { CGAffineTransform transform = v.transform; - + // Use the status bar frame to determine the center point of the window's content area. CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame]; CGRect bounds = CGRectMake(0, 0, statusBarFrame.size.height, statusBarFrame.origin.x); CGPoint center = CGPointMake(bounds.size.height / 2.0, bounds.size.width / 2.0); - + // Set the center point of the view to the center point of the window's content area. v.center = center; - + // Rotate the view 90 degrees around its new center point. transform = CGAffineTransformRotate(transform, ( M_PI / 2.0)); v.transform = transform; diff --git a/src/osx/listbox_osx.cpp b/src/osx/listbox_osx.cpp index 43d0bdb331..25a06fd79e 100644 --- a/src/osx/listbox_osx.cpp +++ b/src/osx/listbox_osx.cpp @@ -88,7 +88,7 @@ bool wxListBox::Create( m_strings.unsorted = new wxArrayString; m_peer = wxWidgetImpl::CreateListBox( this, parent, id, pos, size, style, GetExtraStyle() ); - + MacPostControlCreate( pos, size ); m_textColumn = GetListPeer()->InsertTextColumn(0,wxEmptyString); @@ -155,7 +155,7 @@ void wxListBox::DoDeleteOneItem(unsigned int n) GetListPeer()->ListDelete( n ); m_blockEvents = false; - + UpdateOldSelections(); } @@ -164,7 +164,7 @@ void wxListBox::DoClear() m_blockEvents = true; FreeData(); m_blockEvents = false; - + UpdateOldSelections(); } @@ -178,14 +178,14 @@ void wxListBox::DoSetSelection(int n, bool select) wxT("invalid index in wxListBox::SetSelection") ); m_blockEvents = true; - + if ( n == wxNOT_FOUND ) GetListPeer()->ListDeselectAll(); else GetListPeer()->ListSetSelection( n, select, HasMultipleSelection() ); - + m_blockEvents = false; - + UpdateOldSelections(); } @@ -375,7 +375,7 @@ void wxListBox::SetString(unsigned int n, const wxString& s) void wxListBox::HandleLineEvent( unsigned int n, bool doubleClick ) { - wxCommandEvent event( doubleClick ? wxEVT_COMMAND_LISTBOX_DOUBLECLICKED : + wxCommandEvent event( doubleClick ? wxEVT_COMMAND_LISTBOX_DOUBLECLICKED : wxEVT_COMMAND_LISTBOX_SELECTED, GetId() ); event.SetEventObject( this ); if ( HasClientObjectData() ) @@ -390,7 +390,7 @@ void wxListBox::HandleLineEvent( unsigned int n, bool doubleClick ) // // common list cell value operations -// +// void wxListWidgetCellValue::Check( bool check ) { @@ -401,7 +401,7 @@ bool wxListWidgetCellValue::IsChecked() const { return GetIntValue() != 0; } - + #endif // wxUSE_LISTBOX diff --git a/src/osx/menu_osx.cpp b/src/osx/menu_osx.cpp index 3ba608e8a6..4825f18340 100644 --- a/src/osx/menu_osx.cpp +++ b/src/osx/menu_osx.cpp @@ -76,7 +76,7 @@ void wxMenu::Init() m_startRadioGroup = -1; m_allowRearrange = true; m_noEventsMode = false; - + m_peer = wxMenuImpl::Create( this, wxStripMenuCodes(m_title) ); @@ -144,7 +144,7 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos) pSubMenu->DoRearrange(); } else - { + { if ( pItem->GetId() == idMenuTitle ) pItem->GetMenu()->Enable( idMenuTitle, false ); } @@ -293,7 +293,7 @@ void wxMenu::DoRearrange() { if ( !AllowRearrange() ) return; - + wxMenuItem* previousItem = NULL ; size_t pos ; wxMenuItemList::compatibility_iterator node; @@ -564,7 +564,7 @@ void wxMenuBar::MacInstallMenuBar() { if ( s_macInstalledMenuBar == this ) return ; - + m_rootMenu->GetPeer()->MakeRoot(); // DisableMenuCommand( NULL , kHICommandPreferences ) ; #if 0 @@ -765,7 +765,7 @@ void wxMenuBar::MacInstallMenuBar() void wxMenuBar::EnableTop(size_t pos, bool enable) { wxCHECK_RET( IsAttached(), wxT("doesn't work with unattached menubars") ); - + m_rootMenu->FindItemByPosition( pos )->Enable(enable); Refresh(); @@ -847,7 +847,7 @@ bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title) return false; m_titles.Insert(title, pos); - + m_rootMenu->Insert( pos+firstMenuPos, wxMenuItem::New( m_rootMenu, wxID_ANY, title, "", wxITEM_NORMAL, menu ) ); if (m_invokingWindow) @@ -942,7 +942,7 @@ void wxMenuBar::SetInvokingWindow(wxFrame *frame) { m_invokingWindow = frame; wxMenubarSetInvokingWindow(m_appleMenu, frame); - + wxMenu *menu; wxMenuList::compatibility_iterator node = m_menus.GetFirst(); diff --git a/src/osx/menuitem_osx.cpp b/src/osx/menuitem_osx.cpp index 657e3d2447..cff6e59777 100644 --- a/src/osx/menuitem_osx.cpp +++ b/src/osx/menuitem_osx.cpp @@ -48,14 +48,14 @@ wxMenuItem::wxMenuItem(wxMenu *pParentMenu, m_radioGroup.start = -1; m_isRadioGroupStart = false; - + wxString text = wxStripMenuCodes(m_text); if (text.IsEmpty() && !IsSeparator()) { wxASSERT_MSG(wxIsStockID(GetId()), wxT("A non-stock menu item with an empty label?")); text = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR|wxSTOCK_WITH_MNEMONIC); } - + wxAcceleratorEntry *entry = wxAcceleratorEntry::Create( m_text ) ; // use accessors for ID and Kind because they might have been changed in the base constructor m_peer = wxMenuItemImpl::Create( this, pParentMenu, GetId(), text, entry, strHelp, GetKind(), pSubMenu ); @@ -83,7 +83,7 @@ void wxMenuItem::Enable(bool bDoEnable) // eg. BeginAppModalStateForWindow() will disable menus and ignore this change // which in turn causes m_isEnabled to become out of sync with real menuitem state #if wxOSX_USE_CARBON - && !(m_parentMenu && !IsMenuItemEnabled(MAC_WXHMENU(m_parentMenu->GetHMenu()), 0)) + && !(m_parentMenu && !IsMenuItemEnabled(MAC_WXHMENU(m_parentMenu->GetHMenu()), 0)) #endif ) // always update builtin menuitems @@ -176,7 +176,7 @@ void wxMenuItem::UpdateItemBitmap() { if ( !m_parentMenu ) return; - + if ( m_bitmap.Ok() ) { m_peer->SetBitmap( m_bitmap ); @@ -190,12 +190,12 @@ void wxMenuItem::UpdateItemStatus() if ( IsSeparator() ) return ; - + if ( IsCheckable() && IsChecked() ) m_peer->Check( true ); else m_peer->Check( false ); - + m_peer->Enable( IsEnabled() ); } @@ -210,7 +210,7 @@ void wxMenuItem::UpdateItemText() wxASSERT_MSG(wxIsStockID(GetId()), wxT("A non-stock menu item with an empty label?")); text = wxGetStockLabel(GetId(), wxSTOCK_WITH_ACCELERATOR|wxSTOCK_WITH_MNEMONIC); } - + wxAcceleratorEntry *entry = wxAcceleratorEntry::Create( m_text ) ; m_peer->SetLabel( text, entry ); delete entry ; diff --git a/src/osx/nonownedwnd_osx.cpp b/src/osx/nonownedwnd_osx.cpp index c2f36dd487..7b8f08cedd 100644 --- a/src/osx/nonownedwnd_osx.cpp +++ b/src/osx/nonownedwnd_osx.cpp @@ -153,11 +153,11 @@ bool wxNonOwnedWindow::Create(wxWindow *parent, wxNonOwnedWindow::~wxNonOwnedWindow() { SendDestroyEvent(); - + wxRemoveWXWindowAssociation( this ) ; - + DestroyChildren(); - + delete m_nowpeer; // avoid dangling refs @@ -171,7 +171,7 @@ wxNonOwnedWindow::~wxNonOwnedWindow() bool wxNonOwnedWindow::ShowWithEffect(wxShowEffect effect, unsigned timeout ) -{ +{ if ( !wxWindow::Show(true) ) return false; @@ -181,16 +181,16 @@ bool wxNonOwnedWindow::ShowWithEffect(wxShowEffect effect, HandleWindowEvent(event); - return m_nowpeer->ShowWithEffect(true, effect, timeout); + return m_nowpeer->ShowWithEffect(true, effect, timeout); } bool wxNonOwnedWindow::HideWithEffect(wxShowEffect effect, unsigned timeout ) -{ +{ if ( !wxWindow::Show(false) ) return false; - return m_nowpeer->ShowWithEffect(false, effect, timeout); + return m_nowpeer->ShowWithEffect(false, effect, timeout); } wxPoint wxNonOwnedWindow::GetClientAreaOrigin() const @@ -201,17 +201,17 @@ wxPoint wxNonOwnedWindow::GetClientAreaOrigin() const } bool wxNonOwnedWindow::SetBackgroundColour(const wxColour& c ) -{ +{ if ( !wxWindow::SetBackgroundColour(c) && m_hasBgCol ) return false ; - + if ( GetBackgroundStyle() != wxBG_STYLE_CUSTOM ) { if ( m_nowpeer ) return m_nowpeer->SetBackgroundColour(c); } return true; -} +} // Raise the window to the top of the Z order void wxNonOwnedWindow::Raise() @@ -306,7 +306,7 @@ bool wxNonOwnedWindow::Show(bool show) if ( m_nowpeer ) m_nowpeer->Show(show); - + if ( show ) { // because apps expect a size event to occur at this moment @@ -314,7 +314,7 @@ bool wxNonOwnedWindow::Show(bool show) event.SetEventObject(this); HandleWindowEvent(event); } - + return true ; } @@ -345,7 +345,7 @@ bool wxNonOwnedWindow::SetBackgroundStyle(wxBackgroundStyle style) { if ( !wxWindow::SetBackgroundStyle(style) ) return false ; - + return m_nowpeer ? m_nowpeer->SetBackgroundStyle(style) : true; } @@ -378,9 +378,9 @@ void wxNonOwnedWindow::DoGetSize( int *width, int *height ) const { if ( m_nowpeer == NULL ) return; - + int w,h; - + m_nowpeer->GetSize(w, h); if (width) diff --git a/src/osx/notebook_osx.cpp b/src/osx/notebook_osx.cpp index 0f3c83577e..dad2a6c5c4 100644 --- a/src/osx/notebook_osx.cpp +++ b/src/osx/notebook_osx.cpp @@ -82,7 +82,7 @@ bool wxNotebook::Create( wxWindow *parent, return false; m_peer = wxWidgetImpl::CreateTabView(this,parent, id, pos, size, style, GetExtraStyle() ); - + MacPostControlCreate( pos, size ); return true ; diff --git a/src/osx/printdlg_osx.cpp b/src/osx/printdlg_osx.cpp index 00e7bc3954..c0edeccc56 100644 --- a/src/osx/printdlg_osx.cpp +++ b/src/osx/printdlg_osx.cpp @@ -149,7 +149,7 @@ bool wxMacPageMarginsDialog::TransferToWindow() m_LeftMargin->SetFocus(); return true; } - + bool wxMacPageMarginsDialog::TransferDataFromWindow() { wxPoint topLeft, bottomRight; @@ -161,7 +161,7 @@ bool wxMacPageMarginsDialog::TransferDataFromWindow() m_pageSetupDialogData->SetMarginBottomRight(bottomRight); return true; } - + bool wxMacPageMarginsDialog::CheckValue(wxTextCtrl* textCtrl, int *value, int minValue, const wxString& name) { long lvalue; diff --git a/src/osx/radiobox_osx.cpp b/src/osx/radiobox_osx.cpp index 3b1b220205..874381292c 100644 --- a/src/osx/radiobox_osx.cpp +++ b/src/osx/radiobox_osx.cpp @@ -407,7 +407,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) wxSize bestSizeRadio ; if ( m_radioButtonCycle ) bestSizeRadio = m_radioButtonCycle->GetBestSize(); - + for (unsigned int i = 0 ; i < m_noItems; i++) { GetTextExtent(GetString(i), &eachWidth[i], &eachHeight[i] ); @@ -421,10 +421,10 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) } // according to HIG (official space - 3 Pixels Diff between Frame and Layout size) - int space = 3; + int space = 3; if ( GetWindowVariant() == wxWINDOW_VARIANT_MINI ) space = 2; - + totHeight = GetRowCount() * maxHeight + (GetRowCount() - 1) * space; totWidth = GetColumnCount() * (maxWidth + charWidth); @@ -480,7 +480,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) current = current->NextInCycle(); if (m_windowStyle & wxRA_SPECIFY_ROWS) - y_offset += maxHeight + space; + y_offset += maxHeight + space; else x_offset += maxWidth + charWidth; } @@ -519,10 +519,10 @@ wxSize wxRadioBox::DoGetBestSize() const } // according to HIG (official space - 3 Pixels Diff between Frame and Layout size) - int space = 3; + int space = 3; if ( GetWindowVariant() == wxWINDOW_VARIANT_MINI ) space = 2; - + totHeight = GetRowCount() * maxHeight + (GetRowCount() - 1) * space; totWidth = GetColumnCount() * (maxWidth + charWidth); @@ -548,7 +548,7 @@ bool wxRadioBox::SetFont(const wxFont& font) bool retval = wxWindowBase::SetFont( font ); // dont' update the native control, it has its own small font - + // should we iterate over the children ? return retval; diff --git a/src/osx/radiobut_osx.cpp b/src/osx/radiobut_osx.cpp index 65ef802052..f1bd3fa49b 100644 --- a/src/osx/radiobut_osx.cpp +++ b/src/osx/radiobut_osx.cpp @@ -160,7 +160,7 @@ wxRadioButton *wxRadioButton::AddInCycle(wxRadioButton *cycle) } void wxRadioButton::RemoveFromCycle() -{ +{ if ((m_cycle == NULL) || (m_cycle == this)) return; diff --git a/src/osx/scrolbar_osx.cpp b/src/osx/scrolbar_osx.cpp index 3a992ca618..6767de28b6 100644 --- a/src/osx/scrolbar_osx.cpp +++ b/src/osx/scrolbar_osx.cpp @@ -41,7 +41,7 @@ bool wxScrollBar::Create( wxWindow *parent, if ( !wxControl::Create( parent, id, pos, size, style, validator, name ) ) return false; - + m_peer = wxWidgetImpl::CreateScrollBar( this, parent, id, pos, size, style, GetExtraStyle() ); MacPostControlCreate( pos, size ); @@ -74,7 +74,7 @@ void wxScrollBar::SetScrollbar( int position, m_objectSize = range; int range1 = wxMax( (m_objectSize - m_viewSize), 0 ); - + m_peer->SetMaximum( range1 ); m_peer->SetScrollThumb( position, m_viewSize ); } diff --git a/src/osx/slider_osx.cpp b/src/osx/slider_osx.cpp index 512ff47894..cfa7fffc51 100644 --- a/src/osx/slider_osx.cpp +++ b/src/osx/slider_osx.cpp @@ -186,9 +186,9 @@ void wxSlider::SetRange(int minValue, int maxValue) m_macMaximumStatic->SetLabel( value ); } - // If the range is out of bounds, set it to a + // If the range is out of bounds, set it to a // value that is within bounds - // RN: Testing reveals OSX does its own + // RN: Testing reveals OSX does its own // bounding, perhaps this isn't needed? int currentValue = GetValue(); @@ -299,7 +299,7 @@ void wxSlider::TriggerScrollEvent( wxEventType scrollEvent) bool wxSlider::OSXHandleClicked( double WXUNUSED(timestampsec) ) { TriggerScrollEvent(wxEVT_SCROLL_THUMBRELEASE); - + return true; } diff --git a/src/osx/spinbutt_osx.cpp b/src/osx/spinbutt_osx.cpp index f16fe1e072..d9b99b02b0 100644 --- a/src/osx/spinbutt_osx.cpp +++ b/src/osx/spinbutt_osx.cpp @@ -40,10 +40,10 @@ bool wxSpinButton::Create( wxWindow *parent, if (!parent) return false; - + m_peer = wxWidgetImpl::CreateSpinButton( this , parent, id, 0, m_min, m_max, pos, size, style, GetExtraStyle() ); - + MacPostControlCreate( pos, size ); return true; @@ -69,9 +69,9 @@ void wxSpinButton::SetRange(int minVal, int maxVal) m_max = maxVal; m_peer->SetMaximum( maxVal ); m_peer->SetMinimum( minVal ); -} - -void wxSpinButton::SendThumbTrackEvent() +} + +void wxSpinButton::SendThumbTrackEvent() { wxSpinEvent event( wxEVT_SCROLL_THUMBTRACK, GetId() ); event.SetPosition( GetValue() ); @@ -94,7 +94,7 @@ void wxSpinButton::TriggerScrollEvent(wxEventType scrollEvent) { int inc = 0; - if ( scrollEvent == wxEVT_SCROLL_LINEUP ) + if ( scrollEvent == wxEVT_SCROLL_LINEUP ) { inc = 1; } @@ -102,9 +102,9 @@ void wxSpinButton::TriggerScrollEvent(wxEventType scrollEvent) { inc = -1; } - + // trigger scroll events - + int oldValue = GetValue() ; int newValue = oldValue + inc; diff --git a/src/osx/srchctrl_osx.cpp b/src/osx/srchctrl_osx.cpp index d264955f00..7881f00e34 100644 --- a/src/osx/srchctrl_osx.cpp +++ b/src/osx/srchctrl_osx.cpp @@ -70,7 +70,7 @@ wxSearchWidgetImpl* wxSearchCtrl::GetSearchPeer() const { return dynamic_cast (m_peer); } - + wxSearchCtrl::~wxSearchCtrl() { delete m_menu; diff --git a/src/osx/statbox_osx.cpp b/src/osx/statbox_osx.cpp index 7f4d5a8010..11ecc527bd 100644 --- a/src/osx/statbox_osx.cpp +++ b/src/osx/statbox_osx.cpp @@ -32,7 +32,7 @@ bool wxStaticBox::Create( wxWindow *parent, return false; m_labelOrig = m_label = label; - + m_peer = wxWidgetImpl::CreateGroupBox( this, parent, id, label, pos, size, style, GetExtraStyle() ); MacPostControlCreate( pos, size ); diff --git a/src/osx/stattext_osx.cpp b/src/osx/stattext_osx.cpp index 30b871a442..1ff9003570 100644 --- a/src/osx/stattext_osx.cpp +++ b/src/osx/stattext_osx.cpp @@ -57,9 +57,9 @@ void wxStaticText::SetLabel(const wxString& label) m_labelOrig = label; // middle/end ellipsization is handled by the OS: - if ( HasFlag(wxST_ELLIPSIZE_END) || HasFlag(wxST_ELLIPSIZE_MIDDLE) + if ( HasFlag(wxST_ELLIPSIZE_END) || HasFlag(wxST_ELLIPSIZE_MIDDLE) #if wxOSX_USE_COCOA // Cocoa has all three modes - || HasFlag(wxST_ELLIPSIZE_START) + || HasFlag(wxST_ELLIPSIZE_START) #endif ) { diff --git a/src/osx/textctrl_osx.cpp b/src/osx/textctrl_osx.cpp index 86de81f539..29546c39cb 100644 --- a/src/osx/textctrl_osx.cpp +++ b/src/osx/textctrl_osx.cpp @@ -134,7 +134,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxTextWidgetImpl* wxTextCtrl::GetTextPeer() const { - return dynamic_cast (m_peer); + return dynamic_cast (m_peer); } void wxTextCtrl::MacSuperChangedPosition() @@ -486,7 +486,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event) // allow navigation and deletion GetSelection( &from, &to ); if ( !IsMultiLine() && m_maxLength && GetValue().length() >= m_maxLength && - key != WXK_LEFT && key != WXK_RIGHT && key != WXK_TAB && key != WXK_UP && key != WXK_DOWN && + key != WXK_LEFT && key != WXK_RIGHT && key != WXK_TAB && key != WXK_UP && key != WXK_DOWN && key != WXK_BACK && key != WXK_DELETE && !( key == WXK_RETURN && (m_windowStyle & wxTE_PROCESS_ENTER) ) && from == to ) { diff --git a/src/osx/tglbtn_osx.cpp b/src/osx/tglbtn_osx.cpp index 64997c2d73..a6ec679141 100644 --- a/src/osx/tglbtn_osx.cpp +++ b/src/osx/tglbtn_osx.cpp @@ -24,7 +24,7 @@ #include "wx/tglbtn.h" #include "wx/osx/private.h" -#include "wx/bmpbuttn.h" // for wxDEFAULT_BUTTON_MARGIN +#include "wx/bmpbuttn.h" // for wxDEFAULT_BUTTON_MARGIN // ---------------------------------------------------------------------------- // macros @@ -48,26 +48,26 @@ bool wxToggleButton::Create(wxWindow *parent, wxWindowID id, const wxString& name) { m_macIsUserPane = FALSE ; - + if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) return false; - + m_labelOrig = m_label = label ; m_peer = wxWidgetImpl::CreateToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() ) ; MacPostControlCreate(pos,size) ; - + return TRUE; } wxSize wxToggleButton::DoGetBestSize() const { - int wBtn = 70 ; + int wBtn = 70 ; int hBtn = 20 ; int lBtn = m_label.Length() * 8 + 12 ; - if (lBtn > wBtn) + if (lBtn > wBtn) wBtn = lBtn; return wxSize ( wBtn , hBtn ) ; @@ -89,7 +89,7 @@ void wxToggleButton::Command(wxCommandEvent & event) ProcessCommand(event); } -bool wxToggleButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) +bool wxToggleButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) { wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, m_windowId); event.SetInt(GetValue()); @@ -112,19 +112,19 @@ bool wxBitmapToggleButton::Create(wxWindow *parent, wxWindowID id, const wxString& name) { m_macIsUserPane = FALSE ; - + m_bitmap = label; - + m_marginX = m_marginY = wxDEFAULT_BUTTON_MARGIN; - + if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) return false; - + m_peer = wxWidgetImpl::CreateBitmapToggleButton( this, parent, id, label, pos, size, style, GetExtraStyle() ) ; MacPostControlCreate(pos,size) ; - + return TRUE; } @@ -156,7 +156,7 @@ void wxBitmapToggleButton::Command(wxCommandEvent & event) ProcessCommand(event); } -bool wxBitmapToggleButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) +bool wxBitmapToggleButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) { wxCommandEvent event(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, m_windowId); event.SetInt(GetValue()); diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index 42c94ae660..4a4c1278a9 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -244,7 +244,7 @@ bool wxWindowMac::Create(wxWindowMac *parent, #ifndef __WXUNIVERSAL__ // Don't give scrollbars to wxControls unless they ask for them - if ( (! IsKindOf(CLASSINFO(wxControl)) + if ( (! IsKindOf(CLASSINFO(wxControl)) #if wxUSE_STATUSBAR && ! IsKindOf(CLASSINFO(wxStatusBar)) #endif @@ -898,7 +898,7 @@ wxSize wxWindowMac::DoGetBestSize() const r.width = r.height = 16 ; - if ( 0 ) + if ( 0 ) { } #if wxUSE_SCROLLBAR diff --git a/src/palmos/dcmemory.cpp b/src/palmos/dcmemory.cpp index ebe91b08fc..13bf45b0c2 100644 --- a/src/palmos/dcmemory.cpp +++ b/src/palmos/dcmemory.cpp @@ -38,23 +38,23 @@ IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl, wxPalmDCImpl) -wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) +wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner ) : wxPalmDCImpl( owner ) { - CreateCompatible(NULL); - Init(); + CreateCompatible(NULL); + Init(); } -wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ) - : wxPalmDCImpl( owner ) -{ - CreateCompatible(NULL); - Init(); +wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap ) + : wxPalmDCImpl( owner ) +{ + CreateCompatible(NULL); + Init(); DoSelect(bitmap); } wxMemoryDCImpl::wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc ) - : wxPalmDCImpl( owner ) + : wxPalmDCImpl( owner ) { wxCHECK_RET( dc, wxT("NULL dc in wxMemoryDC ctor") ); diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index c8d50cd201..c4444d6de3 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -1258,19 +1258,19 @@ bool wxSystemColourProperty::OnEvent( wxPropertyGrid* propgrid, } else if ( event.GetEventType() == wxEVT_COMMAND_COMBOBOX_SELECTED ) { - // Must override index detection since at this point GetIndex() - // will return old value. - wxOwnerDrawnComboBox* cb = - static_cast(propgrid->GetEditorControl()); - - if ( cb ) - { - int index = cb->GetSelection(); - - if ( index == GetCustomColourIndex() && - !(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) ) - askColour = true; - } + // Must override index detection since at this point GetIndex() + // will return old value. + wxOwnerDrawnComboBox* cb = + static_cast(propgrid->GetEditorControl()); + + if ( cb ) + { + int index = cb->GetSelection(); + + if ( index == GetCustomColourIndex() && + !(m_flags & wxPG_PROP_HIDE_CUSTOM_COLOUR) ) + askColour = true; + } } if ( askColour && !propgrid->WasValueChangedInEvent() ) diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index dfc6fdf817..6109df5f0d 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -71,7 +71,7 @@ #define wxPG_TEXTCTRL_AND_BUTTON_SPACING 4 #else #define wxPG_TEXTCTRL_AND_BUTTON_SPACING 2 -#endif +#endif #define wxPG_BUTTON_SIZEDEC 0 @@ -144,7 +144,7 @@ // for odcombo #ifdef __WXMAC__ #define wxPG_CHOICEXADJUST -3 // required because wxComboCtrl reserves 3pixels for wxTextCtrl's focus ring -#define wxPG_CHOICEYADJUST -3 +#define wxPG_CHOICEYADJUST -3 #else #define wxPG_CHOICEXADJUST 0 #define wxPG_CHOICEYADJUST 0 @@ -966,7 +966,7 @@ bool wxPGChoiceEditor::OnEvent( wxPropertyGrid* propGrid, wxPGProperty* property return false; } } - return wxPGChoiceEditor_SetCustomPaintWidth( propGrid, cb, cmnValIndex ); + return wxPGChoiceEditor_SetCustomPaintWidth( propGrid, cb, cmnValIndex ); } return false; } @@ -1413,7 +1413,7 @@ wxPGWindowList wxPGCheckBoxEditor::CreateControls( wxPropertyGrid* propGrid, cb->m_state |= wxSCB_STATE_CHECKED; // Makes sure wxPG_EVT_CHANGING etc. is sent for this initial - // click + // click propGrid->ChangePropertyValue(property, wxPGVariant_Bool(cb->m_state)); } @@ -1576,7 +1576,7 @@ void wxPropertyGrid::CorrectEditorWidgetPosY() if ( m_selColumn == -1 ) return; - if ( GetSelection() && (m_wndEditor || m_wndEditor2) ) + if ( GetSelection() && (m_wndEditor || m_wndEditor2) ) { wxRect r = GetEditorWidgetRect(GetSelection(), m_selColumn); @@ -1678,7 +1678,7 @@ wxWindow* wxPropertyGrid::GenerateEditorTextCtrl( const wxPoint& pos, #endif SetupTextCtrlValue(value); tc->Create(ctrlParent,id,value, p, s,tcFlags); - + // Center the control vertically if ( !hasSpecialSize ) FixPosForTextCtrl(tc); @@ -1726,7 +1726,7 @@ wxWindow* wxPropertyGrid::GenerateEditorButton( const wxPoint& pos, const wxSize p.x = pos.x + sz.x - but->GetSize().x - 2; but->Move(p); -#else +#else wxSize s(sz.y-(wxPG_BUTTON_SIZEDEC*2)+(wxPG_NAT_BUTTON_BORDER_Y*2), sz.y-(wxPG_BUTTON_SIZEDEC*2)+(wxPG_NAT_BUTTON_BORDER_Y*2)); diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 735f18fc75..158cc557ab 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -726,10 +726,10 @@ void wxPropertyGridManager::SetColumnCount( int colCount, int page ) size_t wxPropertyGridManager::GetPageCount() const { - if ( !(m_iFlags & wxPG_MAN_FL_PAGE_INSERTED) ) - return 0; + if ( !(m_iFlags & wxPG_MAN_FL_PAGE_INSERTED) ) + return 0; - return m_arrPages.size(); + return m_arrPages.size(); } // ----------------------------------------------------------------------- diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index 4f38e08d6b..afb45d3fa6 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -108,7 +108,7 @@ void wxPGCellRenderer::DrawEditorValue( wxDC& dc, const wxRect& rect, if ( editor ) { - wxRect rect2(rect); + wxRect rect2(rect); rect2.x += xOffset; rect2.y += yOffset; rect2.height -= yOffset; @@ -721,7 +721,7 @@ void wxPGProperty::GetDisplayInfo( unsigned int column, /* wxString wxPGProperty::GetColumnText( unsigned int col, int choiceIndex ) const { - + if ( col != 1 || choiceIndex == wxNOT_FOUND ) { const wxPGCell& cell = GetCell(col); @@ -827,7 +827,7 @@ void wxPGProperty::DoGenerateComposedValue( wxString& text, argFlags|wxPG_COMPOSITE_FRAGMENT); } } - + if ( childResults && curChild->GetChildCount() ) (*childResults)[curChild->GetName()] = s; @@ -2578,14 +2578,14 @@ int wxPropertyCategory::GetTextExtent( const wxWindow* wnd, const wxFont& font ) if ( m_textExtent > 0 ) return m_textExtent; int x = 0, y = 0; - ((wxWindow*)wnd)->GetTextExtent( m_label, &x, &y, 0, 0, &font ); + ((wxWindow*)wnd)->GetTextExtent( m_label, &x, &y, 0, 0, &font ); return x; } void wxPropertyCategory::CalculateTextExtent( wxWindow* wnd, const wxFont& font ) { int x = 0, y = 0; - wnd->GetTextExtent( m_label, &x, &y, 0, 0, &font ); + wnd->GetTextExtent( m_label, &x, &y, 0, 0, &font ); m_textExtent = x; } diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index bedca1688b..4f0fe08455 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -3819,7 +3819,7 @@ bool wxPropertyGrid::UnfocusEditor() void wxPropertyGrid::RefreshEditor() { wxPGProperty* p = GetSelection(); - if ( !p ) + if ( !p ) return; wxWindow* wnd = GetEditorControl(); diff --git a/src/propgrid/propgridiface.cpp b/src/propgrid/propgridiface.cpp index a1c037756d..c0e9b5e46e 100644 --- a/src/propgrid/propgridiface.cpp +++ b/src/propgrid/propgridiface.cpp @@ -102,7 +102,7 @@ void wxPropertyGridInterface::RefreshGrid( wxPropertyGridPageState* state ) wxPGProperty* wxPropertyGridInterface::Append( wxPGProperty* property ) { wxPGProperty* retp = m_pState->DoAppend(property); - + wxPropertyGrid* grid = m_pState->GetGrid(); if ( grid ) grid->RefreshGrid(); @@ -860,7 +860,7 @@ wxString wxPropertyGridInterface::SaveEditableState( int includedStates ) const if ( includedStates & ExpandedState ) { wxArrayPGProperty ptrs; - wxPropertyGridConstIterator it = + wxPropertyGridConstIterator it = wxPropertyGridConstIterator( pageState, wxPG_ITERATE_ALL_PARENTS_RECURSIVELY|wxPG_ITERATE_HIDDEN, wxNullProperty ); @@ -964,7 +964,7 @@ bool wxPropertyGridInterface::RestoreEditableState( const wxString& src, int res { if ( restoreStates & ExpandedState ) { - wxPropertyGridIterator it = + wxPropertyGridIterator it = wxPropertyGridIterator( pageState, wxPG_ITERATE_ALL, wxNullProperty ); diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 319878350b..9cb00a145a 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -1771,7 +1771,7 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete ) wxASSERT( item->GetParentState() == this ); - wxPropertyGrid* pg = GetGrid(); + wxPropertyGrid* pg = GetGrid(); if ( DoIsPropertySelected(item) ) { @@ -1853,13 +1853,13 @@ void wxPropertyGridPageState::DoDelete( wxPGProperty* item, bool doDelete ) } } - if ( item->GetBaseName().length() && + if ( item->GetBaseName().length() && (parent->IsCategory() || parent->IsRoot()) ) m_dictName.erase(item->GetBaseName()); - // We need to clear parent grid's m_propHover, if it matches item - if ( pg && pg->m_propHover == item ) - pg->m_propHover = NULL; + // We need to clear parent grid's m_propHover, if it matches item + if ( pg && pg->m_propHover == item ) + pg->m_propHover = NULL; // We can actually delete it now if ( doDelete ) diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index f0c95395fb..0fb0e23b44 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -171,8 +171,8 @@ wxString wxIntProperty::ValueToString( wxVariant& value, } else if ( value.GetType() == wxPG_VARIANT_TYPE_LONGLONG ) { - wxLongLong ll = value.GetLongLong(); - return ll.ToString(); + wxLongLong ll = value.GetLongLong(); + return ll.ToString(); } return wxEmptyString; diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 6601fa34ad..4e00843d4b 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -4800,7 +4800,7 @@ bool wxRichTextPlainText::DrawTabbedString(wxDC& dc, const wxTextAttr& attr, con dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); } - wxCoord x_orig = x; + wxCoord x_orig = x; while (hasTabs) { // the string has a tab diff --git a/src/richtext/richtextbulletspage.cpp b/src/richtext/richtextbulletspage.cpp index 34dde8e2d2..61cad9f528 100644 --- a/src/richtext/richtextbulletspage.cpp +++ b/src/richtext/richtextbulletspage.cpp @@ -361,7 +361,7 @@ bool wxRichTextBulletsPage::TransferDataFromWindow() wxRichTextBuffer::GetRenderer()->EnumerateStandardBulletNames(standardBulletNames); if (sel < (int) standardBulletNames.GetCount() && m_bulletNameCtrl->GetValue() == selName) attr->SetBulletName(standardBulletNames[sel]); - else + else attr->SetBulletName(m_bulletNameCtrl->GetValue()); } else diff --git a/src/richtext/richtexthtml.cpp b/src/richtext/richtexthtml.cpp index 0768034376..9c0d6c2035 100644 --- a/src/richtext/richtexthtml.cpp +++ b/src/richtext/richtexthtml.cpp @@ -256,7 +256,7 @@ void wxRichTextHTMLHandler::BeginParagraphFormatting(const wxTextAttr& WXUNUSED( str << wxString::Format(wxT("

"); diff --git a/src/richtext/richtextprint.cpp b/src/richtext/richtextprint.cpp index 1082eabbf1..2efffa46a5 100644 --- a/src/richtext/richtextprint.cpp +++ b/src/richtext/richtextprint.cpp @@ -54,9 +54,9 @@ void wxRichTextPrintout::OnPreparePrinting() m_pageBreaksStart.Clear(); m_pageBreaksEnd.Clear(); - + int lastStartPos = 0; - + wxRect rect, headerRect, footerRect; /// Sets the DC scaling and returns important page rectangles @@ -67,20 +67,20 @@ void wxRichTextPrintout::OnPreparePrinting() GetRichTextBuffer()->Invalidate(wxRICHTEXT_ALL); GetRichTextBuffer()->Layout(*GetDC(), rect, wxRICHTEXT_FIXED_WIDTH|wxRICHTEXT_VARIABLE_HEIGHT); - + // Now calculate the page breaks - + int yOffset = 0; - + wxRichTextLine* lastLine = NULL; - + wxRichTextObjectList::compatibility_iterator node = GetRichTextBuffer()->GetChildren().GetFirst(); while (node) { // child is a paragraph wxRichTextParagraph* child = wxDynamicCast(node->GetData(), wxRichTextParagraph); wxASSERT (child != NULL); - + wxRichTextLineList::compatibility_iterator node2 = child->GetLines().GetFirst(); while (node2) { @@ -90,34 +90,34 @@ void wxRichTextPrintout::OnPreparePrinting() line->SetPosition(wxPoint(line->GetPosition().x, line->GetPosition().y - yOffset)); int lineY = child->GetPosition().y + line->GetPosition().y; - + // Break the page if either we're going off the bottom, or this paragraph specifies // an explicit page break - + if (((lineY + line->GetSize().y) > rect.GetBottom()) || ((node2 == child->GetLines().GetFirst()) && child->GetAttributes().HasPageBreak())) { // New page starting at this line int newY = rect.y; - + // We increase the offset by the difference between new and old positions - + int increaseOffsetBy = lineY - newY; yOffset += increaseOffsetBy; - + line->SetPosition(wxPoint(line->GetPosition().x, newY - child->GetPosition().y)); if (!lastLine) lastLine = line; - + m_pageBreaksStart.Add(lastStartPos); m_pageBreaksEnd.Add(lastLine->GetAbsoluteRange().GetEnd()); - + lastStartPos = line->GetAbsoluteRange().GetStart(); - + m_numPages ++; } - + lastLine = line; node2 = node2->GetNext(); @@ -173,7 +173,7 @@ void wxRichTextPrintout::RenderPage(wxDC *dc, int page) return; wxBusyCursor wait; - + wxRect textRect, headerRect, footerRect; /// Sets the DC scaling and returns important page rectangles @@ -191,7 +191,7 @@ void wxRichTextPrintout::RenderPage(wxDC *dc, int page) dc->SetTextForeground(*wxBLACK); dc->SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT); - // Draw header, if any + // Draw header, if any wxRichTextOddEvenPage oddEven = ((page % 2) == 1) ? wxRICHTEXT_PAGE_ODD : wxRICHTEXT_PAGE_EVEN; wxString headerTextCentre = m_headerFooterData.GetHeaderText(oddEven, wxRICHTEXT_PAGE_CENTRE); @@ -204,7 +204,7 @@ void wxRichTextPrintout::RenderPage(wxDC *dc, int page) //int tx, ty; //dc->GetTextExtent(headerTextLeft, & tx, & ty); - + int x = headerRect.GetLeft(); int y = headerRect.GetX(); dc->DrawText(headerTextLeft, x, y); @@ -232,7 +232,7 @@ void wxRichTextPrintout::RenderPage(wxDC *dc, int page) dc->DrawText(headerTextRight, x, y); } - // Draw footer, if any + // Draw footer, if any wxString footerTextCentre = m_headerFooterData.GetFooterText(oddEven, wxRICHTEXT_PAGE_CENTRE); wxString footerTextLeft = m_headerFooterData.GetFooterText(oddEven, wxRICHTEXT_PAGE_LEFT); wxString footerTextRight = m_headerFooterData.GetFooterText(oddEven, wxRICHTEXT_PAGE_RIGHT); @@ -270,7 +270,7 @@ void wxRichTextPrintout::RenderPage(wxDC *dc, int page) int y = footerRect.GetBottom() - ty; dc->DrawText(footerTextRight, x, y); } - } + } wxRichTextRange rangeToDraw(m_pageBreaksStart[page-1], m_pageBreaksEnd[page-1]); @@ -304,7 +304,7 @@ void wxRichTextPrintout::CalculateScaling(wxDC* dc, wxRect& textRect, wxRect& he int w, h; dc->GetSize(&w, &h); GetPageSizePixels(&pageWidth, &pageHeight); - + // If printer pageWidth == current DC width, then this doesn't // change. But w might be the preview bitmap width, so scale down. float previewScale = (float)(w/(float)pageWidth); @@ -314,22 +314,22 @@ void wxRichTextPrintout::CalculateScaling(wxDC* dc, wxRect& textRect, wxRect& he // during printing to be correct when scaling is applied. if (!IsPreview()) m_richTextBuffer->SetScale(scale); - + // Calculate margins int marginLeft = wxRichTextObject::ConvertTenthsMMToPixels(ppiPrinterX, m_marginLeft); int marginTop = wxRichTextObject::ConvertTenthsMMToPixels(ppiPrinterX, m_marginTop); int marginRight = wxRichTextObject::ConvertTenthsMMToPixels(ppiPrinterX, m_marginRight); int marginBottom = wxRichTextObject::ConvertTenthsMMToPixels(ppiPrinterX, m_marginBottom); - + // Header and footer margins int headerMargin = wxRichTextObject::ConvertTenthsMMToPixels(ppiPrinterX, m_headerFooterData.GetHeaderMargin()); int footerMargin = wxRichTextObject::ConvertTenthsMMToPixels(ppiPrinterX, m_headerFooterData.GetFooterMargin()); - + dc->SetUserScale(overallScale, overallScale); wxRect rect((int) (marginLeft/scale), (int) (marginTop/scale), (int) ((pageWidth - marginLeft - marginRight)/scale), (int)((pageHeight - marginTop - marginBottom)/scale)); - + headerRect = wxRect(0, 0, 0, 0); if (!m_headerFooterData.GetHeaderText(wxRICHTEXT_PAGE_ODD, wxRICHTEXT_PAGE_LEFT).IsEmpty() || @@ -344,15 +344,15 @@ void wxRichTextPrintout::CalculateScaling(wxDC* dc, wxRect& textRect, wxRect& he dc->SetFont(m_headerFooterData.GetFont()); else dc->SetFont(*wxNORMAL_FONT); - + int charHeight = dc->GetCharHeight(); - + int headerHeight = (int) (charHeight + headerMargin/scale); headerRect = wxRect(rect.x, rect.y, rect.width, headerHeight); rect.y += headerHeight; - rect.height -= headerHeight; + rect.height -= headerHeight; } footerRect = wxRect(0, 0, 0, 0); @@ -369,14 +369,14 @@ void wxRichTextPrintout::CalculateScaling(wxDC* dc, wxRect& textRect, wxRect& he dc->SetFont(m_headerFooterData.GetFont()); else dc->SetFont(*wxNORMAL_FONT); - + int charHeight = dc->GetCharHeight(); - + int footerHeight = (int) (charHeight + footerMargin/scale); footerRect = wxRect(rect.x, rect.y + rect.height, rect.width, footerHeight); - rect.height -= footerHeight; + rect.height -= footerHeight; } textRect = rect; @@ -414,7 +414,7 @@ wxRichTextPrinting::wxRichTextPrinting(const wxString& name, wxWindow *parentWin m_parentWindow = parentWindow; m_title = name; m_printData = NULL; - + m_previewRect = wxRect(wxPoint(100, 100), wxSize(800, 800)); m_pageSetupData = new wxPageSetupDialogData; @@ -481,7 +481,7 @@ bool wxRichTextPrinting::PreviewFile(const wxString& richTextFile) } else SetRichTextBufferPrinting(new wxRichTextBuffer(*m_richTextBufferPreview)); - + wxRichTextPrintout *p1 = CreatePrintout(); p1->SetRichTextBuffer(m_richTextBufferPreview); @@ -497,7 +497,7 @@ bool wxRichTextPrinting::PreviewBuffer(const wxRichTextBuffer& buffer) wxRichTextPrintout *p1 = CreatePrintout(); p1->SetRichTextBuffer(m_richTextBufferPreview); - + wxRichTextPrintout *p2 = CreatePrintout(); p2->SetRichTextBuffer(m_richTextBufferPrinting); diff --git a/src/richtext/richtextstyles.cpp b/src/richtext/richtextstyles.cpp index dc39222fb1..1d05028cd8 100644 --- a/src/richtext/richtextstyles.cpp +++ b/src/richtext/richtextstyles.cpp @@ -619,7 +619,7 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons int size = 3; #endif - // Guess a standard font size + // Guess a standard font size int stdFontSize = 0; // First see if we have a default/normal style to base the size on @@ -628,22 +628,22 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons size_t i; for (i = 0; i < m_styleNames.GetCount(); i++) { - wxString name = m_styleNames[i].Lower(); - if (name.Find(wxT("normal")) != wxNOT_FOUND || name.Find(normalTranslated) != wxNOT_FOUND || - name.Find(wxT("default")) != wxNOT_FOUND || name.Find(defaultTranslated) != wxNOT_FOUND) - { - wxRichTextStyleDefinition* d = GetStyleSheet()->FindStyle(m_styleNames[i]); - if (d) - { - wxRichTextAttr attr2(d->GetStyleMergedWithBase(GetStyleSheet())); - if (attr2.HasFontSize()) - { - stdFontSize = attr2.GetFontSize(); - break; - } - } - } - } + wxString name = m_styleNames[i].Lower(); + if (name.Find(wxT("normal")) != wxNOT_FOUND || name.Find(normalTranslated) != wxNOT_FOUND || + name.Find(wxT("default")) != wxNOT_FOUND || name.Find(defaultTranslated) != wxNOT_FOUND) + { + wxRichTextStyleDefinition* d = GetStyleSheet()->FindStyle(m_styleNames[i]); + if (d) + { + wxRichTextAttr attr2(d->GetStyleMergedWithBase(GetStyleSheet())); + if (attr2.HasFontSize()) + { + stdFontSize = attr2.GetFontSize(); + break; + } + } + } + } if (stdFontSize == 0) { @@ -670,13 +670,13 @@ wxString wxRichTextStyleListBox::CreateHTML(wxRichTextStyleDefinition* def) cons { if (sizes[i] > mostCommonSize) mostCommonSize = i; - } + } if (mostCommonSize > 0) stdFontSize = mostCommonSize; } if (stdFontSize == 0) - stdFontSize = 12; + stdFontSize = 12; int thisFontSize = ((attr.GetFlags() & wxTEXT_ATTR_FONT_SIZE) != 0) ? attr.GetFontSize() : stdFontSize; diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 84b4e55790..aa47c514c4 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -187,7 +187,7 @@ wxFontFamily wxNativeFontInfo::GetFamily() const g_free(families); - // Some gtk+ systems might query for a non-existing font from + // Some gtk+ systems might query for a non-existing font from // wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT) on initialization, // don't assert until wxSystemSettings::GetFont is checked for this - MR // wxASSERT_MSG( family, "No appropriate PangoFontFamily found for ::description" ); @@ -1027,7 +1027,7 @@ wxNativeFont wxLoadQueryNearestFont(int pointSize, int i, round; // counters - // first round: search for equal, then for smaller and for larger size + // first round: search for equal, then for smaller and for larger size // with the given weight and style int testweight = weight; int teststyle = style; diff --git a/src/unix/mediactrl.cpp b/src/unix/mediactrl.cpp index 955d41fb80..0fbf87aa14 100644 --- a/src/unix/mediactrl.cpp +++ b/src/unix/mediactrl.cpp @@ -304,7 +304,7 @@ static gint gtk_window_realize_callback(GtkWidget* widget, wxGStreamerMediaBackend* be) { gdk_flush(); - + GdkWindow *window = widget->window; wxASSERT(window); @@ -709,7 +709,7 @@ void wxGStreamerMediaBackend::SetupXOverlay() else { gdk_flush(); - + GdkWindow *window = m_ctrl->m_wxwindow->window; wxASSERT(window); #endif diff --git a/src/unix/mimetype.cpp b/src/unix/mimetype.cpp index 2f79104e23..05426d667a 100644 --- a/src/unix/mimetype.cpp +++ b/src/unix/mimetype.cpp @@ -267,7 +267,7 @@ void wxMimeTypesManagerImpl::LoadXDGGlobs(const wxString& filename) ext.Remove( 0, 2 ); wxArrayString exts; exts.Add( ext ); - + AddToMimeData(mime, wxEmptyString, NULL, exts, wxEmptyString, true ); } } @@ -844,7 +844,7 @@ wxFileType * wxMimeTypesManagerImpl::GetFileTypeFromExtension(const wxString& ex // found wxFileType *fileType = new wxFileType; fileType->m_impl->Init(this, n); - + return fileType; } } diff --git a/src/unix/net.cpp b/src/unix/net.cpp index a87a2e8442..2b9d2594ac 100644 --- a/src/unix/net.cpp +++ b/src/unix/net.cpp @@ -95,7 +95,7 @@ public: /// Hang up the currently active dial up connection. virtual bool HangUp(); - + // returns TRUE if the computer is connected to the network: under Windows, // this just means that a RAS connection exists, under Unix we check that // the "well-known host" (as specified by SetWellKnownHost) is reachable @@ -145,7 +145,7 @@ public: private: /// -1: don´t know, 0 = no, 1 = yes int m_IsOnline; - + /// Can we use ifconfig to list active devices? int m_CanUseIfconfig; /// The path to ifconfig @@ -299,7 +299,7 @@ wxDialUpManagerImpl::CheckStatus(void) const 3. check /proc/net/dev on linux?? This method should be preferred, if possible. Need to do more testing. - + */ void @@ -322,13 +322,13 @@ wxDialUpManagerImpl::CheckStatusInternal(void) if(m_CanUseIfconfig != 0) // unknown or yes { wxASSERT(m_IfconfigPath.length()); - + wxString tmpfile = wxFileName::CreateTempFileName("_wxdialuptest"); wxString cmd = "/bin/sh -c \'"; cmd << m_IfconfigPath << " >" << tmpfile << '\''; /* I tried to add an option to wxExecute() to not close stdout, so we could let ifconfig write directly to the tmpfile, but - this does not work. That should be faster, as it doesn´t call + this does not work. That should be faster, as it doesn´t call the shell first. I have no idea why. :-( (KB) */ #if 0 // temporarily redirect stdout/stderr: @@ -388,22 +388,22 @@ wxDialUpManagerImpl::CheckStatusInternal(void) // This can be used under Win 9x, too! struct hostent *hp; struct sockaddr_in serv_addr; - int sockfd; + int sockfd; m_IsOnline = 0; // assume false if((hp = gethostbyname(m_BeaconHost)) == NULL) return; // no DNS no net - - serv_addr.sin_family = hp->h_addrtype; + + serv_addr.sin_family = hp->h_addrtype; memcpy(&serv_addr.sin_addr,hp->h_addr, hp->h_length); - serv_addr.sin_port = htons(m_BeaconPort); - if( ( sockfd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) - { + serv_addr.sin_port = htons(m_BeaconPort); + if( ( sockfd = socket(hp->h_addrtype, SOCK_STREAM, 0)) < 0) + { // sys_error("cannot create socket for gw"); return; } if( connect(sockfd, (struct sockaddr *) &serv_addr, sizeof(serv_addr)) < 0) - { + { //sys_error("cannot connect to server"); return; } diff --git a/src/unix/utilsunx.cpp b/src/unix/utilsunx.cpp index 7394cc50e6..18bea9bdef 100644 --- a/src/unix/utilsunx.cpp +++ b/src/unix/utilsunx.cpp @@ -880,9 +880,9 @@ wxLinuxDistributionInfo wxGetLinuxDistributionInfo() 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); diff --git a/src/x11/bitmap.cpp b/src/x11/bitmap.cpp index e528547e83..ce4fd780e3 100644 --- a/src/x11/bitmap.cpp +++ b/src/x11/bitmap.cpp @@ -295,7 +295,7 @@ bool wxBitmapRefData::Create(int width, int height, int depth) #else // !wxUSE_NANOX Window xroot = RootWindow(m_display, xscreen); - *(depth == 1 ? &m_bitmap : &m_pixmap) = + *(depth == 1 ? &m_bitmap : &m_pixmap) = XCreatePixmap(m_display, xroot, width, height, depth); #endif // wxUSE_NANOX/!wxUSE_NANOX diff --git a/src/x11/dcclient.cpp b/src/x11/dcclient.cpp index dfe17e7020..3e1db0c360 100644 --- a/src/x11/dcclient.cpp +++ b/src/x11/dcclient.cpp @@ -1291,7 +1291,7 @@ void wxWindowDCImpl::DoDrawBitmap( const wxBitmap &bitmap, // wxUSE_NANOX/!wxUSE_NANOX bool wxWindowDCImpl::DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, - wxDC *source, wxCoord xsrc, wxCoord ysrc, + wxDC *source, wxCoord xsrc, wxCoord ysrc, wxRasterOperationMode logical_func, bool useMask, wxCoord xsrcMask, wxCoord ysrcMask ) { diff --git a/src/x11/dcmemory.cpp b/src/x11/dcmemory.cpp index be343b1a3b..e8124afc84 100644 --- a/src/x11/dcmemory.cpp +++ b/src/x11/dcmemory.cpp @@ -26,14 +26,14 @@ IMPLEMENT_ABSTRACT_CLASS(wxMemoryDCImpl,wxWindowDCImpl) wxMemoryDCImpl::wxMemoryDCImpl( wxDC *owner ) : wxWindowDCImpl( owner ) -{ +{ Init(); } wxMemoryDCImpl::wxMemoryDCImpl( wxDC *owner, wxBitmap& bitmap ) : wxWindowDCImpl( owner ) -{ - Init(); +{ + Init(); DoSelect(bitmap); } diff --git a/src/x11/font.cpp b/src/x11/font.cpp index a15a76418a..49a2b7dfd5 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -326,7 +326,7 @@ void wxFontRefData::InitFromNative() } switch ( wxToupper( m_nativeFontInfo. - GetXFontComponent(wxXLFD_SLANT)[0u]).GetValue() ) + GetXFontComponent(wxXLFD_SLANT)[0u]).GetValue() ) { case wxT('I'): // italique m_style = wxFONTSTYLE_ITALIC; diff --git a/src/x11/minifram.cpp b/src/x11/minifram.cpp index 73c5310f87..e2b1df4090 100644 --- a/src/x11/minifram.cpp +++ b/src/x11/minifram.cpp @@ -6,7 +6,7 @@ // Created: 17/09/98 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" diff --git a/src/x11/pango_x.cpp b/src/x11/pango_x.cpp index 405514c43a..8836e142c1 100644 --- a/src/x11/pango_x.cpp +++ b/src/x11/pango_x.cpp @@ -1,6 +1,6 @@ /** - * This file gets included from dcclient.cpp and implements - * the X11 interface to Pango. + * This file gets included from dcclient.cpp and implements + * the X11 interface to Pango. * Copyright (C) Owen Taylor and Robert Roebling. * Licence: The wxWindows licence */ @@ -15,31 +15,31 @@ x11_draw_glyphs( Drawable drawable, int y, PangoGlyphString *glyphs, wxColour &colour ); - -void + +void x11_draw_layout_line_with_colors( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayoutLine *line, wxColour &colour ); - -void + +void x11_draw_layout_with_colors( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayout *layout, wxColour &colour ); - -void + +void x11_draw_layout( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayout *layout, wxColour &colour); - + void x11_pango_get_item_properties( PangoItem *item, PangoUnderline *uline, @@ -81,7 +81,7 @@ x11_draw_glyphs( Drawable drawable, color.color.blue = colour.Blue() << 8; color.color.alpha = 65000; pango_xft_render( draw, &color, font, glyphs, x, y ); - + XftDrawDestroy( draw ); } else @@ -91,10 +91,10 @@ x11_draw_glyphs( Drawable drawable, } } -void +void x11_draw_layout_line_with_colors( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayoutLine *line, wxColour &colour ) @@ -107,9 +107,9 @@ x11_draw_layout_line_with_colors( Drawable drawable, gint rise = 0; context = pango_layout_get_context (line->layout); - + pango_layout_line_get_extents (line,NULL, &overall_rect); - + GSList *tmp_list = line->runs; while (tmp_list) { @@ -118,16 +118,16 @@ x11_draw_layout_line_with_colors( Drawable drawable, PangoColor fg_color, bg_color; gboolean strike, fg_set, bg_set, shape_set; gint risen_y; - + tmp_list = tmp_list->next; - - x11_pango_get_item_properties (run->item, &uline, - &strike, &rise, &fg_color, &fg_set, &bg_color, &bg_set, + + x11_pango_get_item_properties (run->item, &uline, + &strike, &rise, &fg_color, &fg_set, &bg_color, &bg_set, &shape_set, &ink_rect, &logical_rect); /* we subtract the rise because X coordinates are upside down */ risen_y = y - rise / PANGO_SCALE; - + if (!shape_set) { if (uline == PANGO_UNDERLINE_NONE) @@ -148,12 +148,12 @@ x11_draw_layout_line_with_colors( Drawable drawable, { int gx = x + x_off / PANGO_SCALE; int gy = risen_y; - + x11_draw_glyphs( drawable, gc, run->item->analysis.font, gx, gy, run->glyphs, colour ); } - + if (uline == PANGO_UNDERLINE_SINGLE) - { + { XDrawLine( wxGlobalDisplay(), drawable, gc, x + (x_off + ink_rect.x) / PANGO_SCALE - 1, risen_y + 1, @@ -165,40 +165,40 @@ x11_draw_layout_line_with_colors( Drawable drawable, } } -void +void x11_draw_layout_with_colors( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayout *layout, wxColour &colour ) { PangoLayoutIter *iter = pango_layout_get_iter (layout); - + do { PangoLayoutLine *line = pango_layout_iter_get_line (iter); - + PangoRectangle logical_rect; pango_layout_iter_get_line_extents (iter, NULL, &logical_rect); - + int baseline = pango_layout_iter_get_baseline (iter); - + x11_draw_layout_line_with_colors( drawable, gc, x + logical_rect.x / PANGO_SCALE, y + baseline / PANGO_SCALE, line, colour ); - + } while (pango_layout_iter_next_line (iter)); pango_layout_iter_free (iter); } -void +void x11_draw_layout( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayout *layout, wxColour &colour) @@ -225,10 +225,10 @@ x11_pango_get_item_properties( PangoItem *item, if (strikethrough) *strikethrough = FALSE; - + if (fg_set) *fg_set = FALSE; - + if (bg_set) *bg_set = FALSE; @@ -253,21 +253,21 @@ x11_pango_get_item_properties( PangoItem *item, if (strikethrough) *strikethrough = ((PangoAttrInt *)attr)->value; break; - + case PANGO_ATTR_FOREGROUND: if (fg_color) *fg_color = ((PangoAttrColor *)attr)->color; if (fg_set) *fg_set = TRUE; - + break; - + case PANGO_ATTR_BACKGROUND: if (bg_color) *bg_color = ((PangoAttrColor *)attr)->color; if (bg_set) *bg_set = TRUE; - + break; case PANGO_ATTR_SHAPE: @@ -283,7 +283,7 @@ x11_pango_get_item_properties( PangoItem *item, if (rise) *rise = ((PangoAttrInt *)attr)->value; break; - + default: break; } diff --git a/src/x11/pangox11.cpp b/src/x11/pangox11.cpp index 3f4f0cc0c0..9b37a00c23 100644 --- a/src/x11/pangox11.cpp +++ b/src/x11/pangox11.cpp @@ -1,6 +1,6 @@ /** - * This file gets included from dcclient.cpp and implements - * the X11 interface to Pango. + * This file gets included from dcclient.cpp and implements + * the X11 interface to Pango. * Copyright (C) Owen Taylor and Robert Roebling. * Licence: The wxWindows licence */ @@ -14,32 +14,32 @@ x11_draw_glyphs( Drawable drawable, int x, int y, PangoGlyphString *glyphs); - -void + +void x11_draw_layout_line_with_colors( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayoutLine *line, XColor *foreground, XColor *background); - -void + +void x11_draw_layout_with_colors( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayout *layout, XColor *foreground, XColor *background); - -void + +void x11_draw_layout( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayout *layout); - + void x11_pango_get_item_properties( PangoItem *item, PangoUnderline *uline, @@ -73,10 +73,10 @@ x11_draw_glyphs( Drawable drawable, } } -void +void x11_draw_layout_line_with_colors( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayoutLine *line, XColor *foreground, @@ -90,9 +90,9 @@ x11_draw_layout_line_with_colors( Drawable drawable, gint rise = 0; context = pango_layout_get_context (line->layout); - + pango_layout_line_get_extents (line,NULL, &overall_rect); - + GSList *tmp_list = line->runs; while (tmp_list) { @@ -101,16 +101,16 @@ x11_draw_layout_line_with_colors( Drawable drawable, PangoColor fg_color, bg_color; gboolean strike, fg_set, bg_set, shape_set; gint risen_y; - + tmp_list = tmp_list->next; - - x11_pango_get_item_properties (run->item, &uline, - &strike, &rise, &fg_color, &fg_set, &bg_color, &bg_set, + + x11_pango_get_item_properties (run->item, &uline, + &strike, &rise, &fg_color, &fg_set, &bg_color, &bg_set, &shape_set, &ink_rect, &logical_rect); /* we subtract the rise because X coordinates are upside down */ risen_y = y - rise / PANGO_SCALE; - + if (!shape_set) { if (uline == PANGO_UNDERLINE_NONE) @@ -131,12 +131,12 @@ x11_draw_layout_line_with_colors( Drawable drawable, { int gx = x + x_off / PANGO_SCALE; int gy = risen_y; - + x11_draw_glyphs( drawable, gc, run->item->analysis.font, gx, gy, run->glyphs); } - + if (uline == PANGO_UNDERLINE_SINGLE) - { + { XDrawLine( wxGlobalDisplay(), drawable, gc, x + (x_off + ink_rect.x) / PANGO_SCALE - 1, risen_y + 1, @@ -148,42 +148,42 @@ x11_draw_layout_line_with_colors( Drawable drawable, } } -void +void x11_draw_layout_with_colors( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayout *layout, XColor *foreground, XColor *background) { PangoLayoutIter *iter = pango_layout_get_iter (layout); - + do { PangoLayoutLine *line = pango_layout_iter_get_line (iter); - + PangoRectangle logical_rect; pango_layout_iter_get_line_extents (iter, NULL, &logical_rect); - + int baseline = pango_layout_iter_get_baseline (iter); - + x11_draw_layout_line_with_colors( drawable, gc, x + logical_rect.x / PANGO_SCALE, y + baseline / PANGO_SCALE, line, foreground, background); - + } while (pango_layout_iter_next_line (iter)); pango_layout_iter_free (iter); } -void +void x11_draw_layout( Drawable drawable, GC gc, - int x, + int x, int y, PangoLayout *layout) { @@ -209,10 +209,10 @@ x11_pango_get_item_properties( PangoItem *item, if (strikethrough) *strikethrough = FALSE; - + if (fg_set) *fg_set = FALSE; - + if (bg_set) *bg_set = FALSE; @@ -237,21 +237,21 @@ x11_pango_get_item_properties( PangoItem *item, if (strikethrough) *strikethrough = ((PangoAttrInt *)attr)->value; break; - + case PANGO_ATTR_FOREGROUND: if (fg_color) *fg_color = ((PangoAttrColor *)attr)->color; if (fg_set) *fg_set = TRUE; - + break; - + case PANGO_ATTR_BACKGROUND: if (bg_color) *bg_color = ((PangoAttrColor *)attr)->color; if (bg_set) *bg_set = TRUE; - + break; case PANGO_ATTR_SHAPE: @@ -267,7 +267,7 @@ x11_pango_get_item_properties( PangoItem *item, if (rise) *rise = ((PangoAttrInt *)attr)->value; break; - + default: break; } diff --git a/src/xrc/xh_collpane.cpp b/src/xrc/xh_collpane.cpp index 06b347c227..70b50113fa 100644 --- a/src/xrc/xh_collpane.cpp +++ b/src/xrc/xh_collpane.cpp @@ -26,7 +26,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxCollapsiblePaneXmlHandler, wxXmlResourceHandler) -wxCollapsiblePaneXmlHandler::wxCollapsiblePaneXmlHandler() +wxCollapsiblePaneXmlHandler::wxCollapsiblePaneXmlHandler() : wxXmlResourceHandler(), m_isInside(false) { XRC_ADD_STYLE(wxCP_NO_TLW_RESIZE); -- 2.45.2