]> git.saurik.com Git - wxWidgets.git/commitdiff
Include wx/math.h according to precompiled headers of wx/wx.h (with other minor clean...
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 15 Jun 2006 17:58:49 +0000 (17:58 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 15 Jun 2006 17:58:49 +0000 (17:58 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

46 files changed:
include/wx/wx.h
src/cocoa/dc.mm
src/common/config.cpp
src/common/datstrm.cpp
src/common/dcbase.cpp
src/common/image.cpp
src/common/longlong.cpp
src/common/matrix.cpp
src/common/variant.cpp
src/generic/dcpsg.cpp
src/generic/listctrl.cpp
src/generic/sashwin.cpp
src/generic/tabg.cpp
src/gtk/bitmap.cpp
src/gtk/dcclient.cpp
src/gtk/gnome/gprint.cpp
src/gtk/textctrl.cpp
src/gtk/window.cpp
src/gtk1/bitmap.cpp
src/gtk1/dcclient.cpp
src/gtk1/scrolbar.cpp
src/gtk1/slider.cpp
src/gtk1/spinbutt.cpp
src/gtk1/spinctrl.cpp
src/gtk1/textctrl.cpp
src/gtk1/window.cpp
src/html/m_image.cpp
src/mac/carbon/dcclient.cpp
src/mac/carbon/dcprint.cpp
src/mac/carbon/mpthread.cpp
src/mac/carbon/printmac.cpp
src/mac/carbon/thread.cpp
src/mac/classic/dcclient.cpp
src/mac/classic/dcprint.cpp
src/motif/bmpmotif.cpp
src/motif/dcclient.cpp
src/msw/colordlg.cpp
src/msw/dcprint.cpp
src/msw/filedlg.cpp
src/msw/fontdlg.cpp
src/msw/mediactrl.cpp
src/msw/mediactrl_am.cpp
src/msw/ole/activex.cpp
src/msw/ole/automtn.cpp
src/x11/bitmap.cpp
src/x11/dcclient.cpp

index a3bb3bfe06b22af0fcc8c2c2ae56be8c35a8ef2a..e204e289af0ca8ed16e139f06a6d8d9b0ef35751 100644 (file)
@@ -26,6 +26,7 @@
 #include "wx/utils.h"
 #include "wx/stream.h"
 #include "wx/memory.h"
+#include "wx/math.h"
 
 #if wxUSE_GUI
 
index 4c1ad172aa2dfe62d23f81e45dd9b9012360bf43..7541eaf8c32b1494934796db36f6038ddda6213b 100644 (file)
@@ -15,6 +15,7 @@
 
 #ifndef WX_PRECOMP
     #include "wx/log.h"
+    #include "wx/math.h" //math constants
 #endif //WX_PRECOMP
 
 #include "wx/cocoa/autorelease.h"
@@ -30,7 +31,6 @@
 #import <AppKit/NSTypesetter.h>
 #import <AppKit/NSImage.h>
 
-#include "wx/math.h" //math constants
 #include "wx/listimpl.cpp"
 WX_DEFINE_LIST(wxCocoaDCStack);
 
index 19885d4a39275cc9445b2c340946a49f279db263..9f49fa0783573ee254445d383fbbf80c0d83623f 100644 (file)
     #include "wx/app.h"
     #include "wx/utils.h"
     #include "wx/arrstr.h"
+    #include "wx/math.h"
 #endif //WX_PRECOMP
 
 #if wxUSE_CONFIG && ((wxUSE_FILE && wxUSE_TEXTFILE) || wxUSE_CONFIG_NATIVE)
 
 #include "wx/file.h"
-#include "wx/math.h"
 
 #include <stdlib.h>
 #include <ctype.h>
index b4a4816f45f90f0e0f9b68539b2236d90b50ca41..50e4eb4b2e6dc2b81e1d0d76c54523258481e726 100644 (file)
 #if wxUSE_STREAMS
 
 #include "wx/datstrm.h"
-#include "wx/math.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/math.h"
+#endif //WX_PRECOMP
 
 // ---------------------------------------------------------------------------
 // wxDataInputStream
index f637c952d3dac0e103e561174fe80fdf2c7b1a9e..ef8918bbb5e514879a1777bb9118da893497f3b3 100644 (file)
 #endif
 
 #include "wx/dc.h"
-#include "wx/math.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/math.h"
+#endif
 
 // bool wxDCBase::sm_cacheing = false;
 
@@ -414,7 +417,7 @@ bool wxDCBase::DoGetPartialTextExtents(const wxString& text, wxArrayInt& widths)
 {
     int totalWidth = 0;
 
-    const size_t len = text.Length();
+    const size_t len = text.length();
     widths.Empty();
     widths.Add(0, len);
 
index 8711e3d1cd47ae69f068b917f5b44731594ee09f..0a67c8d50bd9bd203429512129c5bc422129c2aa 100644 (file)
     #include "wx/hash.h"
     #include "wx/utils.h"
     #include "wx/bitmap.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/filefn.h"
 #include "wx/wfstream.h"
 #include "wx/intl.h"
 #include "wx/module.h"
-#include "wx/math.h"
 
 #if wxUSE_XPM
     #include "wx/xpmdecod.h"
index b8364d85799ace4a069e05bd6a508ad57cbac2b2..360d087b3e351610f4aab3fa66157b225dae0b9f 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        wx/longlong.cpp
+// Name:        src/common/longlong.cpp
 // Purpose:     implementation of wxLongLongNative
 // Author:      Jeffrey C. Ollie <jeff@ollie.clive.ia.us>, Vadim Zeitlin
 // Remarks:     this class is not public in wxWidgets 2.0! It is intentionally
 #endif
 
 #if wxUSE_LONGLONG
+
 #include "wx/longlong.h"
-#include "wx/math.h"       // for fabs()
+
+#ifndef WX_PRECOMP
+    #include "wx/math.h"       // for fabs()
+#endif
 
 #if wxUSE_STREAMS
-#include "wx/txtstrm.h"
+    #include "wx/txtstrm.h"
 #endif
 
 #if defined(__MWERKS__) && defined(__WXMSW__)
-#include <string.h>     // for memset()
+    #include <string.h>     // for memset()
 #else
-#include <memory.h>     // for memset()
+    #include <memory.h>     // for memset()
 #endif
 
 #include "wx/ioswrap.h"
@@ -1257,7 +1261,7 @@ WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &o,
     wxString s = o.ReadWord();
 
     ll = wxULongLong(0l, 0l);
-    size_t length = s.Length();
+    size_t length = s.length();
     size_t idx = 0;
 
     wxChar ch = READ_STRING_CHAR(s, idx, length);
@@ -1282,7 +1286,7 @@ WXDLLIMPEXP_BASE class wxTextInputStream &operator>>(class wxTextInputStream &o,
     wxString s = o.ReadWord();
 
     ll = wxLongLong(0l, 0l);
-    size_t length = s.Length();
+    size_t length = s.length();
     size_t idx = 0;
 
     wxChar ch = READ_STRING_CHAR(s, idx, length);
index 769dd965e1e105e672b9f997c9fcc24c6e034bbf..f1f8c319f97ae0754d205e8ead4685268ff6f518 100644 (file)
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
+#include "wx/matrix.h"
+
 #ifndef WX_PRECOMP
     #include "wx/math.h"
 #endif
 
-#include "wx/matrix.h"
-
 static const double pi = M_PI;
 
 wxTransformMatrix::wxTransformMatrix(void)
index a45b3d7489538d748124165dc78487173cca0447..a1e7f8a8c371eaf6d7e20ea8708ef79f45264134 100644 (file)
@@ -20,6 +20,7 @@
 
 #ifndef WX_PRECOMP
     #include "wx/string.h"
+    #include "wx/math.h"
     #if wxUSE_STREAMS
         #include "wx/stream.h"
     #endif
@@ -44,7 +45,6 @@ using namespace std ;
 
 #include "wx/string.h"
 #include "wx/tokenzr.h"
-#include "wx/math.h"
 
 IMPLEMENT_ABSTRACT_CLASS(wxVariantData, wxObject)
 
index f57daec342654b5a8ee0c945ff4b34e3a60fbb0c..33bd3d37ddcddcfb9b637fb3b32ca0d522a0535f 100644 (file)
@@ -25,6 +25,7 @@
     #include "wx/app.h"
     #include "wx/utils.h"
     #include "wx/dcmemory.h"
+    #include "wx/math.h"
 #endif // WX_PRECOMP
 
 #include "wx/image.h"
@@ -32,7 +33,6 @@
 #include "wx/generic/prntdlgg.h"
 #include "wx/paper.h"
 #include "wx/filefn.h"
-#include "wx/math.h"
 #include "wx/stdpaths.h"
 
 WXDLLIMPEXP_DATA_CORE(int) wxPageNumber;
index 161c1dedf27f648dcd28ee935febebb61f2e446f..93b28ecb70103c7f9739a651c67315dd81c59574 100644 (file)
     #include "wx/dcscreen.h"
     #include "wx/textctrl.h"
     #include "wx/listbox.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/selstore.h"
 #include "wx/renderer.h"
-#include "wx/math.h"
 
 #ifdef __WXMAC__
     #include "wx/mac/private.h"
index 3a4e2b6d9700b39cb9c56f7e58dcf5dff1d495af..fc30aba8219b5540ef3bfbc1a2db3e28c08503a1 100644 (file)
     #include "wx/settings.h"
     #include "wx/dcclient.h"
     #include "wx/dcscreen.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
-
 #include <stdlib.h>
 
 #include "wx/laywin.h"
index 249395811a0852642131ab183a687f8d2b71da70..cec7c1d37a0ca280d81fa65622b5d131a06406ec 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        tabg.cpp
+// Name:        src/generic/tabg.cpp
 // Purpose:     Generic tabbed dialogs
 // Author:      Julian Smart
 // Modified by:
@@ -13,7 +13,7 @@
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
 #if wxUSE_TAB_DIALOG
     #include "wx/settings.h"
     #include "wx/intl.h"
     #include "wx/dcclient.h"
+    #include "wx/math.h"
 #endif
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
 
-#include "wx/math.h"
 #include "wx/tab.h"
 #include "wx/listimpl.cpp"
 
index b04bbe39059bd7dece6578feaea42c7ee68a8a4a..46dd9e522988b412628dc7bdd50ed32ac83a2771 100644 (file)
@@ -17,6 +17,7 @@
     #include "wx/dcmemory.h"
     #include "wx/palette.h"
     #include "wx/icon.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/filefn.h"
@@ -32,8 +33,6 @@
 
 #include <gdk/gdkimage.h>
 
-#include "wx/math.h"
-
 extern void gdk_wx_draw_bitmap     (GdkDrawable  *drawable,
                           GdkGC               *gc,
                           GdkDrawable  *src,
index 8dd54a51ab9941e70f6c22acd2167ac6f3d44bc7..bf1c437b768f283f3e608352f0597adae4b2b135 100644 (file)
@@ -19,6 +19,7 @@
 #ifndef WX_PRECOMP
     #include "wx/log.h"
     #include "wx/dcmemory.h"
+    #include "wx/math.h" // for floating-point functions
 #endif
 
 #include "wx/image.h"
@@ -28,8 +29,6 @@
 #include "wx/gtk/win_gtk.h"
 #include "wx/gtk/private.h"
 
-#include "wx/math.h" // for floating-point functions
-
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <gdk/gdkprivate.h>
index e262a9303ed7fdc09e6ce380343578dbeab4337e..a623c309d3c59534abf8e3e8a6704fbcd870e9f6 100644 (file)
@@ -23,9 +23,9 @@
     #include "wx/log.h"
     #include "wx/dcmemory.h"
     #include "wx/icon.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/fontutil.h"
 #include "wx/gtk/private.h"
 #include "wx/module.h"
index 4417e2c99c84b3fbe66b941ea9a8d5414e3c6214..173ae70dde0ae19bdc50b6006d773a11f04491de 100644 (file)
     #include "wx/utils.h"
     #include "wx/panel.h"
     #include "wx/settings.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/strconv.h"
 #include "wx/fontutil.h"        // for wxNativeFontInfo (GetNativeFontInfo())
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
-#include "wx/math.h"
 
 #include "wx/gtk/private.h"
 #include <gdk/gdkkeysyms.h>
index de6677ff1952567fc728011d2dcc638e390b09d3..cefe1bbd954a7fb3b4871dd199f65b911f82aa43 100644 (file)
@@ -32,6 +32,7 @@
     #include "wx/combobox.h"
     #include "wx/layout.h"
     #include "wx/statusbr.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/module.h"
@@ -54,7 +55,6 @@
     #include "wx/thread.h"
 #endif
 
-#include "wx/math.h"
 #include <ctype.h>
 
 // FIXME: Due to a hack we use GtkCombo in here, which is deprecated since gtk2.3.0
index 7c2c675a795a5ea95922ba4f10fb0604a551ea86..bd4abefa09942aebc5b98c12e3b88acc08c4c1f1 100644 (file)
@@ -17,6 +17,7 @@
     #include "wx/dcmemory.h"
     #include "wx/palette.h"
     #include "wx/icon.h"
+    #include "wx/math.h"
 #endif // WX_PRECOMP
 
 #include "wx/filefn.h"
@@ -28,8 +29,6 @@
 
 #include <gdk/gdkrgb.h>
 
-#include "wx/math.h"
-
 extern
 void gdk_wx_draw_bitmap (GdkDrawable  *drawable,
                          GdkGC        *gc,
index 9d579b0bb631ac222e4cbce117565f34644c681a..a5b9b4a5d0bfc3ea5f682d53ad9b3f9ef962c728 100644 (file)
@@ -19,6 +19,7 @@
 #ifndef WX_PRECOMP
     #include "wx/log.h"
     #include "wx/dcmemory.h"
+    #include "wx/math.h" // for floating-point functions
 #endif
 
 #include "wx/image.h"
@@ -27,8 +28,6 @@
 
 #include "wx/gtk1/win_gtk.h"
 
-#include "wx/math.h" // for floating-point functions
-
 #include <gdk/gdk.h>
 #include <gdk/gdkx.h>
 #include <gdk/gdkprivate.h>
index 4fcc4eb928fb6c4bddf0ff2480aa4997fedd30e8..b2ef2c4cf1ccbe49d3a74c75085e0485a906cd41 100644 (file)
@@ -16,9 +16,9 @@
 
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/gtk1/private.h"
 
 //-----------------------------------------------------------------------------
index 6f37e772225bb8e75b9367fb4c3fb8f80a8fd057..ddeb7570c7218d567fb530d747f819727f95cc02 100644 (file)
@@ -16,9 +16,9 @@
 
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/gtk1/private.h"
 
 //-----------------------------------------------------------------------------
index 607e7bc682e0a6b2d7fa29df431bb40386a222e3..84e55b4d933068a9b95ba5a3e3b9f99f8f8a1914 100644 (file)
@@ -17,9 +17,9 @@
 
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/gtk1/private.h"
 
 //-----------------------------------------------------------------------------
index 51c4c477cd102926d0d01bb43191be8cbdbe3387..e2a7824071a925deb7b8941be2a83e3542df5b0c 100644 (file)
@@ -18,9 +18,9 @@
 #ifndef WX_PRECOMP
     #include "wx/utils.h"
     #include "wx/textctrl.h"    // for wxEVT_COMMAND_TEXT_UPDATED
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/gtk1/private.h"
 
 //-----------------------------------------------------------------------------
index eda1665baf70ec6366931574f2c145d518368d5d..d09ad26829e522efb6f9d53c402c22c500daea69 100644 (file)
     #include "wx/utils.h"
     #include "wx/panel.h"
     #include "wx/settings.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/strconv.h"
 #include "wx/fontutil.h"        // for wxNativeFontInfo (GetNativeFontInfo())
 
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
-#include "wx/math.h"
 
 #include "wx/gtk1/private.h"
 #include <gdk/gdkkeysyms.h>
@@ -458,7 +457,7 @@ void wxTextCtrl::WriteText( const wxString &text )
         // resetting the style and appending some more text wouldn't work: if
         // we don't specify the style explicitly, the old style would be used
         gtk_editable_delete_selection( GTK_EDITABLE(m_text) );
-        wxGtkTextInsert(m_text, m_defaultStyle, text.c_str(), text.Len());
+        wxGtkTextInsert(m_text, m_defaultStyle, text.c_str(), text.length());
 
         // we called wxGtkTextInsert with correct font, no need to do anything
         // in UpdateFontIfNeeded() any longer
@@ -478,7 +477,7 @@ void wxTextCtrl::WriteText( const wxString &text )
         // This moves the cursor pos to behind the inserted text.
         gint len = GET_EDITABLE_POS(m_text);
 
-        gtk_editable_insert_text( GTK_EDITABLE(m_text), text.c_str(), text.Len(), &len );
+        gtk_editable_insert_text( GTK_EDITABLE(m_text), text.c_str(), text.length(), &len );
 
         // Bring entry's cursor uptodate.
         gtk_entry_set_position( GTK_ENTRY(m_text), len );
@@ -542,7 +541,7 @@ bool wxTextCtrl::PositionToXY(long pos, long *x, long *y ) const
         wxString text = GetValue();
 
         // cast to prevent warning. But pos really should've been unsigned.
-        if( (unsigned long)pos > text.Len()  )
+        if( (unsigned long)pos > text.length()  )
             return false;
 
         *x=0;   // First Col
index 70742e619376d23aaf63f2f603f8e16498c48022..cda6b3fae34875c2f95cf3483d9ab8d48baf6e9c 100644 (file)
@@ -31,6 +31,7 @@
     #include "wx/combobox.h"
     #include "wx/layout.h"
     #include "wx/statusbr.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/module.h"
@@ -53,7 +54,6 @@
     #include "wx/thread.h"
 #endif
 
-#include "wx/math.h"
 #include <ctype.h>
 
 #include "wx/gtk1/private.h"
index 624356dcb3c9d591d65bf4fa1ed14e7025f99045..c7586333b0e3cfbc63e818f8533619cdb4fafb9b 100644 (file)
@@ -22,6 +22,7 @@
     #include "wx/timer.h"
     #include "wx/dcmemory.h"
     #include "wx/log.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/html/forcelnk.h"
@@ -31,7 +32,6 @@
 #include "wx/image.h"
 #include "wx/gifdecod.h"
 #include "wx/artprov.h"
-#include "wx/math.h"
 
 #include <float.h>
 
index 23d159b764ac581c9971c83fdaa07cf71f3c85ca..c05e9768545a91a2b09508c97140742962474d32 100644 (file)
     #include "wx/dcmemory.h"
     #include "wx/settings.h"
     #include "wx/toplevel.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/region.h"
-#include "wx/math.h"
 #include "wx/mac/private.h"
 
 //-----------------------------------------------------------------------------
index 490b0830659ac93e1f322c591b7ae81d22874995..2acdaf219983fe834eecd90097cb0e1988f6a2ca 100644 (file)
@@ -22,9 +22,9 @@
 
 #ifndef WX_PRECOMP
     #include "wx/msgdlg.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/mac/uma.h"
 #include "wx/mac/private/print.h"
 
index 9da62d0185180694d2c2ae231c4af9a688aa88a6..edf27aaf3cc9cb4aa1f43c189d2fd837472d6760 100755 (executable)
@@ -1,13 +1,13 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:       thread.cpp
-// Purpose:    wxThread Implementation
-// Author:     Original from Wolfram Gloger/Guilhem Lavaux/Vadim Zeitlin
-// Modified by: Aj Lavin, Stefan Csomor
-// Created:    04/22/98
-// RCS-ID:     $Id$
-// Copyright:  (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998),
-//                 Vadim Zeitlin (1999) , Stefan Csomor (2000)
-// Licence:    wxWindows licence
+// Name:      src/mac/carbon/mpthread.cpp
+// Purpose:   wxThread Implementation
+// Author:    Original from Wolfram Gloger/Guilhem Lavaux/Vadim Zeitlin
+// Modified   by: Aj Lavin, Stefan Csomor
+// Created:   04/22/98
+// RCS-ID:    $Id$
+// Copyright: (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998),
+//                Vadim Zeitlin (1999) , Stefan Csomor (2000)
+// Licence:   wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // ----------------------------------------------------------------------------
 #include "wx/wxprec.h"
 
 #if defined(__BORLANDC__)
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
+#if wxUSE_THREADS
+
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
+    #include "wx/wx.h"
 #endif
 
-#if wxUSE_THREADS
-
 #include "wx/module.h"
 #include "wx/thread.h"
 
@@ -36,7 +36,6 @@
 #else
 #include <DriverServices.h>
 #include <Multiprocessing.h>
-#include "wx/math.h"
 #endif
 #include "wx/mac/uma.h"
 #endif
 // this state)
 enum wxThreadState
 {
-       STATE_NEW,              // didn't start execution yet (=> RUNNING)
-       STATE_RUNNING,  // thread is running (=> PAUSED, CANCELED)
-       STATE_PAUSED,   // thread is temporarily suspended (=> RUNNING)
-       STATE_CANCELED, // thread should terminate a.s.a.p. (=> EXITED)
-       STATE_EXITED    // thread is terminating
+    STATE_NEW,      // didn't start execution yet (=> RUNNING)
+    STATE_RUNNING,  // thread is running (=> PAUSED, CANCELED)
+    STATE_PAUSED,   // thread is temporarily suspended (=> RUNNING)
+    STATE_CANCELED, // thread should terminate a.s.a.p. (=> EXITED)
+    STATE_EXITED    // thread is terminating
 };
 
 // ----------------------------------------------------------------------------
@@ -81,7 +80,7 @@ static wxCriticalSection *gs_critsectWaitingForGui = NULL;
 // number of threads waiting for GUI in wxMutexGuiEnter()
 static size_t gs_nWaitingForGui = 0;
 
-// overall number of threads, needed for determining the sleep value of the main 
+// overall number of threads, needed for determining the sleep value of the main
 // event loop
 size_t g_numberOfThreads = 0;
 
@@ -99,23 +98,23 @@ MPCriticalRegionID gs_guiCritical = kInvalidID;
 
 /*
     Notes :
-    
+
     The implementation is very close to the phtreads implementation, the reason for
     using MPServices is the fact that these are also available under OS 9. Thus allowing
     for one common API for all current builds.
-    
+
     As soon as wxThreads are on a 64 bit address space, the TLS must be extended
     to use two indices one for each 32 bit part as the MP implementation is limited
     to longs.
-    
+
     I have two implementations for mutexes :
-    version A based on a binary semaphore, problem - not reentrant, version B based 
+    version A based on a binary semaphore, problem - not reentrant, version B based
     on a critical region, allows for reentrancy, performance implications not
     yet tested
 
     The same for condition internal, one implementation by Aj Lavin and the other one
     copied from the thrimpl.cpp which I assume has been more broadly tested, I've just
-    replaced the interlock increment with the appropriate PPC calls 
+    replaced the interlock increment with the appropriate PPC calls
 */
 
 // ----------------------------------------------------------------------------
@@ -124,31 +123,31 @@ MPCriticalRegionID gs_guiCritical = kInvalidID;
 
 static bool wxMacMPThreadsInitVerify()
 {
-       static bool hasThreadManager = false ;
-       if ( !hasThreadManager )
-           hasThreadManager = MPLibraryIsLoaded();
-    
-       if ( !hasThreadManager )
+    static bool hasThreadManager = false ;
+    if ( !hasThreadManager )
+        hasThreadManager = MPLibraryIsLoaded();
+
+    if ( !hasThreadManager )
     {
-               wxMessageBox( wxT("Error") , wxT("MP Thread Support is not available on this System" ), wxOK ) ;
-               return FALSE ;
+        wxMessageBox( wxT("Error") , wxT("MP Thread Support is not available on this System" ), wxOK ) ;
+        return false ;
     }
-    return TRUE ;
-}      
+    return true ;
+}
 
-#if 0 
+#if 0
 
 class wxMutexInternal
 {
 public:
-       wxMutexInternal(wxMutexType mutexType) ;
-       ~wxMutexInternal() ;
-       bool IsOk() const { return m_isOk; }
-       
-       wxMutexError Lock() ;
-       wxMutexError TryLock() ;
-       wxMutexError Unlock();
-private:               
+    wxMutexInternal(wxMutexType mutexType) ;
+    ~wxMutexInternal() ;
+    bool IsOk() const { return m_isOk; }
+
+    wxMutexError Lock() ;
+    wxMutexError TryLock() ;
+    wxMutexError Unlock();
+private:
     MPSemaphoreID m_semaphore;
     bool m_isOk ;
 };
@@ -156,16 +155,16 @@ private:
 wxMutexInternal::wxMutexInternal(wxMutexType mutexType )
 {
     wxMacMPThreadsInitVerify() ;
-    
+
     m_isOk = false ;
     m_semaphore = kInvalidID ;
-    
+
     OSStatus err = noErr ;
     switch( mutexType )
     {
         case wxMUTEX_DEFAULT :
             {
-               verify_noerr( MPCreateBinarySemaphore( & m_semaphore) );
+                verify_noerr( MPCreateBinarySemaphore( & m_semaphore) );
                 m_isOk = ( m_semaphore != kInvalidID ) ;
             }
             break ;
@@ -181,37 +180,37 @@ wxMutexInternal::wxMutexInternal(wxMutexType mutexType )
 wxMutexInternal::~wxMutexInternal()
 {
     if ( m_semaphore != kInvalidID )
-           MPDeleteSemaphore( m_semaphore);
+        MPDeleteSemaphore( m_semaphore);
 }
 
 wxMutexError wxMutexInternal::Lock()
 {
     wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ;
-       OSStatus err = MPWaitOnSemaphore( m_semaphore, kDurationForever);
-       if ( err)
+    OSStatus err = MPWaitOnSemaphore( m_semaphore, kDurationForever);
+    if ( err)
     {
-               wxLogSysError(wxT("Could not lock mutex"));
-               return wxMUTEX_MISC_ERROR;
+        wxLogSysError(wxT("Could not lock mutex"));
+        return wxMUTEX_MISC_ERROR;
     }
-    
-       return wxMUTEX_NO_ERROR;
+
+    return wxMUTEX_NO_ERROR;
 }
 
 wxMutexError wxMutexInternal::TryLock()
 {
     wxCHECK_MSG( m_isOk , wxMUTEX_MISC_ERROR , wxT("Invalid Mutex") ) ;
-       OSStatus err = MPWaitOnSemaphore( m_semaphore, kDurationImmediate);
-       if ( err)
+    OSStatus err = MPWaitOnSemaphore( m_semaphore, kDurationImmediate);
+    if ( err)
     {
-               if ( err == kMPTimeoutErr)
-               {
-                       return wxMUTEX_BUSY;
-               }
-               wxLogSysError(wxT("Could not try lock mutex"));
-               return wxMUTEX_MISC_ERROR;    
+        if ( err == kMPTimeoutErr)
+        {
+            return wxMUTEX_BUSY;
+        }
+        wxLogSysError(wxT("Could not try lock mutex"));
+        return wxMUTEX_MISC_ERROR;
     }
-    
-       return wxMUTEX_NO_ERROR;
+
+    return wxMUTEX_NO_ERROR;
 }
 
 wxMutexError wxMutexInternal::Unlock()
@@ -221,10 +220,10 @@ wxMutexError wxMutexInternal::Unlock()
        if ( err)
     {
                wxLogSysError(_("Could not unlock mutex"));
-               return wxMUTEX_MISC_ERROR;        
+               return wxMUTEX_MISC_ERROR;
     }
-    
-       return wxMUTEX_NO_ERROR;
+
+    return wxMUTEX_NO_ERROR;
 }
 
 #else
@@ -235,11 +234,11 @@ public:
        wxMutexInternal(wxMutexType mutexType) ;
        ~wxMutexInternal() ;
        bool IsOk() const { return m_isOk; }
-       
+
        wxMutexError Lock() ;
        wxMutexError TryLock() ;
        wxMutexError Unlock();
-private:               
+private:
     MPCriticalRegionID m_critRegion ;
     bool m_isOk ;
 };
@@ -249,10 +248,10 @@ wxMutexInternal::wxMutexInternal(wxMutexType mutexType )
     wxMacMPThreadsInitVerify() ;
     m_isOk = false ;
     m_critRegion = kInvalidID ;
-    
+
     verify_noerr( MPCreateCriticalRegion( & m_critRegion) );
     m_isOk = ( m_critRegion != kInvalidID ) ;
-    
+
     if ( !IsOk() )
         wxFAIL_MSG(wxT("Error when creating mutex") ) ;
 }
@@ -272,8 +271,8 @@ wxMutexError wxMutexInternal::Lock()
                wxLogSysError(wxT("Could not lock mutex"));
                return wxMUTEX_MISC_ERROR;
     }
-    
-       return wxMUTEX_NO_ERROR;
+
+    return wxMUTEX_NO_ERROR;
 }
 
 wxMutexError wxMutexInternal::TryLock()
@@ -287,10 +286,10 @@ wxMutexError wxMutexInternal::TryLock()
                        return wxMUTEX_BUSY;
                }
                wxLogSysError(wxT("Could not try lock mutex"));
-               return wxMUTEX_MISC_ERROR;    
+               return wxMUTEX_MISC_ERROR;
     }
-    
-       return wxMUTEX_NO_ERROR;
+
+    return wxMUTEX_NO_ERROR;
 }
 
 wxMutexError wxMutexInternal::Unlock()
