From ce00f59b5b169752d2f05ce3bb1a88ddc1b38b4c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 30 Sep 2010 11:44:45 +0000 Subject: [PATCH] No changes whatsoever, just remove trailing whitespace. There are no real changes in this commit but it removes all trailing white space from our source files. This avoids problems when applying patches and making diffs and it would be nice to prevent it from reappearing. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- demos/bombs/bombs1.cpp | 4 +- include/wx/button.h | 2 +- include/wx/dataview.h | 6 +- include/wx/dir.h | 6 +- include/wx/dvrenderers.h | 4 +- include/wx/generic/dataview.h | 2 +- include/wx/glcanvas.h | 2 +- include/wx/gtk/dvrenderers.h | 4 +- include/wx/gtk/private/string.h | 30 +++++----- include/wx/gtk/slider.h | 2 +- include/wx/gtk/window.h | 4 +- include/wx/object.h | 4 +- include/wx/osx/bmpbuttn.h | 2 +- include/wx/osx/button.h | 8 +-- include/wx/osx/carbon/evtloop.h | 2 +- include/wx/osx/carbon/private.h | 2 +- include/wx/osx/carbon/private/print.h | 2 +- include/wx/osx/cocoa/dataview.h | 2 +- include/wx/osx/cocoa/evtloop.h | 6 +- include/wx/osx/cocoa/private.h | 4 +- include/wx/osx/cocoa/private/textimpl.h | 20 +++---- include/wx/osx/combobox.h | 2 +- include/wx/osx/core/private.h | 52 ++++++++--------- include/wx/osx/dialog.h | 10 ++-- include/wx/osx/dirdlg.h | 4 +- include/wx/osx/evtloop.h | 26 ++++----- include/wx/osx/filedlg.h | 6 +- include/wx/osx/font.h | 2 +- include/wx/osx/iphone/chkconf.h | 2 +- include/wx/osx/iphone/private.h | 2 +- include/wx/osx/iphone/private/textimpl.h | 20 +++---- include/wx/osx/msgdlg.h | 2 +- include/wx/osx/nonownedwnd.h | 12 ++-- include/wx/osx/popupwin.h | 2 +- include/wx/osx/private/glgrab.h | 2 +- include/wx/osx/sound.h | 16 ++--- include/wx/osx/textctrl.h | 2 +- include/wx/osx/textentry.h | 6 +- include/wx/osx/toolbar.h | 6 +- include/wx/osx/toplevel.h | 6 +- include/wx/osx/window.h | 4 +- include/wx/propgrid/property.h | 2 +- include/wx/propgrid/propgrid.h | 4 +- include/wx/ribbon/art.h | 2 +- include/wx/ribbon/buttonbar.h | 2 +- include/wx/ribbon/panel.h | 2 +- include/wx/richtext/richtextbuffer.h | 12 ++-- include/wx/richtext/richtextimagedlg.h | 8 +-- include/wx/stattext.h | 4 +- include/wx/toplevel.h | 8 +-- include/wx/typeinfo.h | 2 +- include/wx/unix/evtloop.h | 2 +- samples/access/accesstest.cpp | 38 ++++++------ samples/caret/caret.cpp | 4 +- samples/console/console.cpp | 6 +- samples/dataview/dataview.cpp | 12 ++-- samples/dataview/mymodels.cpp | 2 +- samples/dialogs/dialogs.cpp | 12 ++-- samples/docview/doc.h | 2 +- samples/docview/view.cpp | 2 +- samples/dragimag/dragimag.cpp | 6 +- samples/flash/flash.cpp | 4 +- samples/font/font.cpp | 44 +++++++------- samples/help/demo.cpp | 4 +- samples/layout/expt.cpp | 6 +- samples/layout/layout.h | 8 +-- samples/listctrl/listtest.cpp | 2 +- samples/mfc/mfctest.cpp | 2 +- samples/mfc/resource.h | 2 +- samples/minimal/minimal.cpp | 4 +- samples/nativdlg/resource.h | 2 +- samples/notebook/notebook.cpp | 10 ++-- samples/opengl/cube/cube.cpp | 2 +- samples/opengl/isosurf/isosurf.cpp | 2 +- samples/propgrid/propgrid.cpp | 2 +- samples/propgrid/tests.cpp | 2 +- samples/ribbon/ribbondemo.cpp | 12 ++-- samples/sockets/baseclient.cpp | 6 +- samples/stc/edit.h | 2 +- samples/svg/svgtest.cpp | 22 +++---- samples/toolbar/toolbar.cpp | 2 +- samples/treectrl/treetest.cpp | 6 +- samples/widgets/gauge.cpp | 2 +- samples/widgets/searchctrl.cpp | 18 +++--- src/common/colourcmn.cpp | 6 +- src/common/combocmn.cpp | 6 +- src/common/ctrlcmn.cpp | 8 +-- src/common/datavcmn.cpp | 12 ++-- src/common/dcbufcmn.cpp | 2 +- src/common/dircmn.cpp | 2 +- src/common/gdicmn.cpp | 2 +- src/common/glcmn.cpp | 52 ++++++++--------- src/common/stattextcmn.cpp | 2 +- src/generic/datavgen.cpp | 10 ++-- src/generic/dirctrlg.cpp | 2 +- src/generic/splitter.cpp | 2 +- src/gtk/app.cpp | 6 +- src/gtk/bitmap.cpp | 2 +- src/gtk/choice.cpp | 2 +- src/gtk/collpane.cpp | 4 +- src/gtk/colordlg.cpp | 2 +- src/gtk/dataview.cpp | 70 +++++++++++----------- src/gtk/dnd.cpp | 20 +++---- src/gtk/stattext.cpp | 2 +- src/msw/choice.cpp | 2 +- src/msw/listctrl.cpp | 2 +- src/msw/stattext.cpp | 2 +- src/osx/button_osx.cpp | 6 +- src/osx/carbon/bmpbuttn.cpp | 4 +- src/osx/carbon/combobox.cpp | 2 +- src/osx/carbon/dcprint.cpp | 14 ++--- src/osx/carbon/dcscreen.cpp | 2 +- src/osx/carbon/dialog.cpp | 2 +- src/osx/carbon/evtloop.cpp | 6 +- src/osx/carbon/filedlg.cpp | 74 ++++++++++++------------ src/osx/carbon/font.cpp | 12 ++-- src/osx/carbon/graphics.cpp | 2 +- src/osx/carbon/listctrl_mac.cpp | 10 ++-- src/osx/carbon/msgdlg.cpp | 6 +- src/osx/carbon/popupwin.cpp | 2 +- src/osx/carbon/renderer.cpp | 6 +- src/osx/carbon/sound.cpp | 70 +++++++++++----------- src/osx/carbon/toolbar.cpp | 2 +- src/osx/carbon/window.cpp | 8 +-- src/osx/core/colour.cpp | 4 +- src/osx/core/display.cpp | 6 +- src/osx/core/evtloop_cf.cpp | 34 +++++------ src/osx/core/mimetype.cpp | 34 +++++------ src/osx/core/printmac.cpp | 38 ++++++------ src/osx/core/sound.cpp | 26 ++++----- src/osx/dialog_osx.cpp | 20 +++---- src/osx/nonownedwnd_osx.cpp | 24 ++++---- src/osx/sound_osx.cpp | 16 ++--- src/osx/textctrl_osx.cpp | 12 ++-- src/osx/textentry_osx.cpp | 2 +- src/osx/toplevel_osx.cpp | 8 +-- src/osx/utils_osx.cpp | 2 +- src/propgrid/editors.cpp | 6 +- src/propgrid/propgrid.cpp | 4 +- src/propgrid/props.cpp | 2 +- src/ribbon/art_aui.cpp | 4 +- src/ribbon/art_internal.cpp | 2 +- src/ribbon/art_msw.cpp | 30 +++++----- src/ribbon/buttonbar.cpp | 4 +- src/ribbon/panel.cpp | 4 +- src/ribbon/toolbar.cpp | 2 +- src/richtext/richtextbuffer.cpp | 44 +++++++------- src/richtext/richtextctrl.cpp | 2 +- src/richtext/richtextimagedlg.cpp | 12 ++-- src/richtext/richtextstyles.cpp | 8 +-- src/richtext/richtextxml.cpp | 6 +- src/stc/PlatWX.cpp | 2 +- src/stc/stc.cpp | 4 +- src/unix/threadpsx.cpp | 4 +- src/xrc/xh_toolb.cpp | 2 +- 155 files changed, 708 insertions(+), 708 deletions(-) diff --git a/demos/bombs/bombs1.cpp b/demos/bombs/bombs1.cpp index 19549cb882..fcb4bf4201 100644 --- a/demos/bombs/bombs1.cpp +++ b/demos/bombs/bombs1.cpp @@ -131,7 +131,7 @@ void BombsCanvas::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2) dc->SetBrush(*focusedBrush); else if (m_game->IsSelected(x,y)) dc->SetBrush(*wxWHITE_BRUSH); - else + else dc->SetBrush(*yellowBrush); dc->DrawRectangle( x*m_cellWidth*X_UNIT, y*m_cellHeight*Y_UNIT, m_cellWidth*X_UNIT+1, m_cellHeight*Y_UNIT+1); @@ -163,7 +163,7 @@ void BombsCanvas::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2) wxString msg; msg.Printf(wxT("%d bombs, %u marked, %d remaining cells"), - m_game->GetNumBombs(), m_game->GetNumMarkedCells(), + m_game->GetNumBombs(), m_game->GetNumMarkedCells(), m_game->GetNumRemainingCells() ); #if wxUSE_LOG && wxUSE_STATUSBAR diff --git a/include/wx/button.h b/include/wx/button.h index 49613d09db..0e987d1eda 100644 --- a/include/wx/button.h +++ b/include/wx/button.h @@ -110,7 +110,7 @@ public: void SetBitmapMargins(wxCoord x, wxCoord y) { DoSetBitmapMargins(x, y); } void SetBitmapMargins(const wxSize& sz) { DoSetBitmapMargins(sz.x, sz.y); } wxSize GetBitmapMargins() { return DoGetBitmapMargins(); } - + // set the image position relative to the text, i.e. wxLEFT means that the // image is to the left of the text (this is the default) void SetBitmapPosition(wxDirection dir); diff --git a/include/wx/dataview.h b/include/wx/dataview.h index 173039c072..cf597a881b 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -125,7 +125,7 @@ public: virtual bool ItemsChanged( const wxDataViewItemArray &items ); virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col ) = 0; virtual bool Cleared() = 0; - + // some platforms, such as GTK+, may need a two step procedure for ::Reset() virtual bool BeforeReset() { return true; } virtual bool AfterReset() { return Cleared(); } @@ -305,7 +305,7 @@ public: // helper methods provided by list models only virtual unsigned GetRow( const wxDataViewItem &item ) const = 0; - // returns the number of rows + // returns the number of rows virtual unsigned int GetCount() const = 0; // implement some base class pure virtual directly @@ -1151,7 +1151,7 @@ public: wxDataViewItem GetNthChild( const wxDataViewItem& parent, unsigned int pos ) const; int GetChildCount( const wxDataViewItem& parent ) const; - + void SetItemText( const wxDataViewItem& item, const wxString &text ); wxString GetItemText( const wxDataViewItem& item ) const; void SetItemIcon( const wxDataViewItem& item, const wxIcon &icon ); diff --git a/include/wx/dir.h b/include/wx/dir.h index 4ac1dffbf5..94c5d453c0 100644 --- a/include/wx/dir.h +++ b/include/wx/dir.h @@ -105,7 +105,7 @@ public: // get the full name of the directory (without '/' at the end) wxString GetName() const; - + // file enumeration routines // ------------------------- @@ -155,7 +155,7 @@ public: // static utilities for directory management // (alias to wxFileName's functions for dirs) // ----------------------------------------- - + // test for existence of a directory with the given name static bool Exists(const wxString& dir); @@ -163,7 +163,7 @@ public: int flags = 0); static bool Remove(const wxString &dir, int flags = 0); - + private: friend class wxDirData; diff --git a/include/wx/dvrenderers.h b/include/wx/dvrenderers.h index 5b0ef20910..248e4af121 100644 --- a/include/wx/dvrenderers.h +++ b/include/wx/dvrenderers.h @@ -351,10 +351,10 @@ public: wxDataViewChoiceByIndexRenderer( const wxArrayString &choices, wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, int alignment = wxDVR_DEFAULT_ALIGNMENT ); - + virtual wxControl* CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ); virtual bool GetValueFromEditorCtrl( wxControl* editor, wxVariant &value ); - + virtual bool SetValue( const wxVariant &value ); virtual bool GetValue( wxVariant &value ) const; }; diff --git a/include/wx/generic/dataview.h b/include/wx/generic/dataview.h index a0e1cf369c..f06776ea0b 100644 --- a/include/wx/generic/dataview.h +++ b/include/wx/generic/dataview.h @@ -79,7 +79,7 @@ public: private: // common part of all ctors void Init(int width, wxAlignment align, int flags); - + void UpdateDisplay(); wxString m_title; diff --git a/include/wx/glcanvas.h b/include/wx/glcanvas.h index 7c325642fc..03db44017e 100644 --- a/include/wx/glcanvas.h +++ b/include/wx/glcanvas.h @@ -229,7 +229,7 @@ public: wxGLAPI(); ~wxGLAPI(); - static void glFrustum(GLfloat left, GLfloat right, GLfloat bottom, + static void glFrustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar); static void glBegin(GLenum mode); static void glTexCoord2f(GLfloat s, GLfloat t); diff --git a/include/wx/gtk/dvrenderers.h b/include/wx/gtk/dvrenderers.h index 2d51e6bd33..6bcda85b83 100644 --- a/include/wx/gtk/dvrenderers.h +++ b/include/wx/gtk/dvrenderers.h @@ -286,10 +286,10 @@ public: wxDataViewChoiceByIndexRenderer( const wxArrayString &choices, wxDataViewCellMode mode = wxDATAVIEW_CELL_EDITABLE, int alignment = wxDVR_DEFAULT_ALIGNMENT ); - + virtual bool SetValue( const wxVariant &value ); virtual bool GetValue( wxVariant &value ) const; - + private: virtual void GtkOnTextEdited(const gchar *itempath, const wxString& str); }; diff --git a/include/wx/gtk/private/string.h b/include/wx/gtk/private/string.h index c9662bcebd..9d13bf9fca 100644 --- a/include/wx/gtk/private/string.h +++ b/include/wx/gtk/private/string.h @@ -48,10 +48,10 @@ public: m_label = label; m_key = key; } - + ~wxGtkCollatableString() { - if (m_key) + if (m_key) g_free( m_key ); } @@ -63,22 +63,22 @@ class wxGtkCollatedArrayString { public: wxGtkCollatedArrayString() { } - + int Add( const wxString &new_label ) { int index = 0; - - gchar *new_key_lower = g_utf8_casefold( new_label.utf8_str(), -1); - gchar *new_key = g_utf8_collate_key( new_key_lower, -1); + + gchar *new_key_lower = g_utf8_casefold( new_label.utf8_str(), -1); + gchar *new_key = g_utf8_collate_key( new_key_lower, -1); g_free( new_key_lower ); - + wxSharedPtr new_ptr( new wxGtkCollatableString( new_label, new_key ) ); - + wxVector< wxSharedPtr >::iterator iter; for (iter = m_list.begin(); iter != m_list.end(); ++iter) { wxSharedPtr ptr = *iter; - + gchar *key = ptr->m_key; if (strcmp(key,new_key) >= 0) { @@ -87,31 +87,31 @@ public: } index ++; } - + m_list.push_back( new_ptr ); return index; } - + size_t GetCount() { return m_list.size(); } - + wxString At( size_t index ) { return m_list[index]->m_label; } - + void Clear() { m_list.clear(); } - + void RemoveAt( size_t index ) { m_list.erase( m_list.begin() + index ); } - + private: wxVector< wxSharedPtr > m_list; }; diff --git a/include/wx/gtk/slider.h b/include/wx/gtk/slider.h index abf460085d..50e9df086c 100644 --- a/include/wx/gtk/slider.h +++ b/include/wx/gtk/slider.h @@ -63,7 +63,7 @@ public: void GTKDisableEvents(); void GTKEnableEvents(); bool GTKEventsDisabled() const; - + double m_pos; int m_scrollEventType; bool m_needThumbRelease; diff --git a/include/wx/gtk/window.h b/include/wx/gtk/window.h index c7205d381b..d794b8c1c1 100644 --- a/include/wx/gtk/window.h +++ b/include/wx/gtk/window.h @@ -242,10 +242,10 @@ public: // see the docs in src/gtk/window.cpp GtkWidget *m_widget; // mostly the widget seen by the rest of GTK GtkWidget *m_wxwindow; // mostly the client area as per wxWidgets - + // label for use with GetLabelSetLabel wxString m_gtkLabel; - + // return true if the window is of a standard (i.e. not wxWidgets') class bool IsOfStandardClass() const { return m_wxwindow == NULL; } diff --git a/include/wx/object.h b/include/wx/object.h index 23b34bf334..80fbae4d2b 100644 --- a/include/wx/object.h +++ b/include/wx/object.h @@ -131,7 +131,7 @@ public: } wxDECLARE_CLASS_INFO_ITERATORS(); - + private: const wxChar *m_className; int m_objectSize; @@ -233,7 +233,7 @@ WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxString& name); #define wxIMPLEMENT_CLASS(name, basename) \ wxIMPLEMENT_ABSTRACT_CLASS(name, basename) - + #define wxIMPLEMENT_CLASS2(name, basename1, basename2) \ IMPLEMENT_ABSTRACT_CLASS2(name, basename1, basename2) diff --git a/include/wx/osx/bmpbuttn.h b/include/wx/osx/bmpbuttn.h index c6edbf4e6b..daf6081fbc 100644 --- a/include/wx/osx/bmpbuttn.h +++ b/include/wx/osx/bmpbuttn.h @@ -40,7 +40,7 @@ public: const wxString& name = wxButtonNameStr); protected: - + virtual wxSize DoGetBestSize() const; DECLARE_DYNAMIC_CLASS(wxBitmapButton) diff --git a/include/wx/osx/button.h b/include/wx/osx/button.h index 5b189fc940..987c8e9792 100644 --- a/include/wx/osx/button.h +++ b/include/wx/osx/button.h @@ -56,7 +56,7 @@ protected: void OnEnterWindow( wxMouseEvent& event); void OnLeaveWindow( wxMouseEvent& event); - + virtual wxBitmap DoGetBitmap(State which) const; virtual void DoSetBitmap(const wxBitmap& bitmap, State which); virtual void DoSetBitmapPosition(wxDirection dir); @@ -67,7 +67,7 @@ protected: m_marginY = y; InvalidateBestSize(); } - + // the margins around the bitmap int m_marginX; int m_marginY; @@ -75,8 +75,8 @@ protected: // the bitmaps for the different state of the buttons, all of them may be // invalid and the button only shows a bitmap at all if State_Normal bitmap // is valid - wxBitmap m_bitmaps[State_Max]; - + wxBitmap m_bitmaps[State_Max]; + DECLARE_DYNAMIC_CLASS(wxButton) DECLARE_EVENT_TABLE() }; diff --git a/include/wx/osx/carbon/evtloop.h b/include/wx/osx/carbon/evtloop.h index c5393d8b8c..9db46aa1da 100644 --- a/include/wx/osx/carbon/evtloop.h +++ b/include/wx/osx/carbon/evtloop.h @@ -24,7 +24,7 @@ protected: virtual int DoDispatchTimeout(unsigned long timeout); virtual void DoRun(); - + virtual void DoStop(); virtual CFRunLoopRef CFGetCurrentRunLoop() const; diff --git a/include/wx/osx/carbon/private.h b/include/wx/osx/carbon/private.h index 647db702c7..c7f533cbbc 100644 --- a/include/wx/osx/carbon/private.h +++ b/include/wx/osx/carbon/private.h @@ -1044,7 +1044,7 @@ public : virtual bool IsFullScreen() const; virtual bool ShowFullScreen(bool show, long style); - + virtual void ShowWithoutActivating(); virtual void RequestUserAttention(int flags); diff --git a/include/wx/osx/carbon/private/print.h b/include/wx/osx/carbon/private/print.h index 13e86c0e1c..5ac11476be 100644 --- a/include/wx/osx/carbon/private/print.h +++ b/include/wx/osx/carbon/private/print.h @@ -47,7 +47,7 @@ protected : virtual void TransferPaperInfoTo( wxPrintData &data ); virtual void TransferResolutionTo( wxPrintData &data ); - + virtual void UpdateFromPMState(); virtual void UpdateToPMState(); diff --git a/include/wx/osx/cocoa/dataview.h b/include/wx/osx/cocoa/dataview.h index 6e97eb87ed..f34720bb77 100644 --- a/include/wx/osx/cocoa/dataview.h +++ b/include/wx/osx/cocoa/dataview.h @@ -281,7 +281,7 @@ private: ofItem:(id)item; -(id) - outlineView:(NSOutlineView*)outlineView + outlineView:(NSOutlineView*)outlineView objectValueForTableColumn:(NSTableColumn*)tableColumn byItem:(id)item; diff --git a/include/wx/osx/cocoa/evtloop.h b/include/wx/osx/cocoa/evtloop.h index ed64e651eb..afccc7a92d 100644 --- a/include/wx/osx/cocoa/evtloop.h +++ b/include/wx/osx/cocoa/evtloop.h @@ -15,14 +15,14 @@ class WXDLLIMPEXP_BASE wxGUIEventLoop : public wxCFEventLoop { public: wxGUIEventLoop(); - + protected: virtual int DoDispatchTimeout(unsigned long timeout); - + virtual void DoRun(); virtual void DoStop(); - + virtual CFRunLoopRef CFGetCurrentRunLoop() const; }; diff --git a/include/wx/osx/cocoa/private.h b/include/wx/osx/cocoa/private.h index 3381cbddb8..5381ba3b07 100644 --- a/include/wx/osx/cocoa/private.h +++ b/include/wx/osx/cocoa/private.h @@ -181,7 +181,7 @@ public : virtual void controlAction(WXWidget slf, void* _cmd, void* sender); virtual void controlDoubleAction(WXWidget slf, void* _cmd, void *sender); - + // for wxTextCtrl-derived classes, put here since they don't all derive // from the same pimpl class. virtual void controlTextDidChange(); @@ -259,7 +259,7 @@ public : virtual void WindowToScreen( int *x, int *y ); virtual bool IsActive(); - + virtual void SetModified(bool modified); virtual bool IsModified() const; diff --git a/include/wx/osx/cocoa/private/textimpl.h b/include/wx/osx/cocoa/private/textimpl.h index e0284e661a..7a800e33b5 100644 --- a/include/wx/osx/cocoa/private/textimpl.h +++ b/include/wx/osx/cocoa/private/textimpl.h @@ -69,14 +69,14 @@ public: virtual void SetSelection( long from , long to ); virtual void WriteText(const wxString& str) ; virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); - + virtual bool GetStyle(long position, wxTextAttr& style); virtual void SetStyle(long start, long end, const wxTextAttr& style); - + virtual bool CanFocus() const; - + virtual bool HasOwnContextMenu() const { return true; } - + virtual void CheckSpelling(bool check); virtual wxSize GetBestSize() const; @@ -90,19 +90,19 @@ class wxNSComboBoxControl : public wxNSTextFieldControl, public wxComboWidgetImp public : wxNSComboBoxControl( wxComboBox *wxPeer, WXWidget w ); virtual ~wxNSComboBoxControl(); - + virtual int GetSelectedItem() const; virtual void SetSelectedItem(int item); - + virtual int GetNumberOfItems() const; - + virtual void InsertItem(int pos, const wxString& item); virtual void RemoveItem(int pos); - + virtual void Clear(); - + virtual wxString GetStringAtIndex(int pos) const; - + virtual int FindString(const wxString& text) const; private: NSComboBox* m_comboBox; diff --git a/include/wx/osx/combobox.h b/include/wx/osx/combobox.h index ca2d448cd6..487f9a6c67 100644 --- a/include/wx/osx/combobox.h +++ b/include/wx/osx/combobox.h @@ -100,7 +100,7 @@ class WXDLLIMPEXP_CORE wxComboBox : public wxControl, public wxComboBoxBase virtual void SetString(unsigned int n, const wxString& s); virtual unsigned int GetCount() const; - + // these methods are provided by wxTextEntry for the native impl. #if wxOSX_USE_CARBON // Text field functions diff --git a/include/wx/osx/core/private.h b/include/wx/osx/core/private.h index 7484906d58..d423355b2e 100644 --- a/include/wx/osx/core/private.h +++ b/include/wx/osx/core/private.h @@ -270,7 +270,7 @@ public : virtual void SetScrollThumb( wxInt32 value, wxInt32 thumbSize ) = 0; virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ) = 0; - + virtual void SetToolTip(wxToolTip* WXUNUSED(tooltip)) { } // is the clicked event sent AFTER the state already changed, so no additional @@ -278,7 +278,7 @@ public : virtual bool ButtonClickDidStateChange() = 0; virtual void InstallEventHandler( WXWidget control = NULL ) = 0; - + // Mechanism used to keep track of whether a change should send an event // Do SendEvents(false) when starting actions that would trigger programmatic events // and SendEvents(true) at the end of the block. @@ -481,13 +481,13 @@ public : long extraStyle); #if wxOSX_USE_COCOA - static wxWidgetImplType* CreateComboBox( wxComboBox* wxpeer, - wxWindowMac* parent, - wxWindowID id, + static wxWidgetImplType* CreateComboBox( wxComboBox* wxpeer, + wxWindowMac* parent, + wxWindowID id, wxMenu* menu, - const wxPoint& pos, + const wxPoint& pos, const wxSize& size, - long style, + long style, long extraStyle); #endif @@ -564,7 +564,7 @@ public: // accessing content virtual unsigned int ListGetCount() const = 0; - + virtual int DoListHitTest( const wxPoint& inpoint ) const = 0; }; @@ -628,7 +628,7 @@ public : virtual int GetLineLength(long lineNo) const ; virtual wxString GetLineText(long lineNo) const ; virtual void CheckSpelling(bool WXUNUSED(check)) { } - + virtual wxSize GetBestSize() const { return wxDefaultSize; } private: @@ -645,20 +645,20 @@ public : wxComboWidgetImpl() {} virtual ~wxComboWidgetImpl() {} - + virtual int GetSelectedItem() const { return -1; }; virtual void SetSelectedItem(int WXUNUSED(item)) {}; - + virtual int GetNumberOfItems() const { return -1; }; - + virtual void InsertItem(int WXUNUSED(pos), const wxString& WXUNUSED(item)) {} - + virtual void RemoveItem(int WXUNUSED(pos)) {} - + virtual void Clear() {} - + virtual wxString GetStringAtIndex(int WXUNUSED(pos)) const { return wxEmptyString; } - + virtual int FindString(const wxString& WXUNUSED(text)) const { return -1; } }; @@ -671,7 +671,7 @@ class wxButtonImpl public : wxButtonImpl(){} virtual ~wxButtonImpl(){} - + virtual void SetPressedBitmap( const wxBitmap& bitmap ) = 0; } ; @@ -759,11 +759,11 @@ public : virtual void SetExtraStyle( long WXUNUSED(exStyle) ) { } - + virtual void SetWindowStyleFlag( long WXUNUSED(style) ) { } - + virtual bool SetBackgroundStyle(wxBackgroundStyle WXUNUSED(style)) { return false ; @@ -797,7 +797,7 @@ public : virtual bool IsFullScreen() const= 0; virtual void ShowWithoutActivating() { Show(true); } - + virtual bool ShowFullScreen(bool show, long style)= 0; virtual void RequestUserAttention(int flags) = 0; @@ -807,23 +807,23 @@ public : virtual void WindowToScreen( int *x, int *y ) = 0; virtual bool IsActive() = 0; - + wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } static wxNonOwnedWindowImpl* FindFromWXWindow(WXWindow window); - + static void RemoveAssociations( wxNonOwnedWindowImpl* impl); - + static void Associate( WXWindow window, wxNonOwnedWindowImpl *impl ); - + // static creation methods, must be implemented by all toolkits static wxNonOwnedWindowImpl* CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, WXWindow native) ; - + static wxNonOwnedWindowImpl* CreateNonOwnedWindow( wxNonOwnedWindow* wxpeer, wxWindow* parent, const wxPoint& pos, const wxSize& size, long style, long extraStyle, const wxString& name ) ; - + virtual void SetModified(bool WXUNUSED(modified)) { } virtual bool IsModified() const { return false; } diff --git a/include/wx/osx/dialog.h b/include/wx/osx/dialog.h index 9442b94373..dc82d7cc6d 100644 --- a/include/wx/osx/dialog.h +++ b/include/wx/osx/dialog.h @@ -56,12 +56,12 @@ public: // show the dialog modally and return the value passed to EndModal() virtual int ShowModal(); - + virtual void ShowWindowModal(); // may be called to terminate the dialog with the given return code virtual void EndModal(int retCode); - + static bool OSXHasModalDialogsOpen(); static void OSXBeginModalDialog(); static void OSXEndModalDialog(); @@ -70,13 +70,13 @@ public: // -------------- wxDialogModality GetModality() const; - + #if wxOSX_USE_COCOA virtual void ModalFinishedCallback(void* WXUNUSED(panel), int WXUNUSED(returnCode)) {} #endif protected: - // show window modal dialog + // show window modal dialog void DoShowWindowModal(); // end window modal dialog. @@ -87,7 +87,7 @@ protected: wxDialogModality m_modality; - + wxModalEventLoop* m_eventLoop; private: diff --git a/include/wx/osx/dirdlg.h b/include/wx/osx/dirdlg.h index 5cb641617a..e88f4bfb4d 100644 --- a/include/wx/osx/dirdlg.h +++ b/include/wx/osx/dirdlg.h @@ -24,11 +24,11 @@ public: const wxString& name = wxDirDialogNameStr); virtual int ShowModal(); - + #if wxOSX_USE_COCOA virtual void ShowWindowModal(); virtual void ModalFinishedCallback(void* panel, int returnCode); -#endif +#endif protected: diff --git a/include/wx/osx/evtloop.h b/include/wx/osx/evtloop.h index 35768078ad..4e45db718c 100644 --- a/include/wx/osx/evtloop.h +++ b/include/wx/osx/evtloop.h @@ -26,17 +26,17 @@ public: // enters a loop calling OnNextIteration(), Pending() and Dispatch() and // terminating when Exit() is called virtual int Run(); - + // sets the "should exit" flag and wakes up the loop so that it terminates // soon virtual void Exit(int rc = 0); - + // return true if any events are available virtual bool Pending() const; - + // dispatch a single event, return false if we should exit from the loop virtual bool Dispatch(); - + // same as Dispatch() but doesn't wait for longer than the specified (in // ms) timeout, return true if an event was processed, false if we should // exit the loop or -1 if timeout expired @@ -45,7 +45,7 @@ public: // implement this to wake up the loop: usually done by posting a dummy event // to it (can be called from non main thread) virtual void WakeUp(); - + virtual bool YieldFor(long eventsToProcess); #if wxUSE_EVENTLOOP_SOURCE @@ -60,23 +60,23 @@ protected: virtual CFRunLoopRef CFGetCurrentRunLoop() const; virtual int DoDispatchTimeout(unsigned long timeout); - + virtual void DoRun(); virtual void DoStop(); - + // should we exit the loop? bool m_shouldExit; // the loop exit code int m_exitcode; - + // cfrunloop CFRunLoopRef m_runLoop; - + // runloop observer CFRunLoopObserverRef m_runLoopObserver; - + private: // process all already pending events and dispatch a new one (blocking // until it appears in the event queue if necessary) @@ -101,12 +101,12 @@ class WXDLLIMPEXP_CORE wxModalEventLoop : public wxGUIEventLoop public: wxModalEventLoop(wxWindow *modalWindow); wxModalEventLoop(WXWindow modalNativeWindow); - + protected: virtual void DoRun(); - + virtual void DoStop(); - + // (in case) the modal window for this event loop wxNonOwnedWindow* m_modalWindow; WXWindow m_modalNativeWindow; diff --git a/include/wx/osx/filedlg.h b/include/wx/osx/filedlg.h index 1cf1b5ce2e..f427d032e3 100644 --- a/include/wx/osx/filedlg.h +++ b/include/wx/osx/filedlg.h @@ -38,20 +38,20 @@ public: virtual void GetFilenames(wxArrayString& files) const { files = m_fileNames ; } virtual int ShowModal(); - + #if wxOSX_USE_COCOA virtual void ShowWindowModal(); virtual void ModalFinishedCallback(void* panel, int resultCode); #endif virtual bool SupportsExtraControl() const; - + protected: // not supported for file dialog, RR virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(width), int WXUNUSED(height), int WXUNUSED(sizeFlags) = wxSIZE_AUTO) {} - + void SetupExtraControls(WXWindow nativeWindow); }; diff --git a/include/wx/osx/font.h b/include/wx/osx/font.h index 3450dbc349..829d9a4b59 100644 --- a/include/wx/osx/font.h +++ b/include/wx/osx/font.h @@ -36,7 +36,7 @@ class WXDLLIMPEXP_CORE wxFont : public wxFontBase public: // ctors and such wxFont() { } - + wxFont( wxOSXSystemFont systemFont ); #if wxOSX_USE_COCOA diff --git a/include/wx/osx/iphone/chkconf.h b/include/wx/osx/iphone/chkconf.h index d86f2de9fa..ac6161a62c 100644 --- a/include/wx/osx/iphone/chkconf.h +++ b/include/wx/osx/iphone/chkconf.h @@ -94,7 +94,7 @@ #endif #ifndef __WXUNIVERSAL__ -#undef wxUSE_SCROLLBAR +#undef wxUSE_SCROLLBAR #define wxUSE_SCROLLBAR 0 #endif diff --git a/include/wx/osx/iphone/private.h b/include/wx/osx/iphone/private.h index d41cfdfb62..250ff2512f 100644 --- a/include/wx/osx/iphone/private.h +++ b/include/wx/osx/iphone/private.h @@ -173,7 +173,7 @@ public : // FIXME: Does iPhone have a concept of inactive windows? virtual bool IsActive() { return true; } - + wxNonOwnedWindow* GetWXPeer() { return m_wxPeer; } virtual bool InitialShowEventSent() { return m_initialShowSent; } diff --git a/include/wx/osx/iphone/private/textimpl.h b/include/wx/osx/iphone/private/textimpl.h index 7a099be63f..5c1bf8d6f1 100644 --- a/include/wx/osx/iphone/private/textimpl.h +++ b/include/wx/osx/iphone/private/textimpl.h @@ -59,14 +59,14 @@ public: virtual void SetSelection( long from , long to ); virtual void WriteText(const wxString& str) ; virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle, bool ignoreBlack = true ); - + virtual bool GetStyle(long position, wxTextAttr& style); virtual void SetStyle(long start, long end, const wxTextAttr& style); - + virtual bool CanFocus() const; - + virtual bool HasOwnContextMenu() const { return true; } - + virtual void CheckSpelling(bool check); virtual wxSize GetBestSize() const; @@ -80,19 +80,19 @@ class wxNSComboBoxControl : public wxUITextFieldControl, public wxComboWidgetImp public : wxNSComboBoxControl( wxWindow *wxPeer, WXWidget w ); virtual ~wxNSComboBoxControl(); - + virtual int GetSelectedItem() const; virtual void SetSelectedItem(int item); - + virtual int GetNumberOfItems() const; - + virtual void InsertItem(int pos, const wxString& item); virtual void RemoveItem(int pos); - + virtual void Clear(); - + virtual wxString GetStringAtIndex(int pos) const; - + virtual int FindString(const wxString& text) const; private: NSComboBox* m_comboBox; diff --git a/include/wx/osx/msgdlg.h b/include/wx/osx/msgdlg.h index cf104e1db2..694d84dc84 100644 --- a/include/wx/osx/msgdlg.h +++ b/include/wx/osx/msgdlg.h @@ -23,7 +23,7 @@ public: const wxPoint& pos = wxDefaultPosition); virtual int ShowModal(); - + #if wxOSX_USE_COCOA virtual void ShowWindowModal(); virtual void ModalFinishedCallback(void* panel, int resultCode); diff --git a/include/wx/osx/nonownedwnd.h b/include/wx/osx/nonownedwnd.h index 8191fa3fef..200a354682 100644 --- a/include/wx/osx/nonownedwnd.h +++ b/include/wx/osx/nonownedwnd.h @@ -56,9 +56,9 @@ public: const wxString& name = wxPanelNameStr); bool Create(wxWindow *parent, WXWindow nativeWindow); - + virtual ~wxNonOwnedWindow(); - + virtual void SubclassWin(WXWindow nativeWindow); virtual void UnsubclassWin(); @@ -109,9 +109,9 @@ public: virtual void HandleResized( double timestampsec ); virtual void HandleMoved( double timestampsec ); virtual void HandleResizing( double timestampsec, wxRect* rect ); - + virtual bool Destroy(); - + protected: // common part of all ctors void Init(); @@ -124,7 +124,7 @@ protected: virtual bool OSXShowWithEffect(bool show, wxShowEffect effect, unsigned timeout); - + virtual void WillBeDestroyed(); wxNonOwnedWindowImpl* m_nowpeer ; @@ -132,7 +132,7 @@ protected: // wxWindowMac* m_macFocus ; static wxNonOwnedWindow *s_macDeactivateWindow; - + private : wxRegion m_shape; }; diff --git a/include/wx/osx/popupwin.h b/include/wx/osx/popupwin.h index e6840871c6..cdfa6ef61c 100644 --- a/include/wx/osx/popupwin.h +++ b/include/wx/osx/popupwin.h @@ -26,7 +26,7 @@ public: { (void)Create(parent, flags); } bool Create(wxWindow *parent, int flags = wxBORDER_NONE); - + virtual bool Show(bool show); protected: diff --git a/include/wx/osx/private/glgrab.h b/include/wx/osx/private/glgrab.h index bca90cb457..3ec2df8f4e 100644 --- a/include/wx/osx/private/glgrab.h +++ b/include/wx/osx/private/glgrab.h @@ -4,7 +4,7 @@ extern "C" { #endif - CGImageRef grabViaOpenGL(CGDirectDisplayID display, + CGImageRef grabViaOpenGL(CGDirectDisplayID display, CGRect srcRect); #if defined __cplusplus diff --git a/include/wx/osx/sound.h b/include/wx/osx/sound.h index 7b0329bdec..edd8a03bfd 100644 --- a/include/wx/osx/sound.h +++ b/include/wx/osx/sound.h @@ -24,7 +24,7 @@ class WXDLLIMPEXP_ADV wxSoundData public : wxSoundData(); virtual ~wxSoundData(); - + virtual bool Play(unsigned int flags) = 0; // stops the sound and deletes the optional timer virtual void Stop(); @@ -33,12 +33,12 @@ public : // mark this to be deleted virtual void MarkForDeletion(); virtual bool IsMarkedForDeletion() const { return m_markedForDeletion; } - + // does the true work of stopping and cleaning up virtual void DoStop() = 0; protected : void CreateAndStartTimer(); - + unsigned int m_flags; wxSoundTimer* m_pTimer; bool m_markedForDeletion; @@ -58,16 +58,16 @@ public: bool Create(int size, const wxByte* data); bool IsOk() const { return m_data != NULL; } - + // Stop playing any sound static void Stop(); - + // Returns true if a sound is being played static bool IsPlaying(); - + // Notification when a sound has stopped static void SoundStopped(const wxSoundData* data); - + protected: bool DoPlay(unsigned flags) const; void Init(); @@ -75,7 +75,7 @@ protected: private: // data of this object class wxSoundData *m_data; - + wxDECLARE_NO_COPY_CLASS(wxSound); }; diff --git a/include/wx/osx/textctrl.h b/include/wx/osx/textctrl.h index c2d2ae2edd..7386fe2934 100644 --- a/include/wx/osx/textctrl.h +++ b/include/wx/osx/textctrl.h @@ -99,7 +99,7 @@ public: virtual void Copy(); virtual void Cut(); virtual void Paste(); - + // Implementation // -------------- virtual void Command(wxCommandEvent& event); diff --git a/include/wx/osx/textentry.h b/include/wx/osx/textentry.h index c55523830b..16f28e2189 100644 --- a/include/wx/osx/textentry.h +++ b/include/wx/osx/textentry.h @@ -32,11 +32,11 @@ class WXDLLIMPEXP_CORE wxTextEntry: public wxTextEntryBase { public: - wxTextEntry() + wxTextEntry() : m_editable(true), m_maxLength(0) { } - + virtual ~wxTextEntry() {}; virtual bool IsEditable() const; @@ -91,7 +91,7 @@ public: protected: virtual wxString DoGetValue() const; - + bool m_editable; // need to make this public because of the current implementation via callbacks diff --git a/include/wx/osx/toolbar.h b/include/wx/osx/toolbar.h index 2ad7deafdc..8d5ee8b872 100644 --- a/include/wx/osx/toolbar.h +++ b/include/wx/osx/toolbar.h @@ -44,7 +44,7 @@ class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase const wxString& name = wxToolBarNameStr); virtual void SetWindowStyleFlag(long style); - + virtual bool Destroy(); // override/implement base class virtuals @@ -72,7 +72,7 @@ class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase void OnMouse(wxMouseEvent& event) ; virtual void MacSuperChangedPosition() ; #endif - + #if wxOSX_USE_NATIVE_TOOLBAR bool MacInstallNativeToolbar(bool usesNative); void MacUninstallNativeToolbar(); @@ -111,7 +111,7 @@ protected: void* m_macToolbar ; #endif #ifdef __WXOSX_IPHONE__ - WX_UIView m_macToolbar; + WX_UIView m_macToolbar; #endif }; diff --git a/include/wx/osx/toplevel.h b/include/wx/osx/toplevel.h index 675c5af2fc..262c3e8aa5 100644 --- a/include/wx/osx/toplevel.h +++ b/include/wx/osx/toplevel.h @@ -44,9 +44,9 @@ public: const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr); - + bool Create(wxWindow *parent, WXWindow nativeWindow); - + virtual bool Destroy(); virtual wxPoint GetClientAreaOrigin() const; @@ -64,7 +64,7 @@ public: virtual void Iconize(bool iconize = true); virtual bool IsIconized() const; virtual void Restore(); - + virtual bool IsActive(); virtual void ShowWithoutActivating(); diff --git a/include/wx/osx/window.h b/include/wx/osx/window.h index 4740a11686..5758b5a8c3 100644 --- a/include/wx/osx/window.h +++ b/include/wx/osx/window.h @@ -265,7 +265,7 @@ public: virtual bool OSXHandleClicked( double timestampsec ); virtual bool OSXHandleKeyEvent( wxKeyEvent& event ); - + bool IsNativeWindowWrapper() const { return m_isNativeWindowWrapper; } protected: // For controls like radio buttons which are genuinely composite @@ -301,7 +301,7 @@ protected: bool m_vScrollBarAlwaysShown; wxWindow* m_growBox ; wxString m_label ; - + bool m_isNativeWindowWrapper; // set to true if we do a sharp clip at the content area of this window diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 5ef99831b9..53308458e5 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -1917,7 +1917,7 @@ public: modifying the value of the editor control (usually by clearing it). Currently, this can work with following properties: wxIntProperty, wxUIntProperty, wxFloatProperty, wxEditEnumProperty. - + @param enable Whether to enable or disable this behavior (it is disabled by default). diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index d215c035c2..23cf2550e9 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -397,7 +397,7 @@ wxPG_VFB_BEEP = 0x02, wxPG_VFB_MARK_CELL = 0x04, /** - Display a text message explaining the situation. + Display a text message explaining the situation. To customize the way the message is displayed, you need to reimplement wxPropertyGrid::DoShowPropertyError() in a @@ -802,7 +802,7 @@ public: /** Centers the splitter. - + @param enableAutoResizing If @true, automatic column resizing is enabled (only applicapple if window style wxPG_SPLITTER_AUTO_CENTER is used). diff --git a/include/wx/ribbon/art.h b/include/wx/ribbon/art.h index f79065595e..9f1a74f890 100644 --- a/include/wx/ribbon/art.h +++ b/include/wx/ribbon/art.h @@ -629,7 +629,7 @@ protected: wxColour m_button_bar_active_background_top_colour; wxColour m_button_bar_active_background_top_gradient_colour; wxColour m_gallery_button_background_colour; - wxColour m_gallery_button_background_gradient_colour; + wxColour m_gallery_button_background_gradient_colour; wxColour m_gallery_button_hover_background_colour; wxColour m_gallery_button_hover_background_gradient_colour; wxColour m_gallery_button_active_background_colour; diff --git a/include/wx/ribbon/buttonbar.h b/include/wx/ribbon/buttonbar.h index 9bc070a08c..7063326b67 100644 --- a/include/wx/ribbon/buttonbar.h +++ b/include/wx/ribbon/buttonbar.h @@ -66,7 +66,7 @@ public: const wxString& label, const wxBitmap& bitmap, const wxString& help_string = wxEmptyString); - + virtual wxRibbonButtonBarButtonBase* AddButton( int button_id, const wxString& label, diff --git a/include/wx/ribbon/panel.h b/include/wx/ribbon/panel.h index 1b2e20eb74..8d167e59bf 100644 --- a/include/wx/ribbon/panel.h +++ b/include/wx/ribbon/panel.h @@ -23,7 +23,7 @@ enum wxRibbonPanelOption wxRIBBON_PANEL_NO_AUTO_MINIMISE = 1 << 0, wxRIBBON_PANEL_EXT_BUTTON = 1 << 3, wxRIBBON_PANEL_MINIMISE_BUTTON = 1 << 4, - + wxRIBBON_PANEL_DEFAULT_STYLE = 0, }; diff --git a/include/wx/richtext/richtextbuffer.h b/include/wx/richtext/richtextbuffer.h index f819000135..9e8d84db2b 100644 --- a/include/wx/richtext/richtextbuffer.h +++ b/include/wx/richtext/richtextbuffer.h @@ -256,19 +256,19 @@ class WXDLLIMPEXP_RICHTEXT wxRichTextAnchoredObjectAttr public: wxRichTextAnchoredObjectAttr() { Init(); } wxRichTextAnchoredObjectAttr(const wxRichTextAnchoredObjectAttr& attr) { Copy(attr); } - + void Init(); void operator= (const wxRichTextAnchoredObjectAttr& attr) { Copy(attr); } void Copy(const wxRichTextAnchoredObjectAttr& attr); - + /// Is this anchored? TODO: difference between anchored and floating? bool IsAnchored() const { return m_floating != wxRICHTEXT_FLOAT_NONE; } /// Is this floating? bool IsFloating() const { return m_floating != wxRICHTEXT_FLOAT_NONE; } void SetFloatingMode(int floating) { m_floating = floating; } - + int GetAlignment() const { return m_align; } void SetAlignment(int align) { m_align = align; } @@ -467,7 +467,7 @@ public: /// Dump to output stream for debugging virtual void Dump(wxTextOutputStream& stream); - + /// Can we edit properties via a GUI? virtual bool CanEditProperties() const { return false; } @@ -918,7 +918,7 @@ public: /// Invalidate the buffer. With no argument, invalidates whole buffer. void Invalidate(const wxRichTextRange& invalidRange = wxRICHTEXT_ALL); - + /// Gather information about floating objects. If untilObj is non-NULL, /// will stop getting information if the current object is this, since we /// will collect the rest later. @@ -1264,7 +1264,7 @@ public: // Make an image block from the wxImage in the given // format. virtual bool MakeImageBlock(wxImage& image, wxBitmapType imageType, int quality = 80); - + // Uses a const wxImage for efficiency, but can't set quality (only relevant for JPEG) virtual bool MakeImageBlockDefaultQuality(const wxImage& image, wxBitmapType imageType); diff --git a/include/wx/richtext/richtextimagedlg.h b/include/wx/richtext/richtextimagedlg.h index 12c2aa1045..968694eef8 100644 --- a/include/wx/richtext/richtextimagedlg.h +++ b/include/wx/richtext/richtextimagedlg.h @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// // Name: wx/richtext/richtextimagedlg.h -// Purpose: +// Purpose: // Author: Mingquan Yang -// Modified by: +// Modified by: // Created: Wed 02 Jun 2010 11:27:23 CST -// RCS-ID: +// RCS-ID: // Copyright: (c) Mingquan Yang // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -45,7 +45,7 @@ class WXDLLIMPEXP_FWD_CORE wxTextCtrl; */ class WXDLLIMPEXP_RICHTEXT wxRichTextImageDialog: public wxDialog -{ +{ DECLARE_DYNAMIC_CLASS( wxRichTextImageDialog ) DECLARE_EVENT_TABLE() diff --git a/include/wx/stattext.h b/include/wx/stattext.h index f3aa8fc9d3..2a6c054b0e 100644 --- a/include/wx/stattext.h +++ b/include/wx/stattext.h @@ -80,12 +80,12 @@ protected: // functions required for wxST_ELLIPSIZE_* support // choose the default border for this window virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; } - // calls only RemoveMarkup() on the original label + // calls only RemoveMarkup() on the original label // if the wxST_MARKUP style is set // (but unlike GetLabelText won't remove mnemonics) virtual wxString GetLabelWithoutMarkup() const; - // just calls RemoveMarkup() & Ellipsize() on the original label + // just calls RemoveMarkup() & Ellipsize() on the original label // if the wxST_MARKUP & wxST_ELLIPSIZE_* styles are set // (but unlike GetLabelText won't remove mnemonics) virtual wxString GetEllipsizedLabelWithoutMarkup() const; diff --git a/include/wx/toplevel.h b/include/wx/toplevel.h index 903a22cdce..92aedc43ca 100644 --- a/include/wx/toplevel.h +++ b/include/wx/toplevel.h @@ -200,10 +200,10 @@ public: // maximize the window to cover entire screen virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) = 0; - + // shows the window, but doesn't activate it. If the base code is being run, // it means the port doesn't implement this method yet and so alert the user. - virtual void ShowWithoutActivating() { + virtual void ShowWithoutActivating() { wxFAIL_MSG("ShowWithoutActivating not implemented on this platform."); } @@ -300,7 +300,7 @@ public: // a different API for SetSizeHints virtual void SetMinSize(const wxSize& minSize); virtual void SetMaxSize(const wxSize& maxSize); - + virtual void OSXSetModified(bool modified) { m_modified = modified; } virtual bool OSXIsModified() const { return m_modified; } @@ -347,7 +347,7 @@ protected: // a temporary override of m_winDefault, use the latter if NULL wxWindowRef m_winTmpDefault; - + bool m_modified; wxDECLARE_NO_COPY_CLASS(wxTopLevelWindowBase); diff --git a/include/wx/typeinfo.h b/include/wx/typeinfo.h index becacc5547..9d6ceb437d 100644 --- a/include/wx/typeinfo.h +++ b/include/wx/typeinfo.h @@ -116,7 +116,7 @@ _WX_DECLARE_TYPEINFO_CUSTOM(CLS, sm_wxClassInfo) #define wxTypeId(OBJ) (OBJ).GetWxTypeId() -// Because abstract classes cannot be instantiated, we use +// Because abstract classes cannot be instantiated, we use // this macro to define pure virtual type interface for them. #define WX_DECLARE_ABSTRACT_TYPEINFO(CLS) \ public: \ diff --git a/include/wx/unix/evtloop.h b/include/wx/unix/evtloop.h index 4c57136f3a..f2b0a102c8 100644 --- a/include/wx/unix/evtloop.h +++ b/include/wx/unix/evtloop.h @@ -25,7 +25,7 @@ namespace wxPrivate class PipeIOHandler; } -class WXDLLIMPEXP_BASE wxConsoleEventLoop +class WXDLLIMPEXP_BASE wxConsoleEventLoop #ifdef __WXOSX__ : public wxCFEventLoop #else diff --git a/samples/access/accesstest.cpp b/samples/access/accesstest.cpp index b8db737d81..894e7e77de 100644 --- a/samples/access/accesstest.cpp +++ b/samples/access/accesstest.cpp @@ -431,7 +431,7 @@ void MyFrame::OnQuery(wxCommandEvent& WXUNUSED(event)) accessibleFrame->Release(); return; } - + long obtained = 0; VARIANT *var = new VARIANT[childCount]; @@ -441,7 +441,7 @@ void MyFrame::OnQuery(wxCommandEvent& WXUNUSED(event)) VariantInit(& (var[i])); var[i].vt = VT_DISPATCH; } - + if (S_OK == AccessibleChildren(accessibleFrame, 0, childCount, var, &obtained)) { for (i = 0; i < childCount; i++) @@ -452,7 +452,7 @@ void MyFrame::OnQuery(wxCommandEvent& WXUNUSED(event)) if (var[i].pdispVal->QueryInterface(IID_IAccessible, (LPVOID*) & childAccessible) == S_OK) { var[i].pdispVal->Release(); - + wxString name, role; GetInfo(childAccessible, 0, name, role); wxString str; @@ -565,10 +565,10 @@ void MyFrame::GetInfo(IAccessible* accessible, int id, wxString& name, wxString& VariantInit(& var); var.vt = VT_I4; var.lVal = id; - + BSTR bStrName = 0; HRESULT hResult = accessible->get_accName(var, & bStrName); - + if (hResult == S_OK) { name = wxConvertStringFromOle(bStrName); @@ -578,23 +578,23 @@ void MyFrame::GetInfo(IAccessible* accessible, int id, wxString& name, wxString& { name = wxT("NO NAME"); } - + VARIANT varRole; VariantInit(& varRole); - + hResult = accessible->get_accRole(var, & varRole); - + if (hResult == S_OK && varRole.vt == VT_I4) { wxChar buf[256]; GetRoleText(varRole.lVal, buf, 256); - + role = buf; } else { role = wxT("NO ROLE"); - } + } } /* @@ -717,14 +717,14 @@ wxAccStatus SplitterWindowAccessible::Navigate(wxNavDir navDir, int fromId, return wxACC_FALSE; } break; - + case wxNAVDIR_LASTCHILD: { if (fromId == 2) return wxACC_FALSE; } break; - + case wxNAVDIR_LEFT: { if (splitter->GetSplitMode() != wxSPLIT_HORIZONTAL) @@ -748,7 +748,7 @@ wxAccStatus SplitterWindowAccessible::Navigate(wxNavDir navDir, int fromId, // below line is not executed due to earlier return break; #endif - + case wxNAVDIR_NEXT: { if (fromId == 1) @@ -769,7 +769,7 @@ wxAccStatus SplitterWindowAccessible::Navigate(wxNavDir navDir, int fromId, // below line is not executed due to earlier return break; #endif - + case wxNAVDIR_PREVIOUS: { if (fromId == 3) @@ -790,7 +790,7 @@ wxAccStatus SplitterWindowAccessible::Navigate(wxNavDir navDir, int fromId, // below line is not executed due to earlier return break; #endif - + case wxNAVDIR_RIGHT: { if (splitter->GetSplitMode() != wxSPLIT_HORIZONTAL) @@ -809,13 +809,13 @@ wxAccStatus SplitterWindowAccessible::Navigate(wxNavDir navDir, int fromId, } } // Can't go right spatially if split horizontally. - return wxACC_FALSE; + return wxACC_FALSE; } #if 0 // below line is not executed due to earlier return break; #endif - + case wxNAVDIR_UP: { if (splitter->GetSplitMode() != wxSPLIT_VERTICAL) @@ -834,14 +834,14 @@ wxAccStatus SplitterWindowAccessible::Navigate(wxNavDir navDir, int fromId, } // Can't go up spatially if split vertically. - return wxACC_FALSE; + return wxACC_FALSE; #if 0 // below line is not executed due to earlier return break; #endif } } - + } // Let the framework handle the other cases. return wxACC_NOT_IMPLEMENTED; diff --git a/samples/caret/caret.cpp b/samples/caret/caret.cpp index 91c7fb83ef..483a9ba255 100644 --- a/samples/caret/caret.cpp +++ b/samples/caret/caret.cpp @@ -226,7 +226,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) // ... and attach this menu bar to the frame SetMenuBar(menuBar); - + m_canvas = new MyCanvas(this); #if wxUSE_STATUSBAR @@ -413,7 +413,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) wxPaintDC dc( this ); PrepareDC( dc ); dc.Clear(); - + dc.SetFont( m_font ); for ( int y = 0; y < m_yChars; y++ ) diff --git a/samples/console/console.cpp b/samples/console/console.cpp index b8b624de18..9a4f4a3b2c 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -16,10 +16,10 @@ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- - + // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" - + #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -80,7 +80,7 @@ int main(int argc, char **argv) // kill the last '\n' input[wxStrlen(input) - 1] = 0; - + if (wxStrcmp(input, "quit") == 0) break; diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index eb750bd33a..7dc4ea6a7a 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -294,7 +294,7 @@ enum ID_ADD_MANY = 203, ID_HIDE_ATTRIBUTES = 204, ID_SHOW_ATTRIBUTES = 205, - + // Fourth page. ID_DELETE_TREE_ITEM = 400, ID_DELETE_ALL_TREE_ITEMS = 401, @@ -360,9 +360,9 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) #endif // wxUSE_DRAG_AND_DROP EVT_RIGHT_UP(MyFrame::OnRightClick) - + EVT_DATAVIEW_COLUMN_HEADER_CLICK(ID_ATTR_CTRL, MyFrame::OnAttrHeaderClick) - + END_EVENT_TABLE() MyFrame::MyFrame(wxFrame *frame, const wxString &title, int x, int y, int w, int h): @@ -626,8 +626,8 @@ void MyFrame::BuildDataViewCtrl(wxPanel* parent, unsigned int nPanel, unsigned l m_ctrl[1]->AppendIconTextColumn("icon", MyListModel::Col_IconText, wxDATAVIEW_CELL_EDITABLE); - - m_attributes = + + m_attributes = new wxDataViewColumn("attributes", new wxDataViewTextRenderer, MyListModel::Col_TextWithAttr, @@ -1195,7 +1195,7 @@ void MyFrame::OnDeleteTreeItem(wxCommandEvent& WXUNUSED(event)) wxDataViewItem selected = ctrl->GetSelection(); if (!selected.IsOk()) return; - + ctrl->DeleteItem(selected); } diff --git a/samples/dataview/mymodels.cpp b/samples/dataview/mymodels.cpp index 8ea635899a..79fc7170bb 100644 --- a/samples/dataview/mymodels.cpp +++ b/samples/dataview/mymodels.cpp @@ -348,7 +348,7 @@ void MyListModel::Prepend( const wxString &text ) void MyListModel::DeleteItem( const wxDataViewItem &item ) { unsigned int row = GetRow( item ); - + if (row >= m_textColValues.GetCount()) return; diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 53fd1a8c46..761144bc8a 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -809,7 +809,7 @@ void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event)) wxCENTER | wxNO_DEFAULT | wxYES_NO | wxCANCEL | wxICON_INFORMATION); - + wxString extmsg; if ( dialog.SetYesNoCancelLabels ( @@ -827,21 +827,21 @@ void MyFrame::MessageBox(wxCommandEvent& WXUNUSED(event)) "so the default \"Yes\"/\"No\"/\"Cancel\" buttons are used."; } dialog.SetExtendedMessage(extmsg); - + switch ( dialog.ShowModal() ) { case wxID_YES: wxLogStatus(wxT("You pressed \"Yes\"")); break; - + case wxID_NO: wxLogStatus(wxT("You pressed \"No\"")); break; - + case wxID_CANCEL: wxLogStatus(wxT("You pressed \"Cancel\"")); break; - + default: wxLogError(wxT("Unexpected wxMessageDialog return code!")); } @@ -2695,7 +2695,7 @@ bool TestMessageBoxDialog::Create() }; wxCOMPILE_TIME_ASSERT( WXSIZEOF(icons) == MsgDlgIcon_Max, IconMismatch ); - + m_icons = new wxRadioBox(this, wxID_ANY, "&Icon style", wxDefaultPosition, wxDefaultSize, WXSIZEOF(icons), icons, diff --git a/samples/docview/doc.h b/samples/docview/doc.h index 5c9de7378c..d79f8275de 100644 --- a/samples/docview/doc.h +++ b/samples/docview/doc.h @@ -166,7 +166,7 @@ class wxTextDocument : public wxDocument public: wxTextDocument() : wxDocument() { } - virtual bool OnCreate(const wxString& path, long flags); + virtual bool OnCreate(const wxString& path, long flags); virtual wxTextCtrl* GetTextCtrl() const = 0; diff --git a/samples/docview/view.cpp b/samples/docview/view.cpp index b1c289339f..6129bac8a3 100644 --- a/samples/docview/view.cpp +++ b/samples/docview/view.cpp @@ -88,7 +88,7 @@ void DrawingView::OnDraw(wxDC *dc) ++i ) { const DoodleLines& lines = i->GetLines(); - for ( DoodleLines::const_iterator j = lines.begin(); + for ( DoodleLines::const_iterator j = lines.begin(); j != lines.end(); ++j ) { diff --git a/samples/dragimag/dragimag.cpp b/samples/dragimag/dragimag.cpp index cce62bcdfa..db5c14b430 100644 --- a/samples/dragimag/dragimag.cpp +++ b/samples/dragimag/dragimag.cpp @@ -142,7 +142,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event) m_currentlyHighlighted = (DragShape*) NULL; m_draggedShape = (DragShape*) NULL; - + Refresh(true); } else if (event.Dragging() && m_dragMode != TEST_DRAG_NONE) @@ -230,7 +230,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event) if (mustUnhighlightOld || mustHighlightNew) m_dragImage->Hide(); - + // Now with the drag image switched off, we can change the window contents. if (mustUnhighlightOld) m_currentlyHighlighted = (DragShape*) NULL; @@ -475,7 +475,7 @@ bool DragShape::Draw(wxDC& dc, bool highlight) dc.Blit(m_pos.x, m_pos.y, m_bitmap.GetWidth(), m_bitmap.GetHeight(), & memDC, 0, 0, wxCOPY, true); - + if (highlight) { dc.SetPen(*wxWHITE_PEN); diff --git a/samples/flash/flash.cpp b/samples/flash/flash.cpp index b0dc87bedc..0e6ea06593 100644 --- a/samples/flash/flash.cpp +++ b/samples/flash/flash.cpp @@ -21,9 +21,9 @@ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- - + #include "wx/wxprec.h" - + #ifdef __BORLANDC__ #pragma hdrstop #endif diff --git a/samples/font/font.cpp b/samples/font/font.cpp index cb036de8b7..8dc2e42d2c 100644 --- a/samples/font/font.cpp +++ b/samples/font/font.cpp @@ -102,10 +102,10 @@ public: void OnBold(wxCommandEvent& event); void OnLight(wxCommandEvent& event); - + void OnItalic(wxCommandEvent& event); void OnSlant(wxCommandEvent& event); - + void OnUnderline(wxCommandEvent& event); void OnwxPointerFont(wxCommandEvent& event); @@ -123,7 +123,7 @@ public: void OnSetNativeDesc(wxCommandEvent& event); void OnSetNativeUserDesc(wxCommandEvent& event); - + void OnSetFamily(wxCommandEvent& event); void OnSetFaceName(wxCommandEvent& event); void OnSetEncoding(wxCommandEvent& event); @@ -164,21 +164,21 @@ enum // menu items Font_Quit = wxID_EXIT, Font_About = wxID_ABOUT, - + Font_ViewMsg = wxID_HIGHEST+1, Font_TestTextValue, Font_IncSize, Font_DecSize, - + Font_Bold, Font_Light, - + Font_Italic, Font_Slant, - + Font_Underlined, - + // standard global wxFont objects: Font_wxNORMAL_FONT, Font_wxSMALL_FONT, @@ -223,13 +223,13 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU(Font_IncSize, MyFrame::OnIncFont) EVT_MENU(Font_DecSize, MyFrame::OnDecFont) - + EVT_MENU(Font_Bold, MyFrame::OnBold) EVT_MENU(Font_Light, MyFrame::OnLight) - + EVT_MENU(Font_Italic, MyFrame::OnItalic) EVT_MENU(Font_Slant, MyFrame::OnSlant) - + EVT_MENU(Font_Underlined, MyFrame::OnUnderline) EVT_MENU(Font_wxNORMAL_FONT, MyFrame::OnwxPointerFont) @@ -339,7 +339,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) wxT("Set &user font description\tShift-Ctrl-U")); menuFont->AppendSeparator(); menuFont->Append(Font_SetFamily, wxT("Set font family")); - menuFont->Append(Font_SetFaceName, wxT("Set font face name")); + menuFont->Append(Font_SetFaceName, wxT("Set font face name")); menuFont->Append(Font_SetEncoding, wxT("Set font &encoding\tShift-Ctrl-E")); wxMenu *menuSelect = new wxMenu; @@ -354,21 +354,21 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) menuSelect->Append(Font_Standard, wxT("Standar&d fonts"), menuStdFonts); wxMenu *menuSettingFonts = new wxMenu; - menuSettingFonts->Append(Font_wxSYS_OEM_FIXED_FONT, wxT("wxSYS_OEM_FIXED_FONT"), + menuSettingFonts->Append(Font_wxSYS_OEM_FIXED_FONT, wxT("wxSYS_OEM_FIXED_FONT"), wxT("Original equipment manufacturer dependent fixed-pitch font.")); - menuSettingFonts->Append(Font_wxSYS_ANSI_FIXED_FONT, wxT("wxSYS_ANSI_FIXED_FONT"), + menuSettingFonts->Append(Font_wxSYS_ANSI_FIXED_FONT, wxT("wxSYS_ANSI_FIXED_FONT"), wxT("Windows fixed-pitch (monospaced) font. ")); - menuSettingFonts->Append(Font_wxSYS_ANSI_VAR_FONT, wxT("wxSYS_ANSI_VAR_FONT"), + menuSettingFonts->Append(Font_wxSYS_ANSI_VAR_FONT, wxT("wxSYS_ANSI_VAR_FONT"), wxT("Windows variable-pitch (proportional) font.")); - menuSettingFonts->Append(Font_wxSYS_SYSTEM_FONT, wxT("wxSYS_SYSTEM_FONT"), + menuSettingFonts->Append(Font_wxSYS_SYSTEM_FONT, wxT("wxSYS_SYSTEM_FONT"), wxT("System font.")); menuSettingFonts->Append(Font_wxSYS_DEVICE_DEFAULT_FONT, wxT("wxSYS_DEVICE_DEFAULT_FONT"), wxT("Device-dependent font.")); - menuSettingFonts->Append(Font_wxSYS_DEFAULT_GUI_FONT, wxT("wxSYS_DEFAULT_GUI_FONT"), + menuSettingFonts->Append(Font_wxSYS_DEFAULT_GUI_FONT, wxT("wxSYS_DEFAULT_GUI_FONT"), wxT("Default font for user interface objects such as menus and dialog boxes. ")); menuSelect->Append(Font_SystemSettings, wxT("System fonts"), menuSettingFonts); - - + + menuSelect->AppendSeparator(); menuSelect->Append(Font_EnumFamilies, wxT("Enumerate font &families\tCtrl-F")); menuSelect->Append(Font_EnumFixedFamilies, @@ -821,12 +821,12 @@ void MyFrame::DoChangeFont(const wxFont& font, const wxColour& col) { mbar->Check(Font_Light, font.GetWeight() == wxFONTWEIGHT_LIGHT); mbar->Check(Font_Bold, font.GetWeight() == wxFONTWEIGHT_BOLD); - + mbar->Check(Font_Italic, font.GetStyle() == wxFONTSTYLE_ITALIC); #ifndef __WXMSW__ mbar->Check(Font_Slant, font.GetStyle() == wxFONTSTYLE_SLANT); #endif - + mbar->Check(Font_Underlined, font.GetUnderlined()); } } @@ -1023,7 +1023,7 @@ void MyCanvas::OnPaint( wxPaintEvent &WXUNUSED(event) ) // output the font name/info wxString fontInfo; - + fontInfo.Printf(wxT("Face name: %s, family: %s"), m_font.GetFaceName().c_str(), m_font.GetFamilyString().c_str()); diff --git a/samples/help/demo.cpp b/samples/help/demo.cpp index 505574ad6a..8cc959c746 100644 --- a/samples/help/demo.cpp +++ b/samples/help/demo.cpp @@ -461,10 +461,10 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) m_embeddedHelpWindow = new wxHtmlHelpWindow; // m_embeddedHtmlHelp.UseConfig(config, rootPath); // Can set your own config object here m_embeddedHtmlHelp.SetHelpWindow(m_embeddedHelpWindow); - + m_embeddedHelpWindow->Create(this, wxID_ANY, wxDefaultPosition, GetClientSize(), wxTAB_TRAVERSAL|wxNO_BORDER, wxHF_DEFAULT_STYLE); - + m_embeddedHtmlHelp.AddBook(wxFileName(wxT("doc.zip"))); m_embeddedHtmlHelp.Display(wxT("Introduction")); #else diff --git a/samples/layout/expt.cpp b/samples/layout/expt.cpp index af2c089b84..6b77454b2d 100644 --- a/samples/layout/expt.cpp +++ b/samples/layout/expt.cpp @@ -4,9 +4,9 @@ * the original, so abandoned. Example: - + wxConstrain(frame->panel, - + ( leftOf (frame->panel) = leftOf (frame), topOf (frame->panel) = topOf (frame), rightOf (frame->panel) = rightOf (frame), @@ -70,7 +70,7 @@ class wxConstraintOp: public wxObject wxConstraintOp operator = (const wxConstraintOp& arg2); wxConstraintOp operator = (const int value); - + friend wxConstraintOp operator % (const int perCent, const wxConstraintOp& arg2); friend wxConstraintOp operator + (wxConstraintOp& arg1, int margin); friend wxConstraintOp operator - (wxConstraintOp& arg1, int margin); diff --git a/samples/layout/layout.h b/samples/layout/layout.h index 34b495effc..4b9edcad45 100644 --- a/samples/layout/layout.h +++ b/samples/layout/layout.h @@ -103,10 +103,10 @@ class MySimpleSizerFrame : public wxFrame { public: MySimpleSizerFrame(const wxString &title, int x, int y ); - + void OnSetSmallSize( wxCommandEvent &event); void OnSetBigSize( wxCommandEvent &event); - + private: wxTextCtrl *m_target; @@ -121,8 +121,8 @@ class MyNestedSizerFrame : public wxFrame { public: MyNestedSizerFrame(const wxString &title, int x, int y ); - - + + private: wxTextCtrl *m_target; }; diff --git a/samples/listctrl/listtest.cpp b/samples/listctrl/listtest.cpp index c60dc4e483..4a08c29078 100644 --- a/samples/listctrl/listtest.cpp +++ b/samples/listctrl/listtest.cpp @@ -283,7 +283,7 @@ MyFrame::MyFrame(const wxChar *title) #ifdef __WXMSW__ // this is useful to know specially when debugging :) - wxLogMessage("Your version of comctl32.dll is: %d", + wxLogMessage("Your version of comctl32.dll is: %d", wxApp::GetComCtl32Version()); #endif diff --git a/samples/mfc/mfctest.cpp b/samples/mfc/mfctest.cpp index ec1fbfc480..69146772d3 100644 --- a/samples/mfc/mfctest.cpp +++ b/samples/mfc/mfctest.cpp @@ -39,7 +39,7 @@ // nmake -f makefile.vc BUILD=debug SHARED=0 DEBUG_RUNTIME_LIBS=0 RUNTIME_LIBS=static all // // Unless the run-time library settings match for wxWidgets and MFC, you -// will get link errors for symbols such as __mbctype, __argc, and __argv +// will get link errors for symbols such as __mbctype, __argc, and __argv // // (3) If you see bogus memory leaks within the MSVC IDE on exit, in this // sample or in your own project, you must be using __WXDEBUG__ + diff --git a/samples/mfc/resource.h b/samples/mfc/resource.h index e20ad76cbb..7161893e9f 100644 --- a/samples/mfc/resource.h +++ b/samples/mfc/resource.h @@ -6,7 +6,7 @@ #define IDM_TEST 101 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS diff --git a/samples/minimal/minimal.cpp b/samples/minimal/minimal.cpp index 80bf766199..fb8f7212e3 100644 --- a/samples/minimal/minimal.cpp +++ b/samples/minimal/minimal.cpp @@ -16,10 +16,10 @@ // ---------------------------------------------------------------------------- // headers // ---------------------------------------------------------------------------- - + // For compilers that support precompilation, includes "wx/wx.h". #include "wx/wxprec.h" - + #ifdef __BORLANDC__ #pragma hdrstop #endif diff --git a/samples/nativdlg/resource.h b/samples/nativdlg/resource.h index 21b2464030..5775ce1363 100644 --- a/samples/nativdlg/resource.h +++ b/samples/nativdlg/resource.h @@ -14,7 +14,7 @@ #define IDC_STATIC -1 // Next default values for new objects -// +// #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 102 diff --git a/samples/notebook/notebook.cpp b/samples/notebook/notebook.cpp index 8a204570a5..c854a99ce3 100644 --- a/samples/notebook/notebook.cpp +++ b/samples/notebook/notebook.cpp @@ -89,14 +89,14 @@ wxPanel *CreateRadioButtonsPage(wxBookCtrlBase *parent) panel->SetHelpText( wxT( "Panel with some Radio Buttons" ) ); #endif - wxString animals[] = + wxString animals[] = { wxT("Fox"), wxT("Hare"), wxT("Rabbit"), wxT("Sabre-toothed tiger"), wxT("T Rex") }; wxRadioBox *radiobox1 = new wxRadioBox(panel, wxID_ANY, wxT("Choose one"), wxDefaultPosition, wxDefaultSize, 5, animals, 2, wxRA_SPECIFY_ROWS); - wxString computers[] = + wxString computers[] = { wxT("Amiga"), wxT("Commodore 64"), wxT("PET"), wxT("Another") }; @@ -121,7 +121,7 @@ wxPanel *CreateVetoPage(wxBookCtrlBase *parent) #endif (void) new wxStaticText( panel, wxID_ANY, - wxT("This page intentionally left blank"), + wxT("This page intentionally left blank"), wxPoint(10, 10) ); return panel; @@ -154,7 +154,7 @@ wxPanel *CreateInsertPage(wxBookCtrlBase *parent) panel->SetBackgroundColour( wxColour( wxT("MAROON") ) ); (void) new wxStaticText( panel, wxID_ANY, - wxT("This page has been inserted, not added."), + wxT("This page has been inserted, not added."), wxPoint(10, 10) ); return panel; @@ -579,7 +579,7 @@ void MyFrame::RecreateBook() m_sizerFrame->Layout(); } -void MyFrame::AddFlagStrIfFlagPresent(wxString & flagStr, long flags, long flag, +void MyFrame::AddFlagStrIfFlagPresent(wxString & flagStr, long flags, long flag, const wxChar * flagName) const { if( (flags & flag) == flag ) diff --git a/samples/opengl/cube/cube.cpp b/samples/opengl/cube/cube.cpp index 7396d9bb5e..f7423a73b2 100644 --- a/samples/opengl/cube/cube.cpp +++ b/samples/opengl/cube/cube.cpp @@ -161,7 +161,7 @@ TestGLContext::TestGLContext(wxGLCanvas *canvas) const wxImage img(DrawDice(256, i + 1)); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img.GetWidth(), img.GetHeight(), + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img.GetWidth(), img.GetHeight(), 0, GL_RGB, GL_UNSIGNED_BYTE, img.GetData()); } diff --git a/samples/opengl/isosurf/isosurf.cpp b/samples/opengl/isosurf/isosurf.cpp index 471942b637..6b04b47168 100644 --- a/samples/opengl/isosurf/isosurf.cpp +++ b/samples/opengl/isosurf/isosurf.cpp @@ -232,7 +232,7 @@ void TestGLCanvas::LoadSurface(const wxString& filename) wxLogMessage(wxT("Loaded %d vertices, %d triangles from '%s'"), m_numverts, m_numverts-2, filename.c_str()); - + // NOTE: for some reason under wxGTK the following is required to avoid that // the surface gets rendered in a small rectangle in the top-left corner of the frame PostSizeEventToParent(); diff --git a/samples/propgrid/propgrid.cpp b/samples/propgrid/propgrid.cpp index b81ea3cc3e..431199b249 100644 --- a/samples/propgrid/propgrid.cpp +++ b/samples/propgrid/propgrid.cpp @@ -1646,7 +1646,7 @@ void FormMain::PopulateWithExamples () mdc.DrawLine(0, 0, 60, 15); mdc.SelectObject(wxNullBitmap); pg->SetPropertyImage( wxT("StringPropertyWithBitmap"), myTestBitmap ); - + // this value array would be optional if values matched string indexes //long flags_prop_values[] = { wxICONIZE, wxCAPTION, wxMINIMIZE_BOX, wxMAXIMIZE_BOX }; diff --git a/samples/propgrid/tests.cpp b/samples/propgrid/tests.cpp index 7d04a32313..1b86cff7bc 100644 --- a/samples/propgrid/tests.cpp +++ b/samples/propgrid/tests.cpp @@ -1131,7 +1131,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive ) InitPanel(); const int trySplitterPos = 50; - + int style = wxPG_AUTO_SORT; // wxPG_SPLITTER_AUTO_CENTER; pgman = m_pPropGridManager = new wxPropertyGridManager(m_panel, wxID_ANY, diff --git a/samples/ribbon/ribbondemo.cpp b/samples/ribbon/ribbondemo.cpp index 126c75b513..f95b50c715 100644 --- a/samples/ribbon/ribbondemo.cpp +++ b/samples/ribbon/ribbondemo.cpp @@ -249,18 +249,18 @@ MyFrame::MyFrame() shapes->AddButton(ID_SQUARE, wxT("Square"), wxBitmap(square_xpm), wxEmptyString); shapes->AddDropdownButton(ID_POLYGON, wxT("Other Polygon"), wxBitmap(hexagon_xpm), wxEmptyString); - wxRibbonPanel *sizer_panel = new wxRibbonPanel(home, wxID_ANY, wxT("Panel with Sizer"), - wxNullBitmap, wxDefaultPosition, wxDefaultSize, + wxRibbonPanel *sizer_panel = new wxRibbonPanel(home, wxID_ANY, wxT("Panel with Sizer"), + wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxRIBBON_PANEL_EXT_BUTTON); wxArrayString as; as.Add("Item 1"); as.Add("Item 2"); - wxComboBox* sizer_panelcombo = new wxComboBox(sizer_panel, wxID_ANY, wxEmptyString, + wxComboBox* sizer_panelcombo = new wxComboBox(sizer_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, as, wxCB_READONLY); - wxComboBox* sizer_panelcombo2 = new wxComboBox(sizer_panel, wxID_ANY, wxEmptyString, + wxComboBox* sizer_panelcombo2 = new wxComboBox(sizer_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, as, wxCB_READONLY); - + sizer_panelcombo->SetMinSize(wxSize(150, -1)); sizer_panelcombo2->SetMinSize(wxSize(150, -1)); @@ -360,7 +360,7 @@ wxRibbonGallery* MyFrame::PopulateColoursPanel(wxWindow* panel, else gallery = new wxRibbonGallery(panel, gallery_id); wxMemoryDC& dc = m_bitmap_creation_dc; - wxRibbonGalleryItem *def_item = + wxRibbonGalleryItem *def_item = AddColourToGallery(gallery, wxT("Default"), dc, &def); gallery->SetSelection(def_item); AddColourToGallery(gallery, wxT("BLUE"), dc); diff --git a/samples/sockets/baseclient.cpp b/samples/sockets/baseclient.cpp index b81ff9ca15..b7a84d492a 100644 --- a/samples/sockets/baseclient.cpp +++ b/samples/sockets/baseclient.cpp @@ -306,9 +306,9 @@ Client::OnExit() return 0; } -// Create buffer to be sent by client. Buffer contains test indicator +// Create buffer to be sent by client. Buffer contains test indicator // message size and place for data -// msgsize parameter contains size of data in bytes and +// msgsize parameter contains size of data in bytes and // if input value does not fit into 250 bytes then // on exit is updated to new value that is multiply of 1024 bytes char* @@ -318,7 +318,7 @@ Client::CreateBuffer(int* msgsize) char* buf; //if message should have more than 256 bytes then set it as //test3 for compatibility with GUI server sample - if ((*msgsize) > 250) + if ((*msgsize) > 250) { //send at least one kb of data int size = (*msgsize)/1024 + 1; diff --git a/samples/stc/edit.h b/samples/stc/edit.h index 780076d77a..d22222f67c 100644 --- a/samples/stc/edit.h +++ b/samples/stc/edit.h @@ -48,7 +48,7 @@ public: Edit (wxWindow *parent, wxWindowID id = wxID_ANY, const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize, - long style = + long style = #ifndef __WXMAC__ wxSUNKEN_BORDER| #endif diff --git a/samples/svg/svgtest.cpp b/samples/svg/svgtest.cpp index 78ffaf667b..6f42626b66 100644 --- a/samples/svg/svgtest.cpp +++ b/samples/svg/svgtest.cpp @@ -66,29 +66,29 @@ public: void OnNewWindow(wxCommandEvent& event); void OnQuit(wxCommandEvent& event); void FileSavePicture (wxCommandEvent& event); - + unsigned int GetCountOfChildren() const { return m_nWinCreated; } private: unsigned int m_nWinCreated; - + DECLARE_EVENT_TABLE() }; class MyChild: public wxMDIChildFrame { public: - MyChild(wxMDIParentFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, + MyChild(wxMDIParentFrame *parent, const wxString& title, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, const long style = wxDEFAULT_FRAME_STYLE); ~MyChild(); void OnActivate(wxActivateEvent& event); void OnQuit(wxCommandEvent& event); bool OnSave(wxString filename); - + MyFrame* GetFrame() { return m_frame; } @@ -108,7 +108,7 @@ public: private: int m_index; MyChild* m_child; - + DECLARE_EVENT_TABLE() }; @@ -213,7 +213,7 @@ void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event) ) { (void)wxMessageBox(wxT("wxWidgets SVG sample\n") wxT("Author: Chris Elliott (c) 2002-2009\n") - wxT("Usage: click File|New to show tests"), + wxT("Usage: click File|New to show tests"), wxT("About SVG Test")); } @@ -224,7 +224,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& WXUNUSED(event) ) wxString title; title.Printf(wxT("SVG Test Window %d"), m_nWinCreated ); - + // counts number of children previously, even if now closed m_nWinCreated ++; @@ -519,14 +519,14 @@ MyChild::MyChild(wxMDIParentFrame *parent, const wxString& title, : wxMDIChildFrame(parent, wxID_ANY, title, pos, size, style) { m_frame = (MyFrame *) parent; - + #if wxUSE_STATUSBAR CreateStatusBar(); SetStatusText(title); #endif // wxUSE_STATUSBAR m_canvas = new MyCanvas(this, wxPoint(0, 0), GetClientSize()); - + // Give it scrollbars m_canvas->SetScrollbars(20, 20, 50, 50); } diff --git a/samples/toolbar/toolbar.cpp b/samples/toolbar/toolbar.cpp index 106e9622b8..e1fdb33f7a 100644 --- a/samples/toolbar/toolbar.cpp +++ b/samples/toolbar/toolbar.cpp @@ -642,7 +642,7 @@ MyFrame::MyFrame(wxFrame* parent, m_extraToolBar = new wxToolBar(m_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_TEXT|wxTB_FLAT|wxTB_TOP); PopulateToolbar(m_extraToolBar); #endif - + m_textWindow = new wxTextCtrl(m_panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE); wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp index 6ea0f3465d..fa35d9f639 100644 --- a/samples/treectrl/treetest.cpp +++ b/samples/treectrl/treetest.cpp @@ -807,7 +807,7 @@ void MyFrame::OnDecSpacing(wxCommandEvent& WXUNUSED(event)) { m_treeCtrl->SetSpacing( indent-5 ); m_treeCtrl->Refresh(); - } + } } void MyFrame::OnToggleIcon(wxCommandEvent& WXUNUSED(event)) @@ -1024,10 +1024,10 @@ void MyTreeCtrl::CreateStateImageList(bool del) wxIcon icons[2]; icons[0] = wxIcon(unchecked_xpm); icons[1] = wxIcon(checked_xpm); - + int width = icons[0].GetWidth(), height = icons[0].GetHeight(); - + // Make an state image list containing small icons states = new wxImageList(width, height, true); diff --git a/samples/widgets/gauge.cpp b/samples/widgets/gauge.cpp index ca1f0f092e..6b16d3757a 100644 --- a/samples/widgets/gauge.cpp +++ b/samples/widgets/gauge.cpp @@ -303,7 +303,7 @@ void GaugeWidgetsPage::CreateGauge() wxDefaultPosition, wxDefaultSize, flags); m_gauge->SetValue(val); - + if ( flags & wxGA_VERTICAL ) m_sizerGauge->Add(m_gauge, 0, wxGROW | wxALL, 5); else diff --git a/samples/widgets/searchctrl.cpp b/samples/widgets/searchctrl.cpp index 6ccf62e1f6..0ff7330fad 100644 --- a/samples/widgets/searchctrl.cpp +++ b/samples/widgets/searchctrl.cpp @@ -5,7 +5,7 @@ // Author: Robin Dunn // Created: 9-Dec-2006 // Id: $Id$ -// Copyright: (c) 2006 +// Copyright: (c) 2006 // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -87,14 +87,14 @@ protected: void OnSearch(wxCommandEvent& event); wxMenu* CreateTestMenu(); - + // (re)create the control void CreateControl(); // reset the control parameters void Reset(); - - + + wxSearchCtrl* m_srchCtrl; wxCheckBox* m_searchBtnCheck; wxCheckBox* m_cancelBtnCheck; @@ -153,7 +153,7 @@ void SearchCtrlWidgetsPage::CreateContent() m_menuBtnCheck = new wxCheckBox(this, ID_MENU_CB, wxT("Search menu")); m_searchBtnCheck->SetValue(true); - + box->Add(m_searchBtnCheck, 0, wxALL, 5); box->Add(m_cancelBtnCheck, 0, wxALL, 5); box->Add(m_menuBtnCheck, 0, wxALL, 5); @@ -171,13 +171,13 @@ void SearchCtrlWidgetsPage::CreateControl() m_srchCtrl->Destroy(); int style = 0; - + m_srchCtrl = new wxSearchCtrl(this, -1, wxEmptyString, wxDefaultPosition, wxSize(150, -1), style); } void SearchCtrlWidgetsPage::Reset() -{ +{ } @@ -193,7 +193,7 @@ wxMenu* SearchCtrlWidgetsPage::CreateTestMenu() wxString tipText = wxString::Format(wxT("tip %i"),i); menu->Append(ID_SEARCHMENU+i, itemText, tipText, wxITEM_NORMAL); } -// target->Connect( +// target->Connect( // ID_SEARCHMENU, // ID_SEARCHMENU+SEARCH_MENU_SIZE, // wxEVT_COMMAND_MENU_SELECTED, @@ -215,7 +215,7 @@ void SearchCtrlWidgetsPage::OnToggleSearchButton(wxCommandEvent&) void SearchCtrlWidgetsPage::OnToggleCancelButton(wxCommandEvent&) { m_srchCtrl->ShowCancelButton( m_cancelBtnCheck->GetValue() ); - + } void SearchCtrlWidgetsPage::OnToggleSearchMenu(wxCommandEvent&) diff --git a/src/common/colourcmn.cpp b/src/common/colourcmn.cpp index 943ceb5683..654f712564 100644 --- a/src/common/colourcmn.cpp +++ b/src/common/colourcmn.cpp @@ -150,7 +150,7 @@ wxString wxColourBase::GetAsString(long flags) const } // static -void wxColourBase::MakeMono(unsigned char* r, unsigned char* g, unsigned char* b, +void wxColourBase::MakeMono(unsigned char* r, unsigned char* g, unsigned char* b, bool on) { *r = *g = *b = on ? 255 : 0; @@ -173,7 +173,7 @@ void wxColourBase::MakeGrey(unsigned char* r, unsigned char* g, unsigned char* b } // static -void wxColourBase::MakeDisabled(unsigned char* r, unsigned char* g, unsigned char* b, +void wxColourBase::MakeDisabled(unsigned char* r, unsigned char* g, unsigned char* b, unsigned char brightness) { //MakeGrey(r, g, b, brightness); // grey no-blend version @@ -185,7 +185,7 @@ void wxColourBase::MakeDisabled(unsigned char* r, unsigned char* g, unsigned cha // AlphaBlend is used by ChangeLightness and MakeDisabled // static -unsigned char wxColourBase::AlphaBlend(unsigned char fg, unsigned char bg, +unsigned char wxColourBase::AlphaBlend(unsigned char fg, unsigned char bg, double alpha) { double result = bg + (alpha * (fg - bg)); diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 122405a1cd..15298838f0 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -235,10 +235,10 @@ static inline bool IsPopupWinTypePerfect( wxByte popupWinType ) #else return ( popupWinType == POPUPWIN_GENERICTLW #if POPUPWIN_IS_PERFECT - || popupWinType == POPUPWIN_WXPOPUPWINDOW + || popupWinType == POPUPWIN_WXPOPUPWINDOW #endif #if TRANSIENT_POPUPWIN_IS_PERFECT - || popupWinType == POPUPWIN_WXPOPUPTRANSIENTWINDOW + || popupWinType == POPUPWIN_WXPOPUPTRANSIENTWINDOW #endif ); #endif @@ -1202,7 +1202,7 @@ void wxComboCtrlBase::PositionTextCtrl( int textCtrlXAdjust, int textCtrlYAdjust // There is special custom paint area - it is better to // use some margin with the wxTextCtrl. m_text->SetMargins(m_marginLeft); - x = m_tcArea.x + m_widthCustomPaint + + x = m_tcArea.x + m_widthCustomPaint + m_marginLeft + textCtrlXAdjust; } diff --git a/src/common/ctrlcmn.cpp b/src/common/ctrlcmn.cpp index 67b6bedfe6..9d782d7f18 100644 --- a/src/common/ctrlcmn.cpp +++ b/src/common/ctrlcmn.cpp @@ -298,7 +298,7 @@ wxString wxControlBase::DoEllipsizeSingleLine(const wxString& curLine, const wxD // NOTE: the following piece of code works also when len == 1 // start the removal process from the middle of the string - // i.e. separe the string in three parts: + // i.e. separe the string in three parts: // - the first one to preserve, valid range [0;initialCharToRemove-1] or the empty range if initialCharToRemove==0 // - the second one to remove, valid range [initialCharToRemove;endCharToRemove] // - the third one to preserve, valid range [endCharToRemove+1;len-1] or the empty range if endCharToRemove==len-1 @@ -317,9 +317,9 @@ wxString wxControlBase::DoEllipsizeSingleLine(const wxString& curLine, const wxD if (initialCharToRemove >= 2) widthPx = charOffsetsPx[initialCharToRemove-1] - charOffsetsPx[initialCharToRemove-2]; else - widthPx = charOffsetsPx[initialCharToRemove-1]; + widthPx = charOffsetsPx[initialCharToRemove-1]; // the (initialCharToRemove-1)-th character is the first char of the string - + wxASSERT(widthPx >= 0); // widthPx is zero for e.g. tab characters // mark the (initialCharToRemove-1)-th character as removable @@ -394,7 +394,7 @@ wxString wxControlBase::DoEllipsizeSingleLine(const wxString& curLine, const wxD int removedPx; if (initialCharToRemove >= 1) removedPx = charOffsetsPx[initialCharToRemove+nCharsToRemove-1] - charOffsetsPx[initialCharToRemove-1]; - else + else removedPx = charOffsetsPx[initialCharToRemove+nCharsToRemove-1]; wxASSERT(removedPx >= excessPx); diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 6c9423bc38..d14aa09706 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -376,7 +376,7 @@ wxDataViewIndexListModel::wxDataViewIndexListModel( unsigned int initial_size ) void wxDataViewIndexListModel::Reset( unsigned int new_size ) { /* wxDataViewModel:: */ BeforeReset(); - + m_hash.Clear(); // IDs are ordered until an item gets deleted or inserted @@ -534,7 +534,7 @@ void wxDataViewVirtualListModel::Reset( unsigned int new_size ) /* wxDataViewModel:: */ BeforeReset(); m_size = new_size; - + /* wxDataViewModel:: */ AfterReset(); } @@ -1487,11 +1487,11 @@ wxDataViewChoiceByIndexRenderer::wxDataViewChoiceByIndexRenderer( const wxArrayS wxDataViewChoiceRenderer( choices, mode, alignment ) { } - + wxControl* wxDataViewChoiceByIndexRenderer::CreateEditorCtrl( wxWindow *parent, wxRect labelRect, const wxVariant &value ) { wxVariant string_value = GetChoice( value.GetLong() ); - + return wxDataViewChoiceRenderer::CreateEditorCtrl( parent, labelRect, string_value ); } @@ -1510,13 +1510,13 @@ bool wxDataViewChoiceByIndexRenderer::SetValue( const wxVariant &value ) wxVariant string_value = GetChoice( value.GetLong() ); return wxDataViewChoiceRenderer::SetValue( string_value ); } - + bool wxDataViewChoiceByIndexRenderer::GetValue( wxVariant &value ) const { wxVariant string_value; if (!wxDataViewChoiceRenderer::GetValue( string_value )) return false; - + value = (long) GetChoices().Index( string_value.GetString() ); return true; } diff --git a/src/common/dcbufcmn.cpp b/src/common/dcbufcmn.cpp index ad748d6ca3..2e3d792400 100644 --- a/src/common/dcbufcmn.cpp +++ b/src/common/dcbufcmn.cpp @@ -132,7 +132,7 @@ void wxBufferedDC::UnMask() // Ensure the scale matches the device SetUserScale(1.0, 1.0); - + if ( m_style & wxBUFFER_CLIENT_AREA ) GetDeviceOrigin(&x, &y); diff --git a/src/common/dircmn.cpp b/src/common/dircmn.cpp index fb47efbb76..df10285229 100644 --- a/src/common/dircmn.cpp +++ b/src/common/dircmn.cpp @@ -377,5 +377,5 @@ bool wxDir::Remove(const wxString &dir, int flags) { return wxFileName::Rmdir(dir, flags); } - + #endif // wxUSE_LONGLONG diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index cc9045fbe0..e87361656b 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -253,7 +253,7 @@ wxRect operator*(const wxRect& r1, const wxRect& r2) } wxRealPoint::wxRealPoint(const wxPoint& pt) - : x(pt.x), y(pt.y) + : x(pt.x), y(pt.y) { } diff --git a/src/common/glcmn.cpp b/src/common/glcmn.cpp index bcefc2c8fa..94c1327432 100644 --- a/src/common/glcmn.cpp +++ b/src/common/glcmn.cpp @@ -59,7 +59,7 @@ bool wxGLCanvasBase::SetCurrent(const wxGLContext& context) const // that SetCurrent() can only be called for a shown window, so check for it wxASSERT_MSG( IsShownOnScreen(), wxT("can't make hidden GL canvas current") ); - + return context.SetCurrent(*static_cast(this)); } @@ -70,14 +70,14 @@ bool wxGLCanvasBase::SetColour(const wxString& colour) return false; #ifdef wxHAS_OPENGL_ES - wxGLAPI::glColor3f((GLfloat) (col.Red() / 256.), (GLfloat) (col.Green() / 256.), + wxGLAPI::glColor3f((GLfloat) (col.Red() / 256.), (GLfloat) (col.Green() / 256.), (GLfloat) (col.Blue() / 256.)); #else GLboolean isRGBA; glGetBooleanv(GL_RGBA_MODE, &isRGBA); if ( isRGBA ) { - glColor3f((GLfloat) (col.Red() / 256.), (GLfloat) (col.Green() / 256.), + glColor3f((GLfloat) (col.Red() / 256.), (GLfloat) (col.Green() / 256.), (GLfloat) (col.Blue() / 256.)); } else // indexed colour @@ -184,7 +184,7 @@ bool SetState( int flag, bool desired ) if ( desired ) glEnableClientState(flag); else - glDisableClientState(flag); + glDisableClientState(flag); } return former; } @@ -194,7 +194,7 @@ void RestoreState( int flag, bool desired ) if ( desired ) glEnableClientState(flag); else - glDisableClientState(flag); + glDisableClientState(flag); } #endif @@ -209,7 +209,7 @@ wxGLAPI::~wxGLAPI() { } -void wxGLAPI::glFrustum(GLfloat left, GLfloat right, GLfloat bottom, +void wxGLAPI::glFrustum(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { #if wxUSE_OPENGL_EMULATION @@ -226,12 +226,12 @@ void wxGLAPI::glBegin(GLenum mode) { wxFAIL_MSG("nested glBegin"); } - + s_mode = mode; s_texCoordsUsed = false; s_colorsUsed = false; s_normalsUsed = false; - + s_texCoords.clear(); s_normals.clear(); s_colors.clear(); @@ -248,7 +248,7 @@ void wxGLAPI::glTexCoord2f(GLfloat s, GLfloat t) { wxFAIL_MSG("glTexCoord2f called outside glBegin/glEnd"); } - + else { s_texCoordsUsed = true; @@ -271,16 +271,16 @@ void wxGLAPI::glVertex3f(GLfloat x, GLfloat y, GLfloat z) { s_texCoords.push_back(s_currentTexCoord[0]); s_texCoords.push_back(s_currentTexCoord[1]); - + s_normals.push_back(s_currentNormal[0]); s_normals.push_back(s_currentNormal[1]); s_normals.push_back(s_currentNormal[2]); - + s_colors.push_back(s_currentColor[0]); s_colors.push_back(s_currentColor[1]); s_colors.push_back(s_currentColor[2]); s_colors.push_back(s_currentColor[3]); - + s_vertices.push_back(x); s_vertices.push_back(y); s_vertices.push_back(z); @@ -298,9 +298,9 @@ void wxGLAPI::glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) else { s_normalsUsed = true; - s_currentNormal[0] = nx; - s_currentNormal[1] = ny; - s_currentNormal[2] = nz; + s_currentNormal[0] = nx; + s_currentNormal[1] = ny; + s_currentNormal[2] = nz; } #else ::glNormal3f(nx,ny,nz); @@ -328,7 +328,7 @@ void wxGLAPI::glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) void wxGLAPI::glColor3f(GLfloat r, GLfloat g, GLfloat b) { #if wxUSE_OPENGL_EMULATION - glColor4f(r,g,b,1.0); + glColor4f(r,g,b,1.0); #else ::glColor3f(r,g,b); #endif @@ -341,34 +341,34 @@ void wxGLAPI::glEnd() bool formerNormals = SetState( GL_NORMAL_ARRAY, s_normalsUsed ); bool formerTexCoords = SetState( GL_TEXTURE_COORD_ARRAY, s_texCoordsUsed ); bool formerVertex = glIsEnabled(GL_VERTEX_ARRAY); - + if( !formerVertex ) glEnableClientState(GL_VERTEX_ARRAY); - + if ( s_colorsUsed ) glColorPointer( 4, GL_FLOAT, 0, &s_colors[0] ); - + if ( s_normalsUsed ) glNormalPointer( GL_FLOAT, 0, &s_normals[0] ); - + if ( s_texCoordsUsed ) glTexCoordPointer( 2, GL_FLOAT, 0, &s_texCoords[0] ); - + glVertexPointer(3, GL_FLOAT, 0, &s_vertices[0]); glDrawArrays( s_mode, 0, s_vertices.size() / 3 ); - + if ( s_colorsUsed != formerColors ) RestoreState( GL_COLOR_ARRAY, formerColors ); - + if ( s_normalsUsed != formerNormals ) RestoreState( GL_NORMAL_ARRAY, formerColors ); - + if ( s_texCoordsUsed != formerTexCoords ) RestoreState( GL_TEXTURE_COORD_ARRAY, formerColors ); - + if( !formerVertex ) glDisableClientState(GL_VERTEX_ARRAY); - + s_mode = 0xFF; #else ::glEnd(); diff --git a/src/common/stattextcmn.cpp b/src/common/stattextcmn.cpp index 95ced81a86..a29445d7b1 100644 --- a/src/common/stattextcmn.cpp +++ b/src/common/stattextcmn.cpp @@ -169,7 +169,7 @@ void wxStaticTextBase::SetLabelText(const wxString& text) wxString wxStaticTextBase::GetLabelText(const wxString& label) { wxString ret = RemoveMarkup(label); - // always remove the markup (this function is static + // always remove the markup (this function is static // and cannot check for wxST_MARKUP presence/absence) return RemoveMnemonics(ret); diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index db9fe4be06..2f24a4a993 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -95,7 +95,7 @@ void wxDataViewColumn::Init(int width, wxAlignment align, int flags) m_sort = false; m_sortAscending = true; } - + void wxDataViewColumn::UpdateDisplay() { if (m_owner) @@ -3815,7 +3815,7 @@ void wxDataViewMainWindow::OnMouse( wxMouseEvent &event ) else if ( align & wxALIGN_BOTTOM ) rectItem.y += cell_rect.height - size.y; // else: wxALIGN_TOP is the default - } + } } wxPoint pos( event.GetPosition() ); @@ -4146,7 +4146,7 @@ int wxDataViewCtrl::GetColumnPosition( const wxDataViewColumn *column ) const if (column==col) return i; } - + return wxNOT_FOUND; #else // This returns the position in pixels which is not what we want. @@ -4248,9 +4248,9 @@ void wxDataViewCtrl::Select( const wxDataViewItem & item ) // Unselect all rows before select another in the single select mode if (m_clientArea->IsSingleSel()) m_clientArea->SelectAllRows(false); - + m_clientArea->SelectRow(row, true); - + // Also set focus to the selected item m_clientArea->ChangeCurrentRow( row ); } diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 21e941eae5..dbaaf19a54 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -1107,7 +1107,7 @@ wxString wxGenericDirCtrl::GetPath() const wxDirItemData* data = (wxDirItemData*) m_treeCtrl->GetItemData(id); return data->m_path; } - + return wxEmptyString; } diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index f1ba90db39..a77dab82d5 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -196,7 +196,7 @@ void wxSplitterWindow::OnPaint(wxPaintEvent& WXUNUSED(event)) wxPaintDC dc(this); #ifdef __WXOSX__ // as subpanels might have a transparent background we must erase the background - // at least on OSX, otherwise traces of the sash will remain + // at least on OSX, otherwise traces of the sash will remain // test with: splitter sample->replace right window dc.Clear(); #endif diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 72dd08db41..0cfebc9279 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -513,8 +513,8 @@ void wxGUIAppTraits::MutexGuiLeave() #if wxUSE_LIBHILDON || wxUSE_LIBHILDON2 // Maemo-specific method: get the main program object HildonProgram *wxApp::GetHildonProgram() -{ - return hildon_program_get_instance(); +{ + return hildon_program_get_instance(); } - + #endif // wxUSE_LIBHILDON || wxUSE_LIBHILDON2 diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index c296558642..5cbff7b1c1 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -794,7 +794,7 @@ bool wxBitmap::HasPixbuf() const void wxBitmap::SetPixbuf(GdkPixbuf* pixbuf) { UnRef(); - + if (!pixbuf) return; diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index fc63e3e4e0..3932eed912 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -142,7 +142,7 @@ int wxChoice::DoInsertItems(const wxArrayStringsAdapter & items, // the right insertion point if (m_strings) n = m_strings->Add(items[i]); - + GTKInsertComboBoxTextItem( n, items[i] ); m_clientData.Insert( NULL, n ); diff --git a/src/gtk/collpane.cpp b/src/gtk/collpane.cpp index 754de047c4..1d7817bcdb 100644 --- a/src/gtk/collpane.cpp +++ b/src/gtk/collpane.cpp @@ -204,7 +204,7 @@ bool wxCollapsiblePane::Create(wxWindow *parent, m_parent->DoAddChild( this ); PostCreation(size); - + // we should blend into our parent background const wxColour bg = parent->GetBackgroundColour(); SetBackgroundColour(bg); @@ -285,7 +285,7 @@ GdkWindow *wxCollapsiblePane::GTKGetWindow(wxArrayGdkWindows& windows) const windows.Add( m_widget->window ); return NULL; -} +} #endif // wxUSE_COLLPANE && !defined(__WXUNIVERSAL__) diff --git a/src/gtk/colordlg.cpp b/src/gtk/colordlg.cpp index 0c606ca018..eb8bdae88e 100644 --- a/src/gtk/colordlg.cpp +++ b/src/gtk/colordlg.cpp @@ -54,7 +54,7 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) #if wxUSE_LIBHILDON m_widget = hildon_color_selector_new(parentGTK); -#elif wxUSE_LIBHILDON2 // !wxUSE_LIBHILDON +#elif wxUSE_LIBHILDON2 // !wxUSE_LIBHILDON m_widget = hildon_color_chooser_dialog_new(); #else // !wxUSE_LIBHILDON && !wxUSE_LIBHILDON2 wxString title(_("Choose colour")); diff --git a/src/gtk/dataview.cpp b/src/gtk/dataview.cpp index a2dbd6ac08..96ea64b8c6 100644 --- a/src/gtk/dataview.cpp +++ b/src/gtk/dataview.cpp @@ -259,11 +259,11 @@ public: int GetIndexOf( const wxDataViewItem &parent, const wxDataViewItem &item ); virtual void OnInternalIdle(); - + protected: void InitTree(); void ScheduleRefresh(); - + wxGtkTreeModelNode *FindNode( const wxDataViewItem &item ); wxGtkTreeModelNode *FindNode( GtkTreeIter *iter ); wxGtkTreeModelNode *FindParentNode( const wxDataViewItem &item ); @@ -286,9 +286,9 @@ private: GtkTargetEntry m_dropTargetTargetEntry; wxCharBuffer m_dropTargetTargetEntryTarget; wxDataObject *m_dropDataObject; - + wxGtkDataViewModelNotifier *m_notifier; - + bool m_dirty; }; @@ -1495,7 +1495,7 @@ public: virtual void Resort(); virtual bool BeforeReset(); virtual bool AfterReset(); - + void UpdateLastCount(); private: @@ -1576,7 +1576,7 @@ void wxGtkDataViewModelNotifier::Resort() bool wxGtkDataViewModelNotifier::ItemChanged( const wxDataViewItem &item ) { GtkWxTreeModel *wxgtk_model = m_internal->GetGtkModel(); - + GtkTreeIter iter; iter.stamp = wxgtk_model->stamp; iter.user_data = (gpointer) item.GetID(); @@ -1595,7 +1595,7 @@ bool wxGtkDataViewModelNotifier::ValueChanged( const wxDataViewItem &item, unsig { GtkWxTreeModel *wxgtk_model = m_internal->GetGtkModel(); wxDataViewCtrl *ctrl = m_internal->GetOwner(); - + // This adds GTK+'s missing MVC logic for ValueChanged unsigned int index; for (index = 0; index < ctrl->GetColumnCount(); index++) @@ -1645,32 +1645,32 @@ bool wxGtkDataViewModelNotifier::AfterReset() { GtkWidget *treeview = m_internal->GetOwner()->GtkGetTreeView(); GtkWxTreeModel *wxgtk_model = m_internal->GetGtkModel(); - - m_internal->Cleared(); - + + m_internal->Cleared(); + gtk_tree_view_set_model( GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(wxgtk_model) ); - + return true; } bool wxGtkDataViewModelNotifier::Cleared() { GtkWxTreeModel *wxgtk_model = m_internal->GetGtkModel(); - + // There is no call to tell the model that everything // has been deleted so call row_deleted() for every // child of root... int count = m_internal->iter_n_children( NULL ); // number of children of root - + GtkTreePath *path = gtk_tree_path_new_first(); // points to root int i; for (i = 0; i < count; i++) gtk_tree_model_row_deleted( GTK_TREE_MODEL(wxgtk_model), path ); - + gtk_tree_path_free( path ); - + m_internal->Cleared(); return true; @@ -2641,7 +2641,7 @@ wxDataViewChoiceByIndexRenderer::wxDataViewChoiceByIndexRenderer( const wxArrayS wxDataViewChoiceRenderer( choices, mode, alignment ) { } - + void wxDataViewChoiceByIndexRenderer::GtkOnTextEdited(const gchar *itempath, const wxString& str) { wxVariant value( (long) GetChoices().Index( str ) ); @@ -2660,13 +2660,13 @@ bool wxDataViewChoiceByIndexRenderer::SetValue( const wxVariant &value ) wxVariant string_value = GetChoice( value.GetLong() ); return wxDataViewChoiceRenderer::SetValue( string_value ); } - + bool wxDataViewChoiceByIndexRenderer::GetValue( wxVariant &value ) const { wxVariant string_value; if (!wxDataViewChoiceRenderer::GetValue( string_value )) return false; - + value = (long) GetChoices().Index( string_value.GetString() ); return true; } @@ -3007,7 +3007,7 @@ void wxDataViewColumn::OnInternalIdle() { if (m_isConnected) return; - + if (GTK_WIDGET_REALIZED(GetOwner()->m_treeview)) { GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column); @@ -3017,8 +3017,8 @@ void wxDataViewColumn::OnInternalIdle() G_CALLBACK (gtk_dataview_header_button_press_callback), this); // otherwise the event will be blocked by GTK+ - gtk_tree_view_column_set_clickable( column, TRUE ); - + gtk_tree_view_column_set_clickable( column, TRUE ); + m_isConnected = true; } } @@ -3386,7 +3386,7 @@ wxDataViewCtrlInternal::wxDataViewCtrlInternal( wxDataViewCtrl *owner, wxDataVie { m_owner = owner; m_wx_model = wx_model; - + m_gtk_model = NULL; m_root = NULL; m_sort_order = GTK_SORT_ASCENDING; @@ -3397,7 +3397,7 @@ wxDataViewCtrlInternal::wxDataViewCtrlInternal( wxDataViewCtrl *owner, wxDataVie m_dropDataObject = NULL; m_dirty = false; - + m_gtk_model = wxgtk_tree_model_new(); m_gtk_model->internal = this; @@ -3409,7 +3409,7 @@ wxDataViewCtrlInternal::wxDataViewCtrlInternal( wxDataViewCtrl *owner, wxDataVie if (!m_wx_model->IsVirtualListModel()) InitTree(); - + gtk_tree_view_set_model( GTK_TREE_VIEW(m_owner->GtkGetTreeView()), GTK_TREE_MODEL(m_gtk_model) ); } @@ -3417,7 +3417,7 @@ wxDataViewCtrlInternal::~wxDataViewCtrlInternal() { m_wx_model->RemoveNotifier( m_notifier ); - // remove the model from the GtkTreeView before it gets destroyed + // remove the model from the GtkTreeView before it gets destroyed gtk_tree_view_set_model( GTK_TREE_VIEW( m_owner->GtkGetTreeView() ), NULL ); g_object_unref( m_gtk_model ); @@ -3455,7 +3455,7 @@ void wxDataViewCtrlInternal::BuildBranch( wxGtkTreeModelNode *node ) { wxDataViewItemArray children; unsigned int count = m_wx_model->GetChildren( node->GetItem(), children ); - + unsigned int pos; for (pos = 0; pos < count; pos++) { @@ -3625,11 +3625,11 @@ bool wxDataViewCtrlInternal::Cleared() delete m_root; m_root = NULL; } - + InitTree(); - + ScheduleRefresh(); - + return true; } @@ -3637,7 +3637,7 @@ void wxDataViewCtrlInternal::Resort() { if (!m_wx_model->IsVirtualListModel()) m_root->Resort(); - + ScheduleRefresh(); } @@ -3656,7 +3656,7 @@ bool wxDataViewCtrlInternal::ItemAdded( const wxDataViewItem &parent, const wxDa } ScheduleRefresh(); - + return true; } @@ -3672,7 +3672,7 @@ bool wxDataViewCtrlInternal::ItemDeleted( const wxDataViewItem &parent, const wx } ScheduleRefresh(); - + return true; } @@ -3799,7 +3799,7 @@ GtkTreePath *wxDataViewCtrlInternal::get_path( GtkTreeIter *iter ) while (node) { int pos = node->GetChildren().Index( id ); - + gtk_tree_path_prepend_index( retval, pos ); id = node->GetItem().GetID(); @@ -4538,7 +4538,7 @@ wxDataViewItem wxDataViewCtrl::GTKPathToItem(GtkTreePath *path) const void wxDataViewCtrl::OnInternalIdle() { wxWindow::OnInternalIdle(); - + m_internal->OnInternalIdle(); unsigned int cols = GetColumnCount(); @@ -4548,7 +4548,7 @@ void wxDataViewCtrl::OnInternalIdle() wxDataViewColumn *col = GetColumn( i ); col->OnInternalIdle(); } - + if (m_ensureVisibleDefered.IsOk()) { ExpandAncestors(m_ensureVisibleDefered); diff --git a/src/gtk/dnd.cpp b/src/gtk/dnd.cpp index 3662f99b2f..08adfeb885 100644 --- a/src/gtk/dnd.cpp +++ b/src/gtk/dnd.cpp @@ -148,7 +148,7 @@ static wxDragResult ConvertFromGTK(long action) case GDK_ACTION_MOVE: return wxDragMove; } - + return wxDragNone; } @@ -218,7 +218,7 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget), wxDragResult suggested_action = drop_target->GTKFigureOutSuggestedAction(); wxDragResult result = wxDragNone; - + if (drop_target->m_firstMotion) { // the first "drag_motion" event substitutes a "drag_enter" event @@ -237,18 +237,18 @@ static gboolean target_drag_motion( GtkWidget *WXUNUSED(widget), result_action = GDK_ACTION_LINK; else result_action = GDK_ACTION_MOVE; - + // is result action actually supported bool ret ((result_action != GDK_ACTION_DEFAULT) && (context->actions & result_action)); - + if (ret) gdk_drag_status( context, result_action, time ); // after this, invalidate the drop_target's GdkDragContext drop_target->GTKSetDragContext( NULL ); - // this has to be done because GDK has no "drag_enter" event + // this has to be done because GDK has no "drag_enter" event drop_target->m_firstMotion = false; return ret; @@ -281,14 +281,14 @@ static gboolean target_drag_drop( GtkWidget *widget, { // cancel the whole thing gtk_drag_finish( context, - FALSE, // no success + FALSE, // no success FALSE, // don't delete data on dropping side time ); - + drop_target->GTKSetDragContext( NULL ); - + drop_target->m_firstMotion = true; - + return FALSE; } @@ -436,7 +436,7 @@ wxDragResult wxDropTarget::GTKFigureOutSuggestedAction() { if (!m_dragContext) return wxDragError; - + // GTK+ always supposes that we want to copy the data by default while we // might want to move it, so examine not only suggested_action - which is // only good if we don't have our own preferences - but also the actions diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index 61ba78062b..b3f96071ae 100644 --- a/src/gtk/stattext.cpp +++ b/src/gtk/stattext.cpp @@ -232,7 +232,7 @@ void wxStaticText::DoSetLabel(const wxString& str) { // this function looks like GTKSetLabelForLabel() but here we just want to modify // the GTK control without altering any internal wxStaticText variable - + const wxString labelGTK = GTKConvertMnemonics(str); gtk_label_set_text_with_mnemonic(GTK_LABEL(m_widget), wxGTK_CONV(labelGTK)); } diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index 8abdba2c70..5b7f131e0b 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -246,7 +246,7 @@ wxChoice::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) // NB: use EDIT, not COMBOBOX (the latter works in XP but not Vista) attrs.colBg = wnd->MSWGetThemeColour(L"EDIT", - EP_EDITTEXT, + EP_EDITTEXT, ETS_NORMAL, ThemeColourBackground, wxSYS_COLOUR_WINDOW); diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 71fb0231df..ed4d99e456 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1466,7 +1466,7 @@ bool wxListCtrl::DeleteItem(long item) bool wxListCtrl::DeleteAllItems() { // Calling ListView_DeleteAllItems() will always generate an event but we - // shouldn't do it if the control is empty + // shouldn't do it if the control is empty return !GetItemCount() || ListView_DeleteAllItems(GetHwnd()) != 0; } diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index 1309628465..a6e5b78744 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -214,7 +214,7 @@ void wxStaticText::SetLabel(const wxString& label) } #endif // SS_ENDELLIPSIS - // save the label in m_labelOrig with both the markup (if any) and + // save the label in m_labelOrig with both the markup (if any) and // the mnemonics characters (if any) m_labelOrig = label; diff --git a/src/osx/button_osx.cpp b/src/osx/button_osx.cpp index bb6138b5c4..6c83fb16ba 100644 --- a/src/osx/button_osx.cpp +++ b/src/osx/button_osx.cpp @@ -126,7 +126,7 @@ wxBitmap wxButton::DoGetBitmap(State which) const void wxButton::DoSetBitmap(const wxBitmap& bitmap, State which) { m_bitmaps[which] = bitmap; - + if ( which == State_Normal ) m_peer->SetBitmap(bitmap); else if ( which == State_Pressed ) @@ -167,13 +167,13 @@ void wxButton::Command (wxCommandEvent & WXUNUSED(event)) void wxButton::OnEnterWindow( wxMouseEvent& WXUNUSED(event)) { if ( DoGetBitmap( State_Current ).IsOk() ) - m_peer->SetBitmap( DoGetBitmap( State_Current ) ); + m_peer->SetBitmap( DoGetBitmap( State_Current ) ); } void wxButton::OnLeaveWindow( wxMouseEvent& WXUNUSED(event)) { if ( DoGetBitmap( State_Current ).IsOk() ) - m_peer->SetBitmap( DoGetBitmap( State_Normal ) ); + m_peer->SetBitmap( DoGetBitmap( State_Normal ) ); } bool wxButton::OSXHandleClicked( double WXUNUSED(timestampsec) ) diff --git a/src/osx/carbon/bmpbuttn.cpp b/src/osx/carbon/bmpbuttn.cpp index 5862d0b1b1..a655e9cb69 100644 --- a/src/osx/carbon/bmpbuttn.cpp +++ b/src/osx/carbon/bmpbuttn.cpp @@ -73,8 +73,8 @@ public: void SetPressedBitmap( const wxBitmap& WXUNUSED(bitmap) ) { // not implemented under Carbon - } - + } + private: // helper function: returns true if the given bitmap is of one of standard // sizes supported by OS X icons diff --git a/src/osx/carbon/combobox.cpp b/src/osx/carbon/combobox.cpp index 4245f72fbc..cba75b71bf 100644 --- a/src/osx/carbon/combobox.cpp +++ b/src/osx/carbon/combobox.cpp @@ -676,7 +676,7 @@ wxTextWidgetImpl* wxComboBox::GetTextPeer() const { if (m_text) return m_text->GetTextPeer(); - + return NULL; } diff --git a/src/osx/carbon/dcprint.cpp b/src/osx/carbon/dcprint.cpp index 51cd175ff1..70dd928a39 100644 --- a/src/osx/carbon/dcprint.cpp +++ b/src/osx/carbon/dcprint.cpp @@ -74,20 +74,20 @@ wxMacCarbonPrinterDC::wxMacCarbonPrinterDC( wxPrintData* data ) { m_err = noErr ; wxOSXPrintData *native = (wxOSXPrintData*) data->GetNativeData() ; - + PMRect rPage; m_err = PMGetAdjustedPageRect(native->GetPageFormat(), &rPage); if ( m_err != noErr ) return; - + m_maxX = wxCoord(rPage.right - rPage.left) ; m_maxY = wxCoord(rPage.bottom - rPage.top); - + PMResolution res; PMPrinter printer; m_err = PMSessionGetCurrentPrinter(native->GetPrintSession(), &printer); if ( m_err == noErr ) - { + { #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 if ( PMPrinterGetOutputResolution != NULL ) { @@ -112,7 +112,7 @@ wxMacCarbonPrinterDC::wxMacCarbonPrinterDC( wxPrintData* data ) #endif } } - + m_maxX = wxCoord((double)m_maxX * res.hRes / 72.0); m_maxY = wxCoord((double)m_maxY * res.vRes / 72.0); @@ -179,7 +179,7 @@ bool wxMacCarbonPrinterDC::StartDoc( wxPrinterDC* dc , const wxString& message #endif } } - + m_maxX = wxCoord((double)m_maxX * res.hRes / 72.0); m_maxY = wxCoord((double)m_maxY * res.vRes / 72.0); @@ -231,7 +231,7 @@ void wxMacCarbonPrinterDC::StartPage( wxPrinterDC* dc ) // Core Graphics initially has the lower left of the paper as 0,0 if ( !m_err ) CGContextTranslateCTM( pageContext , (CGFloat) -paperRect.left , (CGFloat) paperRect.bottom ) ; - + // since this is a non-critical error, we set the flag back m_err = noErr ; diff --git a/src/osx/carbon/dcscreen.cpp b/src/osx/carbon/dcscreen.cpp index 6ce0de678a..cbd90382e9 100644 --- a/src/osx/carbon/dcscreen.cpp +++ b/src/osx/carbon/dcscreen.cpp @@ -94,7 +94,7 @@ wxBitmap wxScreenDCImpl::DoGetAsBitmap(const wxRect *subrect) const wxASSERT_MSG(image, wxT("wxScreenDC::GetAsBitmap - unable to get screenshot.")); CGContextDrawImage(context, srcRect, image); - + CGImageRelease(image); CGContextRestoreGState(context); diff --git a/src/osx/carbon/dialog.cpp b/src/osx/carbon/dialog.cpp index 20742be5e4..42000d9a52 100644 --- a/src/osx/carbon/dialog.cpp +++ b/src/osx/carbon/dialog.cpp @@ -30,7 +30,7 @@ void wxDialog::EndWindowModal() void wxDialog::DoShowWindowModal() { - // If someone wants to add support for this to wxOSX Carbon, here would + // If someone wants to add support for this to wxOSX Carbon, here would // be the place to start: http://trac.wxwidgets.org/ticket/9459 // Unfortunately, supporting sheets in Carbon isn't as straightforward // as with Cocoa, so it will probably take some tweaking. diff --git a/src/osx/carbon/evtloop.cpp b/src/osx/carbon/evtloop.cpp index adc340a714..255c08f0f2 100644 --- a/src/osx/carbon/evtloop.cpp +++ b/src/osx/carbon/evtloop.cpp @@ -60,7 +60,7 @@ static void DispatchAndReleaseEvent(EventRef theEvent) int wxGUIEventLoop::DoDispatchTimeout(unsigned long timeout) { wxMacAutoreleasePool autoreleasepool; - + EventRef event; OSStatus status = ReceiveNextEvent(0, NULL, timeout/1000, true, &event); switch ( status ) @@ -126,7 +126,7 @@ void wxModalEventLoop::DoRun() WindowGroupRef windowGroup = NULL; WindowGroupRef formerParentGroup = NULL; - + // make sure modal dialogs are in the right layer so that they are not covered if ( m_modalWindow != NULL ) { @@ -143,7 +143,7 @@ void wxModalEventLoop::DoRun() } m_modalWindow->SetFocus(); - + RunAppModalLoopForWindow(m_modalNativeWindow); if ( resetGroupParent ) diff --git a/src/osx/carbon/filedlg.cpp b/src/osx/carbon/filedlg.cpp index fc9bb2bba9..c6503c8b91 100644 --- a/src/osx/carbon/filedlg.cpp +++ b/src/osx/carbon/filedlg.cpp @@ -44,14 +44,14 @@ class OpenUserDataRec { public: OpenUserDataRec( wxFileDialog* dialog ); - + bool FilterCallback( AEDesc *theItem, void *info, NavFilterModes filterMode ); void EventProc( NavEventCallbackMessage inSelector, NavCBRecPtr ioParams ); int GetCurrentFilter() const {return m_currentfilter;} CFArrayRef GetMenuItems() const { return m_menuitems;} - - + + private: void EventProcCBEvent( NavCBRecPtr ioParams ); void EventProcCBEventMouseDown( NavCBRecPtr ioParams); @@ -61,7 +61,7 @@ private: void EventProcCBAdjustRect( NavCBRecPtr ioParams ); bool CheckFile( const wxString &filename , OSType type); void MakeUserDataRec( const wxString& filter); - + wxFileDialog* m_dialog; int m_currentfilter; wxString m_defaultLocation; @@ -80,13 +80,13 @@ OpenUserDataRec::OpenUserDataRec( wxFileDialog* d) m_dialog = d; m_controlAdded = false; m_saveMode = m_dialog->HasFdFlag(wxFD_SAVE); - + m_defaultLocation = m_dialog->GetDirectory(); MakeUserDataRec(m_dialog->GetWildcard()); m_currentfilter = m_dialog->GetFilterIndex(); - + m_menuitems = NULL; - + size_t numFilters = m_extensions.GetCount(); if (numFilters) { @@ -133,7 +133,7 @@ void OpenUserDataRec::EventProcCBEvent(NavCBRecPtr callBackParms) EventProcCBEventMouseDown(callBackParms); break; } - } + } } void OpenUserDataRec::EventProcCBEventMouseDown(NavCBRecPtr callBackParms) @@ -141,17 +141,17 @@ void OpenUserDataRec::EventProcCBEventMouseDown(NavCBRecPtr callBackParms) EventRecord *evt = callBackParms->eventData.eventDataParms.event; Point where = evt->where; QDGlobalToLocalPoint(GetWindowPort(callBackParms->window), &where); - + ControlRef whichControl = FindControlUnderMouse(where, callBackParms->window, NULL); if (whichControl != NULL) { ControlKind theKind; GetControlKind(whichControl, &theKind); - + // Moving the focus if we clicked in an focusable control - if ((theKind.kind == kControlKindEditUnicodeText) || - (theKind.kind == kControlKindEditText) || - (theKind.kind == kControlKindDataBrowser) || + if ((theKind.kind == kControlKindEditUnicodeText) || + (theKind.kind == kControlKindEditText) || + (theKind.kind == kControlKindDataBrowser) || (theKind.kind == kControlKindListBox)) { ControlRef currentlyFocusedControl; @@ -175,7 +175,7 @@ void OpenUserDataRec::EventProcCBStart(NavCBRecPtr ioParams) if (noErr == ::AECreateDesc(typeFSRef, &theFile, sizeof(FSRef), &theLocation)) ::NavCustomControl(ioParams->context, kNavCtlSetLocation, (void *) &theLocation); } - + if( m_extensions.GetCount() > 0 ) { NavMenuItemSpec menuItem; @@ -184,37 +184,37 @@ void OpenUserDataRec::EventProcCBStart(NavCBRecPtr ioParams) menuItem.menuType = m_currentfilter; ::NavCustomControl(ioParams->context, kNavCtlSelectCustomType, &menuItem); } - + if (m_dialog->GetExtraControl()) { m_controlAdded = true; ControlRef ref = m_dialog->GetExtraControl()->GetPeer()->GetControlRef(); NavCustomControl(ioParams->context, kNavCtlAddControl, ref); } - + } void OpenUserDataRec::EventProcCBPopupMenuSelect(NavCBRecPtr ioParams) { NavMenuItemSpec * menu = (NavMenuItemSpec *) ioParams->eventData.eventDataParms.param ; const size_t numFilters = m_extensions.GetCount(); - + if ( menu->menuType < numFilters ) { m_currentfilter = menu->menuType ; if ( m_saveMode ) { int i = menu->menuType ; - + // isolate the first extension string wxString firstExtension = m_extensions[i].BeforeFirst('|').BeforeFirst(';'); - + wxString extension = firstExtension.AfterLast('.') ; wxString sfilename ; - + wxCFStringRef cfString( wxCFRetain( NavDialogGetSaveFileName( ioParams->context ) ) ); sfilename = cfString.AsString() ; - + int pos = sfilename.Find('.', true) ; if ( pos != wxNOT_FOUND && extension != wxT("*") ) { @@ -229,21 +229,21 @@ void OpenUserDataRec::EventProcCBPopupMenuSelect(NavCBRecPtr ioParams) void OpenUserDataRec::EventProcCBCustomize(NavCBRecPtr ioParams) { wxWindow* control = m_dialog->GetExtraControl(); - + if ( control ) { SInt16 neededRight, neededBottom; - + wxSize size = m_dialog->GetExtraControl()->GetSize(); neededRight = ioParams->customRect.left + size.x; neededBottom = ioParams->customRect.top + size.y; - + if (ioParams->customRect.right == 0 && ioParams->customRect.bottom == 0) { ioParams->customRect.right = neededRight; ioParams->customRect.bottom = neededBottom; } - else + else { if ( ioParams->customRect.right != m_lastRight ) { @@ -264,10 +264,10 @@ void OpenUserDataRec::EventProcCBCustomize(NavCBRecPtr ioParams) void OpenUserDataRec::EventProcCBAdjustRect(NavCBRecPtr ioParams) { wxWindow* control = m_dialog->GetExtraControl(); - + if ( control && m_controlAdded) { - control->SetSize(ioParams->customRect.left , ioParams->customRect.top, + control->SetSize(ioParams->customRect.left , ioParams->customRect.top, ioParams->customRect.right - ioParams->customRect.left, ioParams->customRect.bottom - ioParams->customRect.top); } @@ -387,19 +387,19 @@ bool OpenUserDataRec::FilterCallback( // check if a folder is a package before deciding what to do. NavFileOrFolderInfo* theInfo = (NavFileOrFolderInfo*) info ; FSRef fsref; - + if ( theInfo->isFolder ) { // check bundle bit (using Finder Services - used by OS9 on some bundles) FSCatalogInfo catalogInfo; if (FSGetCatalogInfo (&fsref, kFSCatInfoFinderInfo, &catalogInfo, NULL, NULL, NULL) != noErr) return true; - + // Check bundle item (using Launch Services - used by OS-X through info.plist or APP) LSItemInfoRecord lsInfo; if (LSCopyItemInfoForRef(&fsref, kLSRequestBasicFlagsOnly, &lsInfo ) != noErr) return true; - + // If it's not a bundle, then it's a normal folder and it passes our filter FileInfo *fileInfo = (FileInfo *) catalogInfo.finderInfo; if ( !(fileInfo->finderFlags & kHasBundle) && @@ -416,7 +416,7 @@ bool OpenUserDataRec::FilterCallback( } } } - + return true; } @@ -467,7 +467,7 @@ wxFileDialog::wxFileDialog( void wxFileDialog::SetupExtraControls(WXWindow nativeWindow) { wxTopLevelWindow::Create( GetParent(), nativeWindow ); - + if (HasExtraControlCreator()) { CreateExtraControl(); @@ -478,7 +478,7 @@ int wxFileDialog::ShowModal() { m_paths.Empty(); m_fileNames.Empty(); - + OSErr err; NavDialogCreationOptions dialogCreateOptions; @@ -497,9 +497,9 @@ int wxFileDialog::ShowModal() NavDialogRef dialog; NavObjectFilterUPP navFilterUPP = NULL; OpenUserDataRec myData( this ); - + dialogCreateOptions.popupExtension = myData.GetMenuItems(); - + if (HasFdFlag(wxFD_SAVE)) { dialogCreateOptions.optionFlags |= kNavDontAutoTranslate; @@ -537,9 +537,9 @@ int wxFileDialog::ShowModal() (void *) &myData, // inClientData &dialog ); } - + SetupExtraControls(NavDialogGetWindow(dialog)); - + if (err == noErr) { wxDialog::OSXBeginModalDialog(); diff --git a/src/osx/carbon/font.cpp b/src/osx/carbon/font.cpp index 4b477bb8cc..360a7fa9aa 100644 --- a/src/osx/carbon/font.cpp +++ b/src/osx/carbon/font.cpp @@ -499,7 +499,7 @@ void wxFontRefData::MacFindFont() { CTFontSymbolicTraits remainingTraits = traits; const CGAffineTransform* remainingTransform = NULL; - + if( remainingTraits & kCTFontItalicTrait ) { remainingTraits &= ~kCTFontItalicTrait; @@ -515,19 +515,19 @@ void wxFontRefData::MacFindFont() } } } - + if ( fontWithTraits == NULL ) { fontWithTraits = CTFontCreateWithName( wxCFStringRef(m_info.m_faceName), m_info.m_pointSize, remainingTransform ); } - + } if ( fontWithTraits != NULL ) m_ctFont.reset(fontWithTraits); } } } - + m_cgFont.reset(CTFontCopyGraphicsFont(m_ctFont, NULL)); } @@ -886,10 +886,10 @@ NSFont* wxFont::OSXGetNSFont() const UIFont* wxFont::OSXGetUIFont() 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_uiFont); } diff --git a/src/osx/carbon/graphics.cpp b/src/osx/carbon/graphics.cpp index f82d40c8bc..1afba4921d 100644 --- a/src/osx/carbon/graphics.cpp +++ b/src/osx/carbon/graphics.cpp @@ -1545,7 +1545,7 @@ public : m_userOffset = CGContextConvertSizeToUserSpace( m_cg, CGSizeMake( 0.5 , 0.5 ) ); CGContextTranslateCTM( m_cg, m_userOffset.width , m_userOffset.height ); } - else + else { m_userOffset = CGSizeMake(0.0, 0.0); } diff --git a/src/osx/carbon/listctrl_mac.cpp b/src/osx/carbon/listctrl_mac.cpp index 859c50437f..badf111d16 100644 --- a/src/osx/carbon/listctrl_mac.cpp +++ b/src/osx/carbon/listctrl_mac.cpp @@ -2071,12 +2071,12 @@ wxListCtrl::HitTest(const wxPoint& point, int& flags, long *ptrSubItem) const WXUNUSED_UNLESS_DEBUG( OSStatus status = ) m_dbImpl->GetItemPartBounds( id, kMinColumnId + column, kDataBrowserPropertyEnclosingPart, &enclosingRect ); wxASSERT( status == noErr ); - + enclosingCGRect = CGRectMake(enclosingRect.left, enclosingRect.top, enclosingRect.right - enclosingRect.left, enclosingRect.bottom - enclosingRect.top); - + if (column >= 0) { if ( !(GetWindowStyleFlag() & wxLC_VIRTUAL ) ) @@ -2085,7 +2085,7 @@ wxListCtrl::HitTest(const wxPoint& point, int& flags, long *ptrSubItem) const if (lcItem->HasColumnInfo(column)) { wxListItem* item = lcItem->GetColumnInfo(column); - + if (item->GetMask() & wxLIST_MASK_IMAGE) { imgIndex = item->GetImage(); @@ -2101,9 +2101,9 @@ wxListCtrl::HitTest(const wxPoint& point, int& flags, long *ptrSubItem) const } } } - + calculateCGDrawingBounds(enclosingCGRect, &iconCGRect, &textCGRect, (imgIndex != -1) ); - + if ( CGRectContainsPoint( iconCGRect, click_point ) ) { flags = wxLIST_HITTEST_ONITEMICON; diff --git a/src/osx/carbon/msgdlg.cpp b/src/osx/carbon/msgdlg.cpp index 49b5bb1f5a..b0671595c9 100644 --- a/src/osx/carbon/msgdlg.cpp +++ b/src/osx/carbon/msgdlg.cpp @@ -69,8 +69,8 @@ int wxMessageDialog::ShowModal() // // if the extended text is not empty we ignore the caption // and use the message and the extended message - - + + wxString msgtitle,msgtext; if(m_extendedMessage.IsEmpty()) { @@ -266,7 +266,7 @@ int wxMessageDialog::ShowModal() } } } - + SetReturnCode(resultbutton); return resultbutton; diff --git a/src/osx/carbon/popupwin.cpp b/src/osx/carbon/popupwin.cpp index bc16c7e388..6095dc48c7 100644 --- a/src/osx/carbon/popupwin.cpp +++ b/src/osx/carbon/popupwin.cpp @@ -73,7 +73,7 @@ bool wxPopupWindow::Show(bool show) event.SetEventObject(this); HandleWindowEvent(event); } - + return true; } diff --git a/src/osx/carbon/renderer.cpp b/src/osx/carbon/renderer.cpp index 659b070891..2481dd2242 100644 --- a/src/osx/carbon/renderer.cpp +++ b/src/osx/carbon/renderer.cpp @@ -44,7 +44,7 @@ inline bool wxInPaintEvent(wxWindow* win, wxDC& dc) { return win->MacGetCGContextRef() != NULL || // wxMemoryDC's also have a valid CGContext. - dc.IsKindOf( CLASSINFO(wxMemoryDC) ); + dc.IsKindOf( CLASSINFO(wxMemoryDC) ); } @@ -304,12 +304,12 @@ void wxRendererMac::DrawSplitterSash( wxWindow *win, if ( hasMetal ) HIThemeDrawBackground(&splitterRect, &bgdrawInfo, cgContext, kHIThemeOrientationNormal); - else + else { CGContextSetFillColorWithColor(cgContext,win->GetBackgroundColour().GetCGColor()); CGContextFillRect(cgContext,splitterRect); } - + HIThemeSplitterDrawInfo drawInfo; drawInfo.version = 0; drawInfo.state = kThemeStateActive; diff --git a/src/osx/carbon/sound.cpp b/src/osx/carbon/sound.cpp index 39bb269856..3ae66a0b12 100644 --- a/src/osx/carbon/sound.cpp +++ b/src/osx/carbon/sound.cpp @@ -66,23 +66,23 @@ class wxOSXSoundManagerSoundData : public wxSoundData public: wxOSXSoundManagerSoundData(const wxString& fileName); ~wxOSXSoundManagerSoundData(); - + virtual bool Play(unsigned flags); virtual void SoundTask(); void DoStop(); protected: - SndListHandle m_hSnd; + SndListHandle m_hSnd; SndChannelPtr m_pSndChannel; }; wxOSXSoundManagerSoundData::wxOSXSoundManagerSoundData(const wxString& fileName) : m_pSndChannel(NULL) -{ +{ Str255 lpSnd ; - + wxMacStringToPascal( fileName , lpSnd ) ; - + m_hSnd = (SndListHandle) GetNamedResource('snd ', (const unsigned char *) lpSnd); } @@ -100,7 +100,7 @@ void wxOSXSoundManagerSoundData::DoStop() m_pSndChannel = NULL; wxSound::SoundStopped(this); } - + if (IsMarkedForDeletion()) delete this; } @@ -113,31 +113,31 @@ bool wxOSXSoundManagerSoundData::Play(unsigned flags) SoundComponentData data; unsigned long numframes, offset; - + ParseSndHeader((SndListHandle)m_hSnd, &data, &numframes, &offset); SndNewChannel(&m_pSndChannel, sampledSynth, initNoInterp + (data.numChannels == 1 ? initMono : initStereo), NULL); - + if(SndPlay(m_pSndChannel, (SndListHandle) m_hSnd, flags & wxSOUND_ASYNC ? 1 : 0) != noErr) return false; - + if (flags & wxSOUND_ASYNC) CreateAndStartTimer(); else DoStop(); - + return true; } void wxOSXSoundManagerSoundData::SoundTask() { SCStatus stat; - + if (SndChannelStatus((SndChannelPtr)m_pSndChannel, sizeof(SCStatus), &stat) != 0) Stop(); - + //if the sound isn't playing anymore, see if it's looped, //and if so play it again, otherwise close things up if (stat.scChannelBusy == FALSE) @@ -178,7 +178,7 @@ void wxExitQT() //Note that ExitMovies() is not necessary, but //the docs are fuzzy on whether or not TerminateQTML is ExitMovies(); - + #ifndef __WXMAC__ TerminateQTML(); #endif @@ -190,13 +190,13 @@ public: wxOSXQuickTimeSoundData(const wxString& fileName); wxOSXQuickTimeSoundData(int size, const wxByte* data); ~wxOSXQuickTimeSoundData(); - + virtual bool Play(unsigned flags); virtual void SoundTask(); virtual void DoStop(); protected: Movie m_movie; - + wxString m_sndname; //file path Handle m_soundHandle; }; @@ -204,13 +204,13 @@ protected: wxOSXQuickTimeSoundData::wxOSXQuickTimeSoundData(const wxString& fileName) : m_movie(NULL), m_soundHandle(NULL) -{ +{ m_sndname = fileName; } wxOSXQuickTimeSoundData::wxOSXQuickTimeSoundData(int size, const wxByte* data) : m_movie(NULL) -{ +{ m_soundHandle = NewHandleClear((Size)size); BlockMove(data, *m_soundHandle, size); } @@ -225,9 +225,9 @@ bool wxOSXQuickTimeSoundData::Play(unsigned flags) { if ( m_movie ) Stop(); - + m_flags = flags; - + if (!wxInitQT()) return false; @@ -240,9 +240,9 @@ bool wxOSXQuickTimeSoundData::Play(unsigned flags) long outFlags = 0; OSErr err; ComponentResult result; - + err = PtrToHand(&m_soundHandle, &dataRef, sizeof(Handle)); - + HLock(m_soundHandle); if (memcmp(&(*m_soundHandle)[8], "WAVE", 4) == 0) miComponent = OpenDefaultComponent(MovieImportType, kQTFileTypeWave); @@ -256,43 +256,43 @@ bool wxOSXQuickTimeSoundData::Play(unsigned flags) wxLogSysError(wxT("wxSound - Location in memory does not contain valid data")); return false; } - + HUnlock(m_soundHandle); m_movie = NewMovie(0); - + result = MovieImportDataRef(miComponent, dataRef, HandleDataHandlerSubType, m_movie, nil, &targetTrack, nil, &addedDuration, movieImportCreateTrack, &outFlags); - + if (result != noErr) { wxLogSysError(wxString::Format(wxT("Couldn't import movie data\nError:%i"), (int)result)); } - + SetMovieVolume(m_movie, kFullVolume); GoToBeginningOfMovie(m_movie); } else { OSErr err = noErr ; - + Handle dataRef = NULL; OSType dataRefType; - + err = QTNewDataReferenceFromFullPathCFString(wxCFStringRef(m_sndname,wxLocale::GetSystemEncoding()), (UInt32)kQTNativeDefaultPathStyle, 0, &dataRef, &dataRefType); - + wxASSERT(err == noErr); - + if (NULL != dataRef || err != noErr) { err = NewMovieFromDataRef( &m_movie, newMovieDontAskUnresolvedDataRefs , NULL, dataRef, dataRefType ); wxASSERT(err == noErr); DisposeHandle(dataRef); } - + if (err != noErr) { wxLogSysError( @@ -301,10 +301,10 @@ bool wxOSXQuickTimeSoundData::Play(unsigned flags) return false; } } - + //Start the m_movie! StartMovie(m_movie); - + if (flags & wxSOUND_ASYNC) { CreateAndStartTimer(); @@ -312,16 +312,16 @@ bool wxOSXQuickTimeSoundData::Play(unsigned flags) else { wxASSERT_MSG(!(flags & wxSOUND_LOOP), wxT("Can't loop and play syncronously at the same time")); - + //Play movie until it ends, then exit //Note that due to quicktime caching this may not always //work 100% correctly while (!IsMovieDone(m_movie)) MoviesTask(m_movie, 1); - + DoStop(); } - + return true; } diff --git a/src/osx/carbon/toolbar.cpp b/src/osx/carbon/toolbar.cpp index 35b9bd4ff8..3d19290fc4 100644 --- a/src/osx/carbon/toolbar.cpp +++ b/src/osx/carbon/toolbar.cpp @@ -1150,7 +1150,7 @@ void wxToolBar::MacUninstallNativeToolbar() { if (!m_macToolbar) return; - + WindowRef tlw = MAC_WXHWND(MacGetTopLevelWindowRef()); if (tlw) SetWindowToolbar( tlw, NULL ); diff --git a/src/osx/carbon/window.cpp b/src/osx/carbon/window.cpp index a4b78de675..831217ef94 100644 --- a/src/osx/carbon/window.cpp +++ b/src/osx/carbon/window.cpp @@ -1001,7 +1001,7 @@ void wxMacControl::GetPosition( int &x, int &y ) const x -= (int)parent.origin.x; y -= (int)parent.origin.y; } - + } void wxMacControl::GetSize( int &width, int &height ) const @@ -1358,7 +1358,7 @@ bool wxMacControl::SetBackgroundStyle(wxBackgroundStyle style) OSStatus err = HIViewChangeFeatures(m_controlRef , kHIViewIsOpaque , 0); verify_noerr( err ); } - + return true ; } @@ -1431,7 +1431,7 @@ void wxMacControl::GetRectInWindowCoords( Rect *r ) OffsetRect( r , (short) hiPoint.x , (short) hiPoint.y ) ; } } - + void wxMacControl::GetBestRect( wxRect *rect ) const { short baselineoffset; @@ -1561,6 +1561,6 @@ wxWidgetImplType* wxWidgetImpl::CreateContentView( wxNonOwnedWindow* now ) // the root control level handler if ( !now->IsNativeWindowWrapper() ) contentview->InstallEventHandler() ; - + return contentview; } diff --git a/src/osx/core/colour.cpp b/src/osx/core/colour.cpp index 39a4c09661..35114175ce 100644 --- a/src/osx/core/colour.cpp +++ b/src/osx/core/colour.cpp @@ -111,7 +111,7 @@ void wxColour::InitCGColorRef( CGColorRef col ) { m_cgColour.reset( col ); size_t noComp = CGColorGetNumberOfComponents( col ); - + const CGFloat *components = NULL; if ( noComp >= 1 && noComp <= 4 ) { @@ -130,7 +130,7 @@ void wxColour::InitFromComponents(const CGFloat* components, size_t numComponent m_red = m_green = m_blue = 0; return; } - + if ( numComponents >= 3 ) { m_red = (int)(components[0]*255+0.5); diff --git a/src/osx/core/display.cpp b/src/osx/core/display.cpp index aa292c8642..38ca6cba0c 100644 --- a/src/osx/core/display.cpp +++ b/src/osx/core/display.cpp @@ -93,7 +93,7 @@ static CGDisplayErr wxOSXGetDisplayList(CGDisplayCount maxDisplays, { CGDisplayErr error = kCGErrorSuccess; CGDisplayCount onlineCount; - + error = CGGetOnlineDisplayList(0,NULL,&onlineCount); if ( error == kCGErrorSuccess ) { @@ -108,7 +108,7 @@ static CGDisplayErr wxOSXGetDisplayList(CGDisplayCount maxDisplays, { if ( CGDisplayMirrorsDisplay(onlineDisplays[i]) != kCGNullDirectDisplay ) continue; - + if ( displays == NULL ) *displayCount += 1; else @@ -123,7 +123,7 @@ static CGDisplayErr wxOSXGetDisplayList(CGDisplayCount maxDisplays, } delete[] onlineDisplays; } - + } return error; } diff --git a/src/osx/core/evtloop_cf.cpp b/src/osx/core/evtloop_cf.cpp index a28ccf4fda..38d3233b71 100644 --- a/src/osx/core/evtloop_cf.cpp +++ b/src/osx/core/evtloop_cf.cpp @@ -221,7 +221,7 @@ void wxCFEventLoop::WakeUp() void wxMacWakeUp() { wxEventLoopBase * const loop = wxEventLoopBase::GetActive(); - + if ( loop ) loop->WakeUp(); } @@ -444,7 +444,7 @@ static size_t gs_nWaitingForGui = 0; void wxOSXThreadModuleOnInit() { - gs_critsectWaitingForGui = new wxCriticalSection(); + gs_critsectWaitingForGui = new wxCriticalSection(); gs_critsectGui = new wxCriticalSection(); gs_critsectGui->Enter(); } @@ -459,11 +459,11 @@ void wxOSXThreadModuleOnExit() gs_critsectGui->Enter(); gs_bGuiOwnedByMainThread = true; } - + gs_critsectGui->Leave(); wxDELETE(gs_critsectGui); } - + wxDELETE(gs_critsectWaitingForGui); } @@ -479,18 +479,18 @@ void wxMutexGuiEnterImpl() // this would dead lock everything... wxASSERT_MSG( !wxThread::IsMain(), wxT("main thread doesn't want to block in wxMutexGuiEnter()!") ); - + // the order in which we enter the critical sections here is crucial!! - + // set the flag telling to the main thread that we want to do some GUI { wxCriticalSectionLocker enter(*gs_critsectWaitingForGui); - + gs_nWaitingForGui++; } - + wxWakeUpMainThread(); - + // now we may block here because the main thread will soon let us in // (during the next iteration of OnIdle()) gs_critsectGui->Enter(); @@ -499,7 +499,7 @@ void wxMutexGuiEnterImpl() void wxMutexGuiLeaveImpl() { wxCriticalSectionLocker enter(*gs_critsectWaitingForGui); - + if ( wxThread::IsMain() ) { gs_bGuiOwnedByMainThread = false; @@ -509,12 +509,12 @@ void wxMutexGuiLeaveImpl() // decrement the number of threads waiting for GUI access now wxASSERT_MSG( gs_nWaitingForGui > 0, wxT("calling wxMutexGuiLeave() without entering it first?") ); - + gs_nWaitingForGui--; - + wxWakeUpMainThread(); } - + gs_critsectGui->Leave(); } @@ -522,12 +522,12 @@ void WXDLLIMPEXP_BASE wxMutexGuiLeaveOrEnter() { wxASSERT_MSG( wxThread::IsMain(), wxT("only main thread may call wxMutexGuiLeaveOrEnter()!") ); - + if ( !gs_critsectWaitingForGui ) return; - + wxCriticalSectionLocker enter(*gs_critsectWaitingForGui); - + if ( gs_nWaitingForGui == 0 ) { // no threads are waiting for GUI - so we may acquire the lock without @@ -535,7 +535,7 @@ void WXDLLIMPEXP_BASE wxMutexGuiLeaveOrEnter() if ( !wxGuiOwnedByMainThread() ) { gs_critsectGui->Enter(); - + gs_bGuiOwnedByMainThread = true; } //else: already have it, nothing to do diff --git a/src/osx/core/mimetype.cpp b/src/osx/core/mimetype.cpp index d4290039b5..fcc076a7d8 100644 --- a/src/osx/core/mimetype.cpp +++ b/src/osx/core/mimetype.cpp @@ -592,38 +592,38 @@ bool wxMimeTypesManagerImpl::GetDescription(const wxString& uti, wxString *desc) // The remaining functionality has not yet been implemented for OS X ///////////////////////////////////////////////////////////////////////////// -wxFileTypeImpl::wxFileTypeImpl() +wxFileTypeImpl::wxFileTypeImpl() { } -wxFileTypeImpl::~wxFileTypeImpl() +wxFileTypeImpl::~wxFileTypeImpl() { } // Query wxMimeTypesManagerImple to get real information for a file type -bool wxFileTypeImpl::GetExtensions(wxArrayString& extensions) const -{ - return m_manager->GetExtensions( m_uti, extensions ); +bool wxFileTypeImpl::GetExtensions(wxArrayString& extensions) const +{ + return m_manager->GetExtensions( m_uti, extensions ); } -bool wxFileTypeImpl::GetMimeType(wxString *mimeType) const -{ - return m_manager->GetMimeType( m_uti, mimeType ); +bool wxFileTypeImpl::GetMimeType(wxString *mimeType) const +{ + return m_manager->GetMimeType( m_uti, mimeType ); } -bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const -{ - return m_manager->GetMimeTypes( m_uti, mimeTypes ); +bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const +{ + return m_manager->GetMimeTypes( m_uti, mimeTypes ); } -bool wxFileTypeImpl::GetIcon(wxIconLocation *iconLoc) const -{ - return m_manager->GetIcon( m_uti, iconLoc ); +bool wxFileTypeImpl::GetIcon(wxIconLocation *iconLoc) const +{ + return m_manager->GetIcon( m_uti, iconLoc ); } -bool wxFileTypeImpl::GetDescription(wxString *desc) const -{ - return m_manager->GetDescription( m_uti, desc ); +bool wxFileTypeImpl::GetDescription(wxString *desc) const +{ + return m_manager->GetDescription( m_uti, desc ); } bool wxFileTypeImpl::GetOpenCommand(wxString *WXUNUSED(openCmd), const wxFileType::MessageParameters& WXUNUSED(params)) const diff --git a/src/osx/core/printmac.cpp b/src/osx/core/printmac.cpp index 4cf4f0cad6..ca31f2186e 100644 --- a/src/osx/core/printmac.cpp +++ b/src/osx/core/printmac.cpp @@ -164,7 +164,7 @@ void wxOSXPrintData::TransferPaperInfoFrom( const wxPrintData &data ) { PMPrinter printer; PMSessionGetCurrentPrinter(m_macPrintSession, &printer); - + wxSize papersize = wxDefaultSize; const wxPaperSize paperId = data.GetPaperId(); if ( paperId != wxPAPER_NONE && wxThePrintPaperDatabase ) @@ -180,16 +180,16 @@ void wxOSXPrintData::TransferPaperInfoFrom( 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 || fabs( height - papersize.y ) >= 5 ) { @@ -218,7 +218,7 @@ void wxOSXPrintData::TransferPaperInfoFrom( const wxPrintData &data ) const PMPaperMargins margins = { 0.0, 0.0, 0.0, 0.0 }; 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 if ( PMPaperCreateCustom != NULL) { @@ -246,7 +246,7 @@ void wxOSXPrintData::TransferPaperInfoFrom( const wxPrintData &data ) } } } - + PMSetCopies( m_macPrintSettings , data.GetNoCopies() , false ) ; PMSetCollate(m_macPrintSettings, data.GetCollate()); if ( data.IsOrientationReversed() ) @@ -255,7 +255,7 @@ void wxOSXPrintData::TransferPaperInfoFrom( const wxPrintData &data ) else PMSetOrientation( m_macPageFormat , ( data.GetOrientation() == wxLANDSCAPE ) ? kPMLandscape : kPMPortrait , false ) ; - + PMDuplexMode mode = 0 ; switch( data.GetDuplex() ) { @@ -271,8 +271,8 @@ void wxOSXPrintData::TransferPaperInfoFrom( const wxPrintData &data ) break ; } PMSetDuplex( m_macPrintSettings, mode ) ; - - + + if ( data.IsOrientationReversed() ) PMSetOrientation( m_macPageFormat , ( data.GetOrientation() == wxLANDSCAPE ) ? kPMReverseLandscape : kPMReversePortrait , false ) ; @@ -305,7 +305,7 @@ void wxOSXPrintData::TransferResolutionFrom( const wxPrintData &data ) PMSetResolution( m_macPageFormat, &res); #endif } - + free(resolutions); } } @@ -315,10 +315,10 @@ bool wxOSXPrintData::TransferFrom( const wxPrintData &data ) TransferPrinterNameFrom(data); TransferPaperInfoFrom(data); TransferResolutionFrom(data); - + // 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, @@ -355,7 +355,7 @@ void wxOSXPrintData::TransferPaperInfoTo( wxPrintData &data ) err = PMGetCopies( m_macPrintSettings , &copies ) ; if ( err == noErr ) data.SetNoCopies( copies ) ; - + PMOrientation orientation ; err = PMGetOrientation( m_macPageFormat , &orientation ) ; if ( err == noErr ) @@ -371,12 +371,12 @@ void wxOSXPrintData::TransferPaperInfoTo( wxPrintData &data ) data.SetOrientationReversed( orientation == kPMReverseLandscape ); } } - + Boolean collate; if (PMGetCollate(m_macPrintSettings, &collate) == noErr) data.SetCollate(collate); - - + + PMDuplexMode mode = 0 ; PMGetDuplex( m_macPrintSettings, &mode ) ; switch( mode ) @@ -392,11 +392,11 @@ void wxOSXPrintData::TransferPaperInfoTo( wxPrintData &data ) data.SetDuplex(wxDUPLEX_SIMPLEX); break ; } - + double height, width; PMPaperGetHeight(m_macPaper, &height); PMPaperGetWidth(m_macPaper, &width); - + wxSize sz((int)(width * pt2mm + 0.5 ) , (int)(height * pt2mm + 0.5 )); data.SetPaperSize(sz); @@ -445,7 +445,7 @@ void wxOSXPrintData::TransferResolutionTo( wxPrintData &data ) data.SetQuality((((i + 1) * 3) / resCount) + wxPRINT_QUALITY_DRAFT); } free(resolutions); - } + } } bool wxOSXPrintData::TransferTo( wxPrintData &data ) diff --git a/src/osx/core/sound.cpp b/src/osx/core/sound.cpp index 13ba208036..ace90c2fde 100644 --- a/src/osx/core/sound.cpp +++ b/src/osx/core/sound.cpp @@ -38,21 +38,21 @@ public: wxOSXAudioToolboxSoundData(const wxString& fileName); ~wxOSXAudioToolboxSoundData(); - + virtual bool Play(unsigned flags); virtual void DoStop(); protected: static void CompletionCallback(SystemSoundID mySSID, void * soundRef); void SoundCompleted(); - - SystemSoundID m_soundID; + + SystemSoundID m_soundID; wxString m_sndname; //file path }; wxOSXAudioToolboxSoundData::wxOSXAudioToolboxSoundData(const wxString& fileName) : m_soundID(NULL) -{ +{ m_sndname = fileName; } @@ -66,9 +66,9 @@ wxOSXAudioToolboxSoundData::CompletionCallback(SystemSoundID WXUNUSED(mySSID), void * soundRef) { wxOSXAudioToolboxSoundData* data = (wxOSXAudioToolboxSoundData*) soundRef; - + data->SoundCompleted(); - + if (data->IsMarkedForDeletion()) delete data; } @@ -79,10 +79,10 @@ void wxOSXAudioToolboxSoundData::SoundCompleted() { if (m_flags & wxSOUND_LOOP) AudioServicesPlaySystemSound(m_soundID); - else + else Stop(); } - else + else { Stop(); CFRunLoopStop(CFRunLoopGetCurrent()); @@ -96,7 +96,7 @@ void wxOSXAudioToolboxSoundData::DoStop() { AudioServicesDisposeSystemSoundID (m_soundID); m_soundID = NULL; - + wxSound::SoundStopped(this); } } @@ -106,7 +106,7 @@ bool wxOSXAudioToolboxSoundData::Play(unsigned flags) Stop(); m_flags = flags; - + wxCFRef cfMutableString(CFStringCreateMutableCopy(NULL, 0, wxCFStringRef(m_sndname))); CFStringNormalize(cfMutableString,kCFStringNormalizationFormD); wxCFRef url(CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfMutableString , kCFURLPOSIXPathStyle, false)); @@ -120,12 +120,12 @@ bool wxOSXAudioToolboxSoundData::Play(unsigned flags) if ( sync ) { - while( m_soundID ) + while( m_soundID ) { CFRunLoopRun(); } } - + return true; } @@ -139,7 +139,7 @@ bool wxSound::Create(int WXUNUSED(size), const wxByte* WXUNUSED(data)) bool wxSound::Create(const wxString& fileName, bool isResource) { wxCHECK_MSG( !isResource, false, "not implemented" ); - + m_data = new wxOSXAudioToolboxSoundData(fileName); return true; } diff --git a/src/osx/dialog_osx.cpp b/src/osx/dialog_osx.cpp index a63744bf56..05da19bcc8 100644 --- a/src/osx/dialog_osx.cpp +++ b/src/osx/dialog_osx.cpp @@ -102,7 +102,7 @@ bool wxDialog::Show(bool show) // nothing to do return false; } - else + else { if ( !wxDialogBase::Show(show) ) // nothing to do @@ -122,14 +122,14 @@ bool wxDialog::Show(bool show) { case wxDIALOG_MODALITY_WINDOW_MODAL: EndWindowModal(); // OS X implementation method for cleanup - SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); + SendWindowModalDialogEvent ( wxEVT_WINDOW_MODAL_DIALOG_CLOSED ); break; default: break; } m_modality = wxDIALOG_MODALITY_NONE; } - + return true; } @@ -137,27 +137,27 @@ bool wxDialog::Show(bool show) int wxDialog::ShowModal() { m_modality = wxDIALOG_MODALITY_APP_MODAL; - + Show(); wxModalEventLoop modalLoop(this); m_eventLoop = &modalLoop; - + wxDialog::OSXBeginModalDialog(); modalLoop.Run(); wxDialog::OSXEndModalDialog(); - + m_eventLoop = NULL; - + return GetReturnCode(); } void wxDialog::ShowWindowModal() { m_modality = wxDIALOG_MODALITY_WINDOW_MODAL; - + Show(); - + DoShowWindowModal(); } @@ -172,7 +172,7 @@ void wxDialog::EndModal(int retCode) { if ( m_eventLoop ) m_eventLoop->Exit(retCode); - + SetReturnCode(retCode); Show(false); } diff --git a/src/osx/nonownedwnd_osx.cpp b/src/osx/nonownedwnd_osx.cpp index c5c7419c20..213188d146 100644 --- a/src/osx/nonownedwnd_osx.cpp +++ b/src/osx/nonownedwnd_osx.cpp @@ -52,14 +52,14 @@ static MacWindowMap wxWinMacWindowList; wxNonOwnedWindow* wxNonOwnedWindow::GetFromWXWindow( WXWindow win ) { wxNonOwnedWindowImpl* impl = wxNonOwnedWindowImpl::FindFromWXWindow(win); - + return ( impl != NULL ? impl->GetWXPeer() : NULL ) ; } wxNonOwnedWindowImpl* wxNonOwnedWindowImpl::FindFromWXWindow (WXWindow window) { MacWindowMap::iterator node = wxWinMacWindowList.find(window); - + return (node == wxWinMacWindowList.end()) ? NULL : node->second; } @@ -81,7 +81,7 @@ void wxNonOwnedWindowImpl::Associate( WXWindow window, wxNonOwnedWindowImpl *imp // adding NULL WindowRef is (first) surely a result of an error and // nothing else :-) wxCHECK_RET( window != (WXWindow) NULL, wxT("attempt to add a NULL WindowRef to window list") ); - + wxWinMacWindowList[window] = impl; } @@ -151,9 +151,9 @@ bool wxNonOwnedWindow::Create(wxWindow *parent, WXWindow nativeWindow) { if ( parent ) parent->AddChild(this); - + SubclassWin(nativeWindow); - + return true; } @@ -174,8 +174,8 @@ void wxNonOwnedWindow::UnsubclassWin() if ( GetParent() ) GetParent()->RemoveChild(this); - - wxNonOwnedWindowImpl::RemoveAssociations(m_nowpeer) ; + + wxNonOwnedWindowImpl::RemoveAssociations(m_nowpeer) ; wxDELETE(m_nowpeer); wxDELETE(m_peer); m_isNativeWindowWrapper = false; @@ -200,7 +200,7 @@ wxNonOwnedWindow::~wxNonOwnedWindow() bool wxNonOwnedWindow::Destroy() { WillBeDestroyed(); - + return wxWindow::Destroy(); } @@ -266,9 +266,9 @@ void wxNonOwnedWindow::SetWindowStyleFlag(long flags) { if (flags == GetWindowStyleFlag()) return; - + wxWindow::SetWindowStyleFlag(flags); - + if (m_nowpeer) m_nowpeer->SetWindowStyleFlag(flags); } @@ -456,7 +456,7 @@ void wxNonOwnedWindow::DoGetClientSize( int *width, int *height ) const int left, top, w, h; m_nowpeer->GetContentArea(left, top, w, h); - + if (width) *width = w ; if (height) @@ -485,7 +485,7 @@ bool wxNonOwnedWindow::DoSetShape(const wxRegion& region) wxT("Shaped windows must be created with the wxFRAME_SHAPED style.")); m_shape = region; - + // The empty region signifies that the shape // should be removed from the window. if ( region.IsEmpty() ) diff --git a/src/osx/sound_osx.cpp b/src/osx/sound_osx.cpp index ba1f6bb943..65492d2b28 100644 --- a/src/osx/sound_osx.cpp +++ b/src/osx/sound_osx.cpp @@ -2,7 +2,7 @@ // Name: src/osx/sound_osx.cpp // Purpose: wxSound class common osx code // Author: Stefan Csomor -// Modified by: +// Modified by: // Created: 2009-09-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor @@ -35,20 +35,20 @@ public: : m_sound(snd) { } - + virtual ~wxSoundTimer() { Stop(); if (m_sound) m_sound->DoStop(); } - + void Notify() { if (m_sound) m_sound->SoundTask(); } - + protected: wxSoundData* m_sound; }; @@ -90,7 +90,7 @@ void wxSoundData::CreateAndStartTimer() m_pTimer->Start(MOVIE_DELAY, wxTIMER_CONTINUOUS); } -wxSound::wxSound() +wxSound::wxSound() { Init(); } @@ -122,7 +122,7 @@ wxSound::~wxSound() break; } } - + if (isPlaying) m_data->MarkForDeletion(); else @@ -142,7 +142,7 @@ bool wxSound::DoPlay(unsigned flags) const if ( !m_data->Play(flags) ) s_soundsPlaying.pop_back(); } - + return false; } @@ -166,7 +166,7 @@ void wxSound::SoundStopped(const wxSoundData* data) for ( wxVector::iterator s = s_soundsPlaying.begin(); s != s_soundsPlaying.end(); ++s ) { - if ( (*s) == data ) + if ( (*s) == data ) { s_soundsPlaying.erase(s); break; diff --git a/src/osx/textctrl_osx.cpp b/src/osx/textctrl_osx.cpp index a9552e5e6f..ff1a28f48d 100644 --- a/src/osx/textctrl_osx.cpp +++ b/src/osx/textctrl_osx.cpp @@ -117,13 +117,13 @@ bool wxTextCtrl::Create( wxWindow *parent, m_peer = wxWidgetImpl::CreateTextControl( this, GetParent(), GetId(), str, pos, size, style, GetExtraStyle() ); MacPostControlCreate(pos, size) ; - + #if wxOSX_USE_COCOA // under carbon everything can already be set before the MacPostControlCreate embedding takes place // but under cocoa for single line textfields this only works after everything has been set up GetTextPeer()->SetStringValue(str); #endif - + // only now the embedding is correct and we can do a positioning update MacSuperChangedPosition() ; @@ -206,7 +206,7 @@ wxSize wxTextCtrl::DoGetBestSize() const if (size.x > 0 && size.y > 0) return size; } - + int wText, hText; // these are the numbers from the HIG: @@ -292,7 +292,7 @@ void wxTextCtrl::Copy() { if (CanCopy()) { - wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_COPY, GetId()); + wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_COPY, GetId()); evt.SetEventObject(this); if (!GetEventHandler()->ProcessEvent(evt)) { @@ -305,7 +305,7 @@ void wxTextCtrl::Cut() { if (CanCut()) { - wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_CUT, GetId()); + wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_CUT, GetId()); evt.SetEventObject(this); if (!GetEventHandler()->ProcessEvent(evt)) { @@ -320,7 +320,7 @@ void wxTextCtrl::Paste() { if (CanPaste()) { - wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_PASTE, GetId()); + wxClipboardTextEvent evt(wxEVT_COMMAND_TEXT_PASTE, GetId()); evt.SetEventObject(this); if (!GetEventHandler()->ProcessEvent(evt)) { diff --git a/src/osx/textentry_osx.cpp b/src/osx/textentry_osx.cpp index 9fad59280c..5f51fca1b7 100644 --- a/src/osx/textentry_osx.cpp +++ b/src/osx/textentry_osx.cpp @@ -151,7 +151,7 @@ void wxTextEntry::Remove(long from, long to) EventsSuppressor noevents(this); GetTextPeer()->Remove( from , to ); } - + SendTextUpdatedEventIfAllowed(); } diff --git a/src/osx/toplevel_osx.cpp b/src/osx/toplevel_osx.cpp index b96d3a0ecc..ae5df2881b 100644 --- a/src/osx/toplevel_osx.cpp +++ b/src/osx/toplevel_osx.cpp @@ -88,9 +88,9 @@ bool wxTopLevelWindowMac::Create(wxWindow *parent, { if ( !wxNonOwnedWindow::Create(parent, nativeWindow ) ) return false; - + wxTopLevelWindows.Append(this); - + return true; } @@ -124,7 +124,7 @@ bool wxTopLevelWindowMac::IsMaximized() const { if ( m_nowpeer == NULL ) return false; - + return m_nowpeer->IsMaximized(); } @@ -180,7 +180,7 @@ void wxTopLevelWindowMac::ShowWithoutActivating() return; m_nowpeer->ShowWithoutActivating(); - + // TODO: Should we call EVT_SIZE here? } diff --git a/src/osx/utils_osx.cpp b/src/osx/utils_osx.cpp index 7e1b9c3b14..251332d88c 100644 --- a/src/osx/utils_osx.cpp +++ b/src/osx/utils_osx.cpp @@ -98,7 +98,7 @@ bool wxLaunchDefaultApplication(const wxString& document, int flags) CFStringNormalize(cfMutableString,kCFStringNormalizationFormD); wxCFRef curl(CFURLCreateWithFileSystemPath(kCFAllocatorDefault, cfMutableString , kCFURLPOSIXPathStyle, false)); OSStatus err = LSOpenCFURLRef( curl , NULL ); - + if (err == noErr) { return true; diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index 28819bcf79..850016e812 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -487,7 +487,7 @@ void wxPGTextCtrlEditor_OnFocus( wxPGProperty* property, { // Make sure there is correct text (instead of unspecified value // indicator or hint text) - int flags = property->HasFlag(wxPG_PROP_READONLY) ? + int flags = property->HasFlag(wxPG_PROP_READONLY) ? 0 : wxPG_EDITABLE_VALUE; wxString correctText = property->GetValueAsString(flags); @@ -499,7 +499,7 @@ void wxPGTextCtrlEditor_OnFocus( wxPGProperty* property, tc->SetSelection(-1,-1); } - + void wxPGTextCtrlEditor::OnFocus( wxPGProperty* property, wxWindow* wnd ) const { @@ -1806,7 +1806,7 @@ void wxPropertyGrid::CorrectEditorWidgetPosY() m_labelEditor->Move(pos.x, r.y + offset); } - if ( m_wndEditor || m_wndEditor2 ) + if ( m_wndEditor || m_wndEditor2 ) { wxRect r = GetEditorWidgetRect(selected, 1); diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 3b9837b602..7c7788b5a6 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -2554,7 +2554,7 @@ wxRect wxPropertyGrid::GetPropertyRect( const wxPGProperty* p1, const wxPGProper // // Return rect which encloses the given property range // (in logical grid coordinates) - // + // int visTop = p1->GetY(); int visBottom; @@ -5189,7 +5189,7 @@ bool wxPropertyGrid::HandleMouseUp( int x, unsigned int WXUNUSED(y), // Disable splitter auto-centering (but only if moved any - // otherwise we end up disabling auto-center even after a // recentering double-click). - int posDiff = abs(m_startingSplitterX - + int posDiff = abs(m_startingSplitterX - GetSplitterPosition(m_draggedSplitter)); if ( posDiff > 1 ) diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 0cb64112b5..cdb43bffdf 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -2153,7 +2153,7 @@ void wxPGArrayEditorDialog::OnAddClick(wxCommandEvent& event) wxListCtrl* lc = m_elb->GetListCtrl(); int newItemIndex = lc->GetItemCount() - 1; - if ( m_hasCustomNewAction ) + if ( m_hasCustomNewAction ) { wxString str; if ( OnCustomNewAction(&str) ) diff --git a/src/ribbon/art_aui.cpp b/src/ribbon/art_aui.cpp index d127da85bc..2c7d56de42 100644 --- a/src/ribbon/art_aui.cpp +++ b/src/ribbon/art_aui.cpp @@ -864,7 +864,7 @@ void wxRibbonAUIArtProvider::DrawGalleryBackground( dc.SetPen(m_gallery_border_pen); dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height); - + DrawGalleryBackgroundCommon(dc, wnd, rect); } @@ -1122,7 +1122,7 @@ void wxRibbonAUIArtProvider::DrawTool( avail_width -= 8; if(is_split_hybrid) { - dc.DrawLine(rect.x + avail_width + 1, rect.y, + dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height); } dc.DrawBitmap(m_toolbar_drop_bitmap, bg_rect.x + avail_width + 2, diff --git a/src/ribbon/art_internal.cpp b/src/ribbon/art_internal.cpp index 0e641024ec..b74d33e3a5 100644 --- a/src/ribbon/art_internal.cpp +++ b/src/ribbon/art_internal.cpp @@ -153,7 +153,7 @@ wxRibbonHSLColour::wxRibbonHSLColour(const wxColour& col) hue += 120.0; } else // Max == blue - { + { hue = 60.0 * (red - green) / (Max - Min); hue += 240.0; } diff --git a/src/ribbon/art_msw.cpp b/src/ribbon/art_msw.cpp index 562c89772a..e659ed6bc6 100644 --- a/src/ribbon/art_msw.cpp +++ b/src/ribbon/art_msw.cpp @@ -193,9 +193,9 @@ void wxRibbonMSWArtProvider::SetColourScheme( m_tab_ctrl_background_brush = LikePrimary(1.0, 0.39, 0.07); m_tab_hover_background_colour = LikePrimary(1.3, 0.15, 0.10); m_tab_hover_background_top_colour = LikePrimary(1.4, 0.36, 0.08); - m_tab_border_pen = LikePrimary(1.4, 0.03, -0.05); + m_tab_border_pen = LikePrimary(1.4, 0.03, -0.05); m_tab_separator_gradient_colour = LikePrimary(1.7, -0.15, -0.18); - m_tab_hover_background_top_gradient_colour = LikePrimary(1.8, 0.34, 0.13); + m_tab_hover_background_top_gradient_colour = LikePrimary(1.8, 0.34, 0.13); m_tab_label_colour = LikePrimary(4.3, 0.13, -0.49); m_tab_hover_background_gradient_colour = LikeSecondary(-1.5, -0.34, 0.01); @@ -214,7 +214,7 @@ void wxRibbonMSWArtProvider::SetColourScheme( m_panel_minimised_label_colour = m_tab_label_colour; m_gallery_button_disabled_background_colour = LikePrimary(-2.8, -0.46, 0.09); - m_gallery_button_disabled_background_top_brush = LikePrimary(-2.8, -0.36, 0.15); + m_gallery_button_disabled_background_top_brush = LikePrimary(-2.8, -0.36, 0.15); m_gallery_hover_background_brush = LikePrimary(-0.8, 0.05, 0.15); m_gallery_border_pen = LikePrimary(0.7, -0.02, 0.03); m_gallery_button_background_top_brush = LikePrimary(0.8, 0.34, 0.13); @@ -234,7 +234,7 @@ void wxRibbonMSWArtProvider::SetColourScheme( m_gallery_button_active_background_colour = LikeSecondary(-9.9, 0.03, -0.22); m_gallery_button_active_background_gradient_colour = LikeSecondary(-9.5, 0.14, -0.11); m_gallery_button_active_background_top_brush = LikeSecondary(-9.0, 0.15, -0.08); - + m_button_bar_label_colour = m_tab_label_colour; m_button_bar_hover_border_pen = LikeSecondary(-6.2, -0.47, -0.14); m_button_bar_hover_background_gradient_colour = LikeSecondary(-0.6, 0.16, 0.04); @@ -324,7 +324,7 @@ void wxRibbonMSWArtProvider::CloneTo(wxRibbonMSWArtProvider* copy) const copy->m_button_bar_active_background_top_colour = m_button_bar_active_background_top_colour; copy->m_button_bar_active_background_top_gradient_colour = m_button_bar_active_background_top_gradient_colour; copy->m_gallery_button_background_colour = m_gallery_button_background_colour; - copy->m_gallery_button_background_gradient_colour = m_gallery_button_background_gradient_colour; + copy->m_gallery_button_background_gradient_colour = m_gallery_button_background_gradient_colour; copy->m_gallery_button_hover_background_colour = m_gallery_button_hover_background_colour; copy->m_gallery_button_hover_background_gradient_colour = m_gallery_button_hover_background_gradient_colour; copy->m_gallery_button_active_background_colour = m_gallery_button_active_background_colour; @@ -1791,13 +1791,13 @@ void wxRibbonMSWArtProvider::DrawMinimisedPanel( client_rect.width -= 2; client_rect.y++; client_rect.height = (rect.y + rect.height / 5) - client_rect.x; - dc.GradientFillLinear(client_rect, + dc.GradientFillLinear(client_rect, m_panel_active_background_top_colour, m_panel_active_background_top_gradient_colour, wxSOUTH); client_rect.y += client_rect.height; client_rect.height = (true_rect.y + true_rect.height) - client_rect.y; - dc.GradientFillLinear(client_rect, + dc.GradientFillLinear(client_rect, m_panel_active_background_colour, m_panel_active_background_gradient_colour, wxSOUTH); } @@ -1906,7 +1906,7 @@ void wxRibbonMSWArtProvider::DrawMinimisedPanelCommon( dc.SetTextForeground(m_panel_minimised_label_colour); dc.DrawText(wnd->GetLabel(), xpos, ypos); - + wxPoint arrow_points[3]; if(m_flags & wxRIBBON_BAR_FLOW_VERTICAL) @@ -2168,7 +2168,7 @@ void wxRibbonMSWArtProvider::DrawButtonBarButtonForeground( dc.DrawText(label_bottom, iX, ypos); if(arrow_width != 0) { - DrawDropdownArrow(dc, + DrawDropdownArrow(dc, iX + 2 +label_w - arrow_width, ypos + label_h / 2 + 1, m_button_bar_label_colour); @@ -2291,7 +2291,7 @@ void wxRibbonMSWArtProvider::DrawTool( dc.SetBrush(B); dc.DrawRectangle(nonrect.x, nonrect.y, nonrect.width, nonrect.height); } - + // Border dc.SetPen(m_toolbar_border_pen); if(state & wxRIBBON_TOOLBAR_TOOL_FIRST) @@ -2300,7 +2300,7 @@ void wxRibbonMSWArtProvider::DrawTool( dc.DrawPoint(rect.x + 1, rect.y + rect.height - 2); } else - dc.DrawLine(rect.x, rect.y + 1, rect.x, rect.y + rect.height - 1); + dc.DrawLine(rect.x, rect.y + 1, rect.x, rect.y + rect.height - 1); if(state & wxRIBBON_TOOLBAR_TOOL_LAST) { @@ -2315,7 +2315,7 @@ void wxRibbonMSWArtProvider::DrawTool( avail_width -= 8; if(is_split_hybrid) { - dc.DrawLine(rect.x + avail_width + 1, rect.y, + dc.DrawLine(rect.x + avail_width + 1, rect.y, rect.x + avail_width + 1, rect.y + rect.height); } dc.DrawBitmap(m_toolbar_drop_bitmap, bg_rect.x + avail_width + 2, @@ -2506,7 +2506,7 @@ wxSize wxRibbonMSWArtProvider::GetGalleryClientSize( scroll_down.y = scroll_up.y; scroll_down.height = scroll_up.height; scroll_down.x = scroll_up.x + scroll_up.width; - scroll_down.width = scroll_up.width; + scroll_down.width = scroll_up.width; extension.y = scroll_down.y; extension.height = scroll_down.height; extension.x = scroll_down.x + scroll_down.width; @@ -2524,7 +2524,7 @@ wxSize wxRibbonMSWArtProvider::GetGalleryClientSize( scroll_down.x = scroll_up.x; scroll_down.width = scroll_up.width; scroll_down.y = scroll_up.y + scroll_up.height; - scroll_down.height = scroll_up.height; + scroll_down.height = scroll_up.height; extension.x = scroll_down.x; extension.width = scroll_down.width; extension.y = scroll_down.y + scroll_down.height; @@ -2532,7 +2532,7 @@ wxSize wxRibbonMSWArtProvider::GetGalleryClientSize( size.DecBy(16, 1); size.DecBy( 2, 1); } - + if(client_offset != NULL) *client_offset = wxPoint(2, 1); if(scroll_up_button != NULL) diff --git a/src/ribbon/buttonbar.cpp b/src/ribbon/buttonbar.cpp index ce05643b12..543e8385c9 100644 --- a/src/ribbon/buttonbar.cpp +++ b/src/ribbon/buttonbar.cpp @@ -258,7 +258,7 @@ wxRibbonButtonBarButtonBase* wxRibbonButtonBar::AddHybridButton( return AddButton(button_id, label, bitmap, help_string, wxRIBBON_BUTTON_HYBRID); } - + wxRibbonButtonBarButtonBase* wxRibbonButtonBar::AddButton( int button_id, const wxString& label, @@ -585,7 +585,7 @@ void wxRibbonButtonBar::OnPaint(wxPaintEvent& WXUNUSED(evt)) bitmap_small = &base->bitmap_small_disabled; } wxRect rect(button.position + m_layout_offset, base->sizes[button.size].size); - + m_art->DrawButtonBarButton(dc, this, rect, base->kind, base->state | button.size, base->label, *bitmap, *bitmap_small); } diff --git a/src/ribbon/panel.cpp b/src/ribbon/panel.cpp index a590c9b8f0..ca0af0601e 100644 --- a/src/ribbon/panel.cpp +++ b/src/ribbon/panel.cpp @@ -248,7 +248,7 @@ void wxRibbonPanel::DoSetSize(int x, int y, int width, int height, int sizeFlags Refresh(); } - + wxRibbonControl::DoSetSize(x, y, width, height, sizeFlags); } @@ -258,7 +258,7 @@ bool wxRibbonPanel::IsMinimised(wxSize at_size) const return false; return (at_size.GetX() <= m_minimised_size.GetX() && - at_size.GetY() <= m_minimised_size.GetY()) || + at_size.GetY() <= m_minimised_size.GetY()) || at_size.GetX() < m_smallest_unminimised_size.GetX() || at_size.GetY() < m_smallest_unminimised_size.GetY(); } diff --git a/src/ribbon/toolbar.cpp b/src/ribbon/toolbar.cpp index 9e8839bc92..475db49bf0 100644 --- a/src/ribbon/toolbar.cpp +++ b/src/ribbon/toolbar.cpp @@ -596,7 +596,7 @@ void wxRibbonToolBar::OnMouseMove(wxMouseEvent& evt) what = wxRIBBON_TOOLBAR_TOOL_DROPDOWN_HOVERED; new_hover->state |= what; - + if(new_hover == m_active_tool) { new_hover->state &= ~wxRIBBON_TOOLBAR_TOOL_ACTIVE_MASK; diff --git a/src/richtext/richtextbuffer.cpp b/src/richtext/richtextbuffer.cpp index 9acc9bd0f4..ce200c47e9 100644 --- a/src/richtext/richtextbuffer.cpp +++ b/src/richtext/richtextbuffer.cpp @@ -111,13 +111,13 @@ public: static int SearchAdjacentRect(const wxRichTextFloatRectMapArray& array, int point); static int GetWidthFromFloatRect(const wxRichTextFloatRectMapArray& array, int index, int startY, int endY); - + static void FreeFloatRectMapArray(wxRichTextFloatRectMapArray& array); static void DrawFloat(const wxRichTextFloatRectMapArray& array, wxDC& dc, const wxRichTextRange& range, const wxRichTextRange& selectionRange, const wxRect& rect, int descent, int style); static int HitTestFloat(const wxRichTextFloatRectMapArray& array, wxDC& WXUNUSED(dc), const wxPoint& pt, long& textPosition); - + private: wxRichTextFloatRectMapArray m_left; wxRichTextFloatRectMapArray m_right; @@ -267,7 +267,7 @@ void wxRichTextFloatCollector::CollectFloat(wxRichTextParagraph* para) while (node) { wxRichTextObject* floating = node->GetData(); - + if (floating->IsFloating()) { wxRichTextAnchoredObject* anchor = wxDynamicCast(floating, wxRichTextAnchoredObject); @@ -276,7 +276,7 @@ void wxRichTextFloatCollector::CollectFloat(wxRichTextParagraph* para) CollectFloat(para, floating); } } - + node = node->GetNext(); } @@ -369,7 +369,7 @@ int wxRichTextFloatCollector::HitTestFloat(const wxRichTextFloatRectMapArray& ar else return wxRICHTEXT_HITTEST_AFTER; } - + return wxRICHTEXT_HITTEST_NONE; } @@ -383,7 +383,7 @@ int wxRichTextFloatCollector::HitTest(wxDC& dc, const wxPoint& pt, long& textPos return ret; } -// Helpers for efficiency +// Helpers for efficiency inline void wxCheckSetFont(wxDC& dc, const wxFont& font) { // JACS: did I do this some time ago when testing? Should we re-enable it? @@ -438,7 +438,7 @@ void wxRichTextAnchoredObjectAttr::Init() m_unitsW = wxRICHTEXT_PX; m_unitsH = wxRICHTEXT_PX; - + // Unspecified to begin with (use actual image size) m_width = -1; m_height = -1; @@ -952,7 +952,7 @@ bool wxRichTextParagraphLayoutBox::UpdateFloatingObjects(int width, wxRichTextOb m_floatCollector->CollectFloat(child); node = node->GetNext(); } - + return true; } @@ -962,7 +962,7 @@ int wxRichTextParagraphLayoutBox::HitTest(wxDC& dc, const wxPoint& pt, long& tex int ret = wxRICHTEXT_HITTEST_NONE; if (m_floatCollector) ret = m_floatCollector->HitTest(dc, pt, textPosition); - + if (ret == wxRICHTEXT_HITTEST_NONE) return wxRichTextCompositeObject::HitTest(dc, pt, textPosition); else @@ -5002,7 +5002,7 @@ void wxRichTextParagraph::LayoutFloat(wxDC& dc, const wxRect& rect, int style, w anchored->GetRangeSize(anchored->GetRange(), size, descent, dc, style); wxRichTextAnchoredObjectAttr attr = anchored->GetAnchoredAttr(); int pos = floatCollector->GetFitPosition(attr.m_floating, rect.y + attr.m_offset, size.y); - + /* Update the offset */ attr.m_offset = pos - rect.y; anchored->SetAnchoredAttr(attr); @@ -7614,15 +7614,15 @@ bool wxRichTextImage::LoadImageCache(wxDC& dc, bool resetCache) { if (!m_imageBlock.IsOk()) return false; - + wxImage image; m_imageBlock.Load(image); if (!image.IsOk()) return false; - + int width = image.GetWidth(); int height = image.GetHeight(); - + if (m_anchoredAttr.m_width != -1) { // Calculate the user specified length @@ -7630,7 +7630,7 @@ bool wxRichTextImage::LoadImageCache(wxDC& dc, bool resetCache) { width = ConvertTenthsMMToPixels(dc, m_anchoredAttr.m_width); } - else + else { width = m_anchoredAttr.m_width; } @@ -7667,7 +7667,7 @@ bool wxRichTextImage::LoadImageCache(wxDC& dc, bool resetCache) m_imageCache = wxBitmap(img); } } - + return m_imageCache.IsOk(); } @@ -7678,7 +7678,7 @@ bool wxRichTextImage::Draw(wxDC& dc, const wxRichTextRange& range, const wxRichT // wxSize size = GetCachedSize(); if (!LoadImageCache(dc)) return false; - + int y = rect.y + (rect.height - m_imageCache.GetHeight()); dc.DrawBitmap(m_imageCache, rect.x, y, true); @@ -7721,7 +7721,7 @@ bool wxRichTextImage::GetRangeSize(const wxRichTextRange& range, wxSize& size, i partialExtents->Add(0); return false; } - + int width = m_imageCache.GetWidth(); int height = m_imageCache.GetHeight(); @@ -8063,7 +8063,7 @@ bool wxRichTextImageBlock::MakeImageBlockDefaultQuality(const wxImage& image, wx { if (imageType == wxBITMAP_TYPE_INVALID) return false; // Could not determine image type - + return DoMakeImageBlock(image, imageType); } @@ -8075,16 +8075,16 @@ bool wxRichTextImageBlock::DoMakeImageBlock(const wxImage& image, wxBitmapType i { return false; } - + unsigned char* block = new unsigned char[memStream.GetSize()]; if (!block) return NULL; - + if (m_data) delete[] m_data; m_data = block; - - m_imageType = imageType; + + m_imageType = imageType; m_dataSize = memStream.GetSize(); memStream.CopyTo(m_data, m_dataSize); diff --git a/src/richtext/richtextctrl.cpp b/src/richtext/richtextctrl.cpp index 4ef99e9f6b..a4141381f0 100644 --- a/src/richtext/richtextctrl.cpp +++ b/src/richtext/richtextctrl.cpp @@ -2837,7 +2837,7 @@ void wxRichTextCtrl::OnUpdateSelectAll(wxUpdateUIEvent& event) void wxRichTextCtrl::OnImage(wxCommandEvent& WXUNUSED(event)) { if (GetCurrentObject() && GetCurrentObject()->CanEditProperties()) - GetCurrentObject()->EditProperties(this, & GetBuffer()); + GetCurrentObject()->EditProperties(this, & GetBuffer()); SetCurrentObject(NULL); } diff --git a/src/richtext/richtextimagedlg.cpp b/src/richtext/richtextimagedlg.cpp index 54f160ea4e..ef59d9bfc6 100644 --- a/src/richtext/richtextimagedlg.cpp +++ b/src/richtext/richtextimagedlg.cpp @@ -1,10 +1,10 @@ ///////////////////////////////////////////////////////////////////////////// // Name: src/richtext/richtextimagedlg.cpp -// Purpose: +// Purpose: // Author: Mingquan Yang -// Modified by: +// Modified by: // Created: Wed 02 Jun 2010 11:27:23 CST -// RCS-ID: +// RCS-ID: // Copyright: (c) Mingquan Yang // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -128,7 +128,7 @@ void wxRichTextImageDialog::Init() */ void wxRichTextImageDialog::CreateControls() -{ +{ #ifdef __WXMAC__ SetWindowVariant(wxWINDOW_VARIANT_SMALL); #endif @@ -354,14 +354,14 @@ void wxRichTextImageDialog::SetImageObject(wxRichTextImage* image, wxRichTextBuf { m_attr.m_width = image->GetImageCache().GetWidth(); wxASSERT(m_attr.m_unitsW == wxRICHTEXT_PX); - + m_attr.m_unitsW = wxRICHTEXT_PX; } if (m_attr.m_height == -1) { m_attr.m_height = image->GetImageCache().GetHeight(); wxASSERT(m_attr.m_unitsH == wxRICHTEXT_PX); - + m_attr.m_unitsH = wxRICHTEXT_PX; } } diff --git a/src/richtext/richtextstyles.cpp b/src/richtext/richtextstyles.cpp index 6e47ba618e..420c8ede5f 100644 --- a/src/richtext/richtextstyles.cpp +++ b/src/richtext/richtextstyles.cpp @@ -58,7 +58,7 @@ wxTextAttr wxRichTextStyleDefinition::GetStyleMergedWithBase(const wxRichTextSty { if (m_baseStyle.IsEmpty()) return m_style; - + // Collect the styles, detecting loops wxArrayString styleNames; wxList styles; @@ -67,14 +67,14 @@ wxTextAttr wxRichTextStyleDefinition::GetStyleMergedWithBase(const wxRichTextSty { styles.Insert((wxObject*) def); styleNames.Add(def->GetName()); - + wxString baseStyleName = def->GetBaseStyle(); if (!baseStyleName.IsEmpty() && styleNames.Index(baseStyleName) == wxNOT_FOUND) def = sheet->FindStyle(baseStyleName); else def = NULL; } - + wxRichTextAttr attr; wxList::compatibility_iterator node = styles.GetFirst(); while (node) @@ -83,7 +83,7 @@ wxTextAttr wxRichTextStyleDefinition::GetStyleMergedWithBase(const wxRichTextSty attr.Apply(def->GetStyle(), NULL); node = node->GetNext(); } - + return attr; } diff --git a/src/richtext/richtextxml.cpp b/src/richtext/richtextxml.cpp index d7963e6163..8a51656f34 100644 --- a/src/richtext/richtextxml.cpp +++ b/src/richtext/richtextxml.cpp @@ -752,9 +752,9 @@ bool wxRichTextXMLHandler::ExportXML(wxOutputStream& stream, wxMBConv* convMem, { OutputIndentation(stream, indent); OutputString(stream, wxT("<") + objectName, convMem, convFile); - + OutputString(stream, style + wxT(">"), convMem, convFile); - + if (!fragment.empty() && (fragment[0] == wxT(' ') || fragment[fragment.length()-1] == wxT(' '))) { OutputString(stream, wxT("\""), convMem, convFile); @@ -763,7 +763,7 @@ bool wxRichTextXMLHandler::ExportXML(wxOutputStream& stream, wxMBConv* convMem, } else OutputStringEnt(stream, fragment, convMem, convFile); - + OutputString(stream, wxT(""), convMem, convFile); } } diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 8f4abde6bd..43c70db215 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -385,7 +385,7 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, dc.DrawRoundedRectangle(wxRectFromPRectangle(rc), cornerSize); return; #else - + #ifdef wxHAS_RAW_BITMAP // TODO: do something with cornerSize diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index e591244beb..2d393f8985 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -595,7 +595,7 @@ void wxStyledTextCtrl::MarkerDefineBitmap(int markerNumber, const wxBitmap& bmp) buff[len] = 0; SendMsg(2049, markerNumber, (sptr_t)buff); delete [] buff; - + } // Add a set of markers to a line. @@ -1190,7 +1190,7 @@ void wxStyledTextCtrl::RegisterImage(int type, const wxBitmap& bmp) { buff[len] = 0; SendMsg(2405, type, (sptr_t)buff); delete [] buff; - + } // Clear all the registered images. diff --git a/src/unix/threadpsx.cpp b/src/unix/threadpsx.cpp index 7e784e285f..e818385c66 100644 --- a/src/unix/threadpsx.cpp +++ b/src/unix/threadpsx.cpp @@ -1487,10 +1487,10 @@ wxThreadError wxThread::Delete(ExitCode *rc) } //else: can't wait for detached threads } - + if (state == STATE_NEW) return wxTHREAD_MISC_ERROR; - // for coherency with the MSW implementation, signal the user that + // for coherency with the MSW implementation, signal the user that // Delete() was called on a thread which didn't start to run yet. return wxTHREAD_NO_ERROR; diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index bfe713d9ae..041c8d8b66 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -141,7 +141,7 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() if ( menu ) tool->SetDropdownMenu(menu); #endif - + return m_toolbar; // must return non-NULL } -- 2.45.2