]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
Added wxDataViewListCtrl, use it in the sample
[wxWidgets.git] / src / msw / dc.cpp
index c912e076aaafb3a2a327587ebc272c6920f379e8..f99f3963bf580e9bc8634f5c4384a910c441d174 100644 (file)
@@ -399,6 +399,16 @@ wxBrushAttrsSetter::wxBrushAttrsSetter(wxMSWDCImpl& dc)
     }
 }
 
+// ----------------------------------------------------------------------------
+// wxDC MSW-specific methods
+// ----------------------------------------------------------------------------
+
+WXHDC wxDC::GetHDC() const
+{
+    wxMSWDCImpl * const impl = wxDynamicCast(GetImpl(), wxMSWDCImpl);
+    return impl ? impl->GetHDC() : 0;
+}
+
 // ---------------------------------------------------------------------------
 // wxMSWDCImpl
 // ---------------------------------------------------------------------------
@@ -695,7 +705,7 @@ void wxMSWDCImpl::Clear()
 bool wxMSWDCImpl::DoFloodFill(wxCoord WXUNUSED_IN_WINCE(x),
                        wxCoord WXUNUSED_IN_WINCE(y),
                        const wxColour& WXUNUSED_IN_WINCE(col),
-                       int WXUNUSED_IN_WINCE(style))
+                       wxFloodFillStyle WXUNUSED_IN_WINCE(style))
 {
 #ifdef __WXWINCE__
     return false;
@@ -878,7 +888,7 @@ void wxMSWDCImpl::DoDrawPolygon(int n,
                          wxPoint points[],
                          wxCoord xoffset,
                          wxCoord yoffset,
-                         int WXUNUSED_IN_WINCE(fillStyle))
+                         wxPolygonFillMode WXUNUSED_IN_WINCE(fillStyle))
 {
     WXMICROWIN_CHECK_HDC
 
@@ -927,7 +937,7 @@ wxMSWDCImpl::DoDrawPolyPolygon(int n,
                         wxPoint points[],
                         wxCoord xoffset,
                         wxCoord yoffset,
-                        int fillStyle)
+                        wxPolygonFillMode fillStyle)
 {
 #ifdef __WXWINCE__
     wxDCImpl::DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle);
@@ -1698,7 +1708,7 @@ void wxMSWDCImpl::SetBackgroundMode(int mode)
     // and m_backgroundMode is used there
 }
 
-void wxMSWDCImpl::SetLogicalFunction(int function)
+void wxMSWDCImpl::SetLogicalFunction(wxRasterOperationMode function)
 {
     WXMICROWIN_CHECK_HDC
 
@@ -1712,7 +1722,7 @@ void wxMSWDCImpl::SetRop(WXHDC dc)
     if ( !dc || m_logicalFunction < 0 )
         return;
 
-    int rop;
+    int rop wxDUMMY_INITIALIZE(0);
 
     switch (m_logicalFunction)
     {
@@ -1732,10 +1742,6 @@ void wxMSWDCImpl::SetRop(WXHDC dc)
         case wxNAND:         rop = R2_NOTMASKPEN;    break;
         case wxOR:           rop = R2_MERGEPEN;      break;
         case wxSET:          rop = R2_WHITE;         break;
-
-        default:
-           wxFAIL_MSG( wxT("unsupported logical function") );
-           return;
     }
 
     SetROP2(GetHdc(), rop);
@@ -1926,7 +1932,7 @@ void wxMSWDCImpl::RealizeScaleAndOrigin()
 #endif
 }
 
-void wxMSWDCImpl::SetMapMode(int mode)
+void wxMSWDCImpl::SetMapMode(wxMappingMode mode)
 {
     WXMICROWIN_CHECK_HDC
 
@@ -2053,7 +2059,7 @@ bool wxMSWDCImpl::DoBlit(wxCoord dstX, wxCoord dstY,
                   wxCoord dstWidth, wxCoord dstHeight,
                   wxDC *source,
                   wxCoord srcX, wxCoord srcY,
-                  int rop, bool useMask,
+                  wxRasterOperationMode rop, bool useMask,
                   wxCoord srcMaskX, wxCoord srcMaskY)
 {
     return DoStretchBlit(dstX, dstY, dstWidth, dstHeight, source, srcX, srcY, dstWidth, dstHeight, rop, useMask, srcMaskX, srcMaskY);
@@ -2064,7 +2070,7 @@ bool wxMSWDCImpl::DoStretchBlit(wxCoord xdest, wxCoord ydest,
                          wxDC *source,
                          wxCoord xsrc, wxCoord ysrc,
                          wxCoord srcWidth, wxCoord srcHeight,
-                         int rop, bool useMask,
+                         wxRasterOperationMode rop, bool useMask,
                          wxCoord xsrcMask, wxCoord ysrcMask)
 {
     wxCHECK_MSG( source, false, _T("wxMSWDCImpl::Blit(): NULL wxDC pointer") );