@@ -300,10 +299,10 @@ wxMutexError wxMutexInternal::Unlock()
        if ( err)
     {
                wxLogSysError(_("Could not unlock mutex"));
-               return wxMUTEX_MISC_ERROR;        
+               return wxMUTEX_MISC_ERROR;
     }
-    
-       return wxMUTEX_NO_ERROR;
+
+    return wxMUTEX_NO_ERROR;
 }
 
 #endif
@@ -317,22 +316,22 @@ class wxSemaphoreInternal
 public:
        wxSemaphoreInternal(int initialcount, int maxcount);
        ~wxSemaphoreInternal();
-       
+
        bool IsOk() const { return m_isOk; }
-       
+
        wxSemaError WaitTimeout(unsigned long milliseconds);
-       
+
        wxSemaError Wait() { return WaitTimeout( kDurationForever); }
-       
-       wxSemaError TryWait() 
-       { 
-           wxSemaError err = WaitTimeout(kDurationImmediate); 
+
+       wxSemaError TryWait()
+       {
+           wxSemaError err = WaitTimeout(kDurationImmediate);
            if ( err == wxSEMA_TIMEOUT )
                err = wxSEMA_BUSY ;
            return err ;
        }
        wxSemaError Post();
-       
+
 private:
     MPSemaphoreID m_semaphore;
     bool m_isOk ;
@@ -350,7 +349,7 @@ wxSemaphoreInternal::wxSemaphoreInternal(int initialcount, int maxcount)
     }
        verify_noerr( MPCreateSemaphore( maxcount, initialcount, & m_semaphore) );
     m_isOk = ( m_semaphore != kInvalidID ) ;
