]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dcbase.cpp
Don't block in wxEventLoopManual::Dispatch() if loop was exited.
[wxWidgets.git] / src / common / dcbase.cpp
index dd745d02fb67a6efd13b2842de9ba2e9038683c2..87e60977c6cdfe5eb67b64db9f4dff5090a7f695 100644 (file)
@@ -35,6 +35,7 @@
 #ifndef WX_PRECOMP
     #include "wx/math.h"
     #include "wx/module.h"
+    #include "wx/window.h"
 #endif
 
 #ifdef __WXMSW__
     #include "wx/dfb/dcscreen.h"
 #endif
 
-#ifdef __WXPALMOS__
-    #include "wx/palmos/dcclient.h"
-    #include "wx/palmos/dcmemory.h"
-    #include "wx/palmos/dcscreen.h"
-#endif
-
 //----------------------------------------------------------------------------
 // wxDCFactory
 //----------------------------------------------------------------------------
@@ -927,9 +922,9 @@ void wxDCImpl::DoDrawSpline( const wxPointList *points )
     wx_spline_add_point(x1, y1);
 
     while ((node = node->GetNext())
-#if !wxUSE_STL
+#if !wxUSE_STD_CONTAINERS
            != NULL
-#endif // !wxUSE_STL
+#endif // !wxUSE_STD_CONTAINERS
           )
     {
         p = node->GetData();
@@ -1134,6 +1129,27 @@ void wxDCImpl::InheritAttributes(wxWindow *win)
     SetLayoutDirection(win->GetLayoutDirection());
 }
 
+void wxDCImpl::DoGetFontMetrics(int *height,
+                                int *ascent,
+                                int *descent,
+                                int *internalLeading,
+                                int *externalLeading,
+                                int *averageWidth) const
+{
+    // Average width is typically the same as width of 'x'.
+    wxCoord h, d;
+    DoGetTextExtent("x", averageWidth, &h, &d, externalLeading);
+
+    if ( height )
+        *height = h;
+    if ( ascent )
+        *ascent = h - d;
+    if ( descent )
+        *descent = d;
+    if ( internalLeading )
+        *internalLeading = 0;
+}
+
 //-----------------------------------------------------------------------------
 // wxDC
 //-----------------------------------------------------------------------------
@@ -1161,7 +1177,7 @@ void wxDC::DrawLabel(const wxString& text,
     GetMultiLineTextExtent(text, &widthText, &heightText, &heightLine);
 
     wxCoord width, height;
-    if ( bitmap.Ok() )
+    if ( bitmap.IsOk() )
     {
         width = widthText + bitmap.GetWidth();
         height = bitmap.GetHeight();
@@ -1203,7 +1219,7 @@ void wxDC::DrawLabel(const wxString& text,
     wxCoord x0 = x,
             y0 = y,
             width0 = width;
-    if ( bitmap.Ok() )
+    if ( bitmap.IsOk() )
     {
         DrawBitmap(bitmap, x, y, true /* use mask */);
 
@@ -1581,7 +1597,7 @@ void wxDCImpl::CalculateEllipticPoints( wxPointList* points,
             y2 = y2-y-y+1;
             --y;
         }
-        // old y now to big: set point with old y, old x
+        // old y now too big: set point with old y, old x
         if( bNewPoint && x>1)
         {
             int x1 = x - 1;