-    
+
     if ( !IsOk() )
         wxFAIL_MSG(wxT("Error when creating semaphore") ) ;
 }
@@ -394,8 +393,8 @@ wxSemaError wxSemaphoreInternal::Post()
 class wxConditionInternal
 {
 public:
-       
-       wxConditionInternal(wxMutex& mutex) 
+
+       wxConditionInternal(wxMutex& mutex)
     : m_mutex( mutex),
        m_semaphore( 0, 1),
        m_gate( 1, 1)
@@ -404,34 +403,34 @@ public:
                m_signals = 0;
                m_canceled = 0;
        }
-       
+
        ~wxConditionInternal()
        {
        }
-       
+
        bool IsOk() const { return m_mutex.IsOk() ; }
-    
+
        wxCondError Wait()
        {
                return WaitTimeout( kDurationForever);
        }
-       
+
        wxCondError WaitTimeout(unsigned long msectimeout);
-       
+
        wxCondError Signal()
        {
                return DoSignal( false);
        }
-       
+
        wxCondError Broadcast()
        {
                return DoSignal( true);
        }
-    
+
 private:
-               
+
                wxCondError DoSignal( bool signalAll);
-       
+
        wxMutex&          m_mutex;
        wxSemaphoreInternal     m_semaphore;  // Signals the waiting threads.
        wxSemaphoreInternal       m_gate;
@@ -443,7 +442,7 @@ private:
 
 
 wxCondError wxConditionInternal::WaitTimeout(unsigned long msectimeout)
-{      
+{
        m_gate.Wait();
        if ( ++ m_waiters == INT_MAX)
     {
@@ -454,24 +453,24 @@ wxCondError wxConditionInternal::WaitTimeout(unsigned long msectimeout)
                m_varSection.Leave();
     }
        m_gate.Post();
-       
+
        m_mutex.Unlock();
-       
+
        wxSemaError err = m_semaphore.WaitTimeout( msectimeout);
        wxASSERT( err == wxSEMA_NO_ERROR || err == wxSEMA_TIMEOUT);
-       
+
        m_varSection.Enter();
        if ( err != wxSEMA_NO_ERROR)
     {
                if ( m_signals > m_canceled)
                {
                        // A signal is being sent after we timed out.
-                       
+
                        if ( m_waiters == m_signals)
                        {
                                // There are no excess waiters to catch the signal, so
                                // we must throw it away.
-                               
+
                                wxSemaError err2 = m_semaphore.Wait();
                                if ( err2 != wxSEMA_NO_ERROR)
                                {
@@ -514,15 +513,15 @@ wxCondError wxConditionInternal::WaitTimeout(unsigned long msectimeout)
                }
     }
        m_varSection.Leave();
-       
+
        m_mutex.Lock();
-       
-       if ( err)
+
+    if ( err)
     {
                return err == wxSEMA_TIMEOUT ? wxCOND_TIMEOUT : wxCOND_MISC_ERROR;
     }
-    
-       return wxCOND_NO_ERROR;
+
+    return wxCOND_NO_ERROR;
 }
 
 
@@ -530,36 +529,36 @@ wxCondError wxConditionInternal::DoSignal( bool signalAll)
 {
        m_gate.Wait();
        m_varSection.Enter();
-       
+
        wxASSERT( m_signals == m_canceled);
-       
+
        if ( m_waiters == m_canceled)
     {
                m_varSection.Leave();
                m_gate.Post();
                return wxCOND_NO_ERROR;
     }
-       
+
        if ( m_canceled > 0)
     {
                m_waiters -= m_canceled;
                m_signals = 0;
                m_canceled = 0;
     }
-       
+
        m_signals = signalAll ? m_waiters : 1;
        size_t n = m_signals;
-       
+
        m_varSection.Leave();
-       
+
        // Let the waiters inherit the gate lock.
-       
+
        do
     {
                wxSemaError err = m_semaphore.Post();
                wxASSERT( err == wxSEMA_NO_ERROR);
     } while ( -- n);
-       
+
        return wxCOND_NO_ERROR;
 }
 
@@ -718,14 +717,14 @@ public:
                m_prio = WXTHREAD_DEFAULT_PRIORITY;
                m_notifyQueueId = kInvalidID;
         m_exitcode = 0;
-        m_cancelled = FALSE ;
+        m_cancelled = false ;
 
-        // set to TRUE only when the thread starts waiting on m_semSuspend
-        m_isPaused = FALSE;
+        // set to true only when the thread starts waiting on m_semSuspend
+        m_isPaused = false;
 
         // defaults for joinable threads
-        m_shouldBeJoined = TRUE;
-        m_isDetached = FALSE;
+        m_shouldBeJoined = true;
+        m_isDetached = false;
     }
     ~wxThreadInternal()
     {
@@ -765,7 +764,7 @@ public:
        // Get the ID of this thread's underlying MP Services task.
        MPTaskID  GetId() const { return m_tid; }
 
-    void SetCancelFlag() { m_cancelled = TRUE; }
+    void SetCancelFlag() { m_cancelled = true; }
     bool WasCancelled() const { return m_cancelled; }
     // exit code
     void SetExitCode(wxThread::ExitCode exitcode) { m_exitcode = exitcode; }
@@ -780,8 +779,8 @@ public:
     {
         wxCriticalSectionLocker lock(m_csJoinFlag);
 
-        m_shouldBeJoined = FALSE;
-        m_isDetached = TRUE;
+        m_shouldBeJoined = false;
+        m_isDetached = true;
     }
 
 private:
@@ -852,7 +851,7 @@ OSStatus wxThreadInternal::MacThreadStart(void *parameter)
             pthread->SetState(STATE_EXITED);
         }
     }
-    
+
     if ( dontRunAtAll )
     {
         if ( pthread->m_isDetached )
@@ -880,7 +879,7 @@ bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize)
 
        OSStatus err = noErr ;
        m_thread = thread;
-       
+
        if ( m_notifyQueueId == kInvalidID )
     {
                OSStatus err = MPCreateQueue( & m_notifyQueueId);
@@ -890,9 +889,9 @@ bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize)
                        return false;
                }
     }
-       
+
        m_state = STATE_NEW;
-       
+
        err = MPCreateTask( MacThreadStart,
                                                (void*) m_thread,
                                                stackSize,
@@ -901,25 +900,25 @@ bool wxThreadInternal::Create(wxThread *thread, unsigned int stackSize)
                                                0,
                                                0,
                                                &m_tid);
-       
+
        if ( err)
     {
-               wxLogSysError(_("Can't create thread"));                
+               wxLogSysError(_("Can't create thread"));
                return false;
     }
-       
+
        if ( m_prio != WXTHREAD_DEFAULT_PRIORITY )
     {
                SetPriority(m_prio);
     }
-       
+
        return true;
 }
 
 void wxThreadInternal::SetPriority( int priority)
 {
        m_prio = priority;
-       
+
        if ( m_tid)
     {
                // Mac priorities range from 1 to 10,000, with a default of 100.
@@ -927,7 +926,7 @@ void wxThreadInternal::SetPriority( int priority)
                // We can map wxWidgets to Mac priorities easily by assuming
                // the former uses a logarithmic scale.
                const unsigned int macPriority = ( int)( exp( priority / 25.0 * log( 10.0)) + 0.5);
-               
+
                MPSetTaskWeight( m_tid, macPriority);
     }
 }
@@ -963,10 +962,10 @@ void wxThreadInternal::Wait()
             void * param2;
             void * rc;
 
-            OSStatus err = MPWaitOnQueue ( m_notifyQueueId, 
-                                & param1, 
-                                & param2, 
-                                & rc, 
+            OSStatus err = MPWaitOnQueue ( m_notifyQueueId,
+                                & param1,
+                                & param2,
+                                & rc,
                                 kDurationForever);
             if ( err)
             {
@@ -978,7 +977,7 @@ void wxThreadInternal::Wait()
             // but we don't need this here
             m_exitcode = rc;
 
-            m_shouldBeJoined = FALSE;
+            m_shouldBeJoined = false;
         }
     }
 
@@ -1073,7 +1072,7 @@ wxThread::wxThread(wxThreadKind kind)
 {
        g_numberOfThreads++;
        m_internal = new wxThreadInternal();
-       
+
        m_isDetached = (kind == wxTHREAD_DETACHED);
 }
 
@@ -1102,7 +1101,7 @@ wxThread::~wxThread()
 wxThreadError wxThread::Create(unsigned int stackSize)
 {
        wxCriticalSectionLocker lock(m_critsect);
-       
+
     if ( m_isDetached )
     {
         m_internal->Detach() ;
@@ -1112,7 +1111,7 @@ wxThreadError wxThread::Create(unsigned int stackSize)
         m_internal->SetState(STATE_EXITED);
         return wxTHREAD_NO_RESOURCE;
     }
-       
+
        return wxTHREAD_NO_ERROR;
 }
 
@@ -1297,7 +1296,7 @@ void wxThread::Exit(ExitCode status)
     OnExit();
 
     MPTerminateTask( m_internal->GetId() , (long) status) ;
-    
+
     if ( IsDetached() )
     {
         delete this;
@@ -1398,10 +1397,10 @@ bool wxThread::IsAlive() const
     {
         case STATE_RUNNING:
         case STATE_PAUSED:
-            return TRUE;
+            return true;
 
         default:
-            return FALSE;
+            return false;
     }
 }
 
@@ -1421,7 +1420,7 @@ class wxThreadModule : public wxModule
 public:
        virtual bool OnInit();
        virtual void OnExit();
-       
+
 private:
                DECLARE_DYNAMIC_CLASS(wxThreadModule)
 };
@@ -1429,24 +1428,24 @@ private:
 IMPLEMENT_DYNAMIC_CLASS(wxThreadModule, wxModule)
 
 bool wxThreadModule::OnInit()
-{    
+{
        if ( !wxMacMPThreadsInitVerify() )
     {
-               return FALSE ;
+               return false ;
     }
-       
+
        verify_noerr( MPAllocateTaskStorageIndex( &gs_tlsForWXThread ) ) ;
        // main thread's This() is NULL
        verify_noerr( MPSetTaskStorageValue( gs_tlsForWXThread , NULL ) ) ;
 
        gs_idMainThread = wxThread::GetCurrentId() ;
-       
+
     gs_critsectWaitingForGui = new wxCriticalSection();
 
     gs_critsectGui = new wxCriticalSection();
     gs_critsectGui->Enter();
-       
-       return TRUE;
+
+       return true;
 }
 
 void wxThreadModule::OnExit()
index 9ce3354d4692bc6fc019c87aef19ff4a4321814b..dee2ce7c8044cd463e22f5c2d741ee05fb93cfff 100644 (file)
@@ -24,9 +24,9 @@
     #include "wx/app.h"
     #include "wx/msgdlg.h"
     #include "wx/dcprint.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/mac/uma.h"
 
 #include "wx/mac/printmac.h"
index 88e9abb5e023cd03c79faa3f799174842e4971d2..2a2f9a74400c966e0378716e7582cfec80fcb44e 100644 (file)
@@ -1,23 +1,23 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:          src/mac/carbon/thread.cpp
-// Purpose:      wxThread Implementation
-// Author:        Original from Wolfram Gloger/Guilhem Lavaux/Vadim Zeitlin
+// Name:        src/mac/carbon/thread.cpp
+// Purpose:     wxThread Implementation
+// Author:      Original from Wolfram Gloger/Guilhem Lavaux/Vadim Zeitlin
 // Modified by: Aj Lavin, Stefan Csomor
-// Created:       04/22/98
-// RCS-ID:        $Id$
-// Copyright:    (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998),
-//                     Vadim Zeitlin (1999), Stefan Csomor (2000)
-// Licence:        wxWindows licence
+// Created:     04/22/98
+// RCS-ID:      $Id$
+// Copyright:   (c) Wolfram Gloger (1996, 1997); Guilhem Lavaux (1998),
+//                  Vadim Zeitlin (1999), Stefan Csomor (2000)
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/wxprec.h"
 
 #if defined(__BORLANDC__)
-#pragma hdrstop
+    #pragma hdrstop
 #endif
 
 #ifndef WX_PRECOMP
-#include "wx/wx.h"
+    #include "wx/wx.h"
 #endif
 
 #if wxUSE_THREADS
@@ -31,7 +31,6 @@
 #else
     #include <DriverServices.h>
     #include <Multiprocessing.h>
-    #include "wx/math.h"
 #endif
 
 #include "wx/mac/uma.h"
index d5aeff7bbb3b6472f0135475a2a6860c41d57526..a76be690b6c2e40e255bdf816843a8661a3e3b4d 100644 (file)
     #include "wx/window.h"
     #include "wx/dcmemory.h"
     #include "wx/toplevel.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/region.h"
-#include "wx/math.h"
 #include "wx/mac/private.h"
 
 //-----------------------------------------------------------------------------
index fb7d386862c32f635f32616df3215f3d154e9759..b26db3e8c6709ee4ef369abc8585147d3d87fd00 100644 (file)
@@ -20,9 +20,9 @@
 
 #ifndef WX_PRECOMP
     #include "wx/msgdlg.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
 #include "wx/mac/uma.h"
 #include "wx/mac/private/print.h"
 
index bec6dd5146469e9ac469caada8c8b8124669e1c6..f79d04c32be5344674cc58df71d90d8a6214384e 100644 (file)
 
 #include "wx/motif/bmpmotif.h"
 
+#ifndef WX_PRECOMP
+    #include "wx/math.h"
+#endif
+
 #ifdef __VMS__
 #pragma message disable nosimpint
 #endif
@@ -33,8 +37,6 @@
     #include <X11/xpm.h>
 #endif
 
-#include "wx/math.h"
-
 Pixmap XCreateInsensitivePixmap( Display *display, Pixmap pixmap );
 
 static inline wxCharBuffer GetCacheImageName(WXImage image)
index cd858688c367efef897af2d462c77071199c598a..94bd4419e5f3cbf25bbad5bf660058f057447169 100644 (file)
     #include "wx/app.h"
     #include "wx/window.h"
     #include "wx/dcmemory.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/image.h"
-#include "wx/math.h"
 
 #ifdef __VMS__
 #pragma message disable nosimpint
index 4282b46c2b59382fa86735e0cb6491918851e299..21d50103f3922e0e9cea0096a881d77573640521 100644 (file)
     #include "wx/utils.h"
     #include "wx/dialog.h"
     #include "wx/cmndata.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/msw/private.h"
-#include "wx/math.h"
 #include "wx/msw/wrapcdlg.h"
 
 #include <stdlib.h>
index 1850d5e873106a010b5c2e0a620d2d67e1679041..81687b72fe4d139b96567e3abce4c45e73d17b04 100644 (file)
@@ -33,6 +33,7 @@
     #include "wx/log.h"
     #include "wx/window.h"
     #include "wx/dcmemory.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/msw/private.h"
@@ -43,7 +44,6 @@
 
 #include "wx/printdlg.h"
 #include "wx/msw/printdlg.h"
-#include "wx/math.h"
 
 #include "wx/msw/wrapcdlg.h"
 #ifndef __WIN32__
index 87c21c141deadaa916f5614fe38630aaa9300d8c..76c8f73ecccb68535dcc7e556ae8635c057525a3 100644 (file)
@@ -35,6 +35,7 @@
     #include "wx/intl.h"
     #include "wx/log.h"
     #include "wx/app.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/msw/wrapcdlg.h"
@@ -44,7 +45,6 @@
 
 #include "wx/filename.h"
 #include "wx/tokenzr.h"
-#include "wx/math.h"
 
 #include "wx/msw/missing.h"
 
index 2c5a32114dd009d2349b5078edb58238b586c4ad..72802a232f255f8cdc2e35a3f2feaf5ce00bd96b 100644 (file)
     #include "wx/dialog.h"
     #include "wx/log.h"
     #include "wx/cmndata.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/msw/wrapcdlg.h"
 
-#include "wx/math.h"
-
 #include <stdlib.h>
 #include <string.h>
 
index afa432cd220ddade679cc524a3475247d6ae9121..885ab1ed1454519836370691ccc8495b11a2b57f 100644 (file)
@@ -38,9 +38,9 @@
     #include "wx/log.h"
     #include "wx/dcclient.h"
     #include "wx/timer.h"
+    #include "wx/math.h"        // log10 & pow
 #endif
 
-#include "wx/math.h"        // log10 & pow
 #include "wx/msw/private.h" // user info and wndproc setting/getting
 #include "wx/dynlib.h"
 
index de07e983b14518a662d3e227c847ea3f9ad0a1cc..cee182bf065f6c915ae00389359e476e795b9e95 100644 (file)
@@ -64,9 +64,9 @@
     #include "wx/log.h"
     #include "wx/dcclient.h"
     #include "wx/timer.h"
+    #include "wx/math.h"        // log10 & pow
 #endif
 
-#include "wx/math.h"        // log10 & pow
 #include "wx/msw/private.h" // user info and wndproc setting/getting
 #include "wx/dynlib.h"
 #include "wx/stopwatch.h"
index 108bd936b982096aecd4cd3e4d02e00968e89a77..23415001823e0cde63d73f42a8bb7c1c1dae6dd2 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/dcclient.h"
+    #include "wx/math.h"
 #endif
 
-#include "wx/math.h"
-
 // I don't know why members of tagVARIANT aren't found when compiling
 // with Wine
 #ifndef __WINE__
index 28464845afae3d926efde7342e6b39122b975e56..b1bb3076fb8b5950753e910e9cdd45a2063ceb07 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/log.h"
+    #include "wx/math.h"
 #endif
 
 #define _FORCENAMELESSUNION
 #include "wx/msw/private.h"
 #include "wx/msw/ole/oleutils.h"
 #include "wx/msw/ole/automtn.h"
-#include "wx/math.h"
 
 #ifdef __WXWINCE__
 #include "wx/msw/wince/time.h"
index 6139786ca5f3b1c8f43de6b42d8fd9286ecd81e5..91951610bb987cd7c7f2be96a40d2ee9cfea8e35 100644 (file)
@@ -19,6 +19,7 @@
     #include "wx/app.h"
     #include "wx/dcmemory.h"
     #include "wx/icon.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/image.h"
@@ -42,7 +43,6 @@ bool wxGetImageFromDrawable(GR_DRAW_ID drawable, int srcX, int srcY, int width,
 #include "wx/wfstream.h"
 #endif
 #endif
-#include "wx/math.h"
 
 //-----------------------------------------------------------------------------
 // wxMask
index 5e3b5728cbd6ed54a3f48069ad7f0680cdfef7eb..37787a903d75b339f579f3786a82c5da65c5f169 100644 (file)
@@ -18,6 +18,7 @@
     #include "wx/app.h"
     #include "wx/window.h"
     #include "wx/dcmemory.h"
+    #include "wx/math.h"
 #endif
 
 #include "wx/image.h"
@@ -26,8 +27,6 @@
 
 #include "wx/x11/private.h"
 
-#include "wx/math.h"
-
 #if wxUSE_UNICODE
 #include "glib.h"
 #include "pango/pangox.h"
@@ -1594,7 +1593,7 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
 #endif
     {
         XDrawString( (Display*) m_display, (Window) m_window,
-            (GC) m_textGC, x, y + XFontStructGetAscent(xfont), text.c_str(), text.Len() );
+            (GC) m_textGC, x, y + XFontStructGetAscent(xfont), text.c_str(), text.length() );
     }
 
 #if 0
@@ -1670,7 +1669,7 @@ void wxWindowDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoor
     int direction, ascent, descent2;
     XCharStruct overall;
 
-    XTextExtents( xfont, (char*) string.c_str(), string.Len(), &direction,
+    XTextExtents( xfont, (char*) string.c_str(), string.length(), &direction,
         &ascent, &descent2, &overall);
 
     if (width)