]> git.saurik.com Git - wxWidgets.git/commitdiff
changed wxHAS_NATIVE_OVERLAY and wxHAS_CARET_USING_OVERLAYS to use #ifdef instead...
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 25 Oct 2006 12:12:56 +0000 (12:12 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 25 Oct 2006 12:12:56 +0000 (12:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/caret.h
include/wx/generic/caret.h
include/wx/generic/dragimgg.h
include/wx/overlay.h
include/wx/private/overlay.h
src/common/overlaycmn.cpp
src/generic/caret.cpp
src/generic/dragimgg.cpp
src/mac/carbon/overlay.cpp

index 3b94c9260449a7c64856aa5aee602a857e73d12c..8cff8f2f48b6cb9ab54db5aa633c6b7e2d3b1edb 100644 (file)
@@ -199,17 +199,13 @@ private:
     #include "wx/generic/caret.h"
 #endif // platform
 
-#ifndef wxHAS_CARET_USING_OVERLAYS
-    #define wxHAS_CARET_USING_OVERLAYS 0
-#endif
-
 // ----------------------------------------------------------------------------
 // wxCaretSuspend: a simple class which hides the caret in its ctor and
 // restores it in the dtor, this should be used when drawing on the screen to
 // avoid overdrawing the caret
 // ----------------------------------------------------------------------------
 
-#if wxHAS_CARET_USING_OVERLAYS
+#ifdef wxHAS_CARET_USING_OVERLAYS
 
 // we don't need to hide the caret if it's rendered using overlays
 class WXDLLEXPORT wxCaretSuspend
index f9dd4d386626284d577e1e99b00555510f627bc9..e19212316d87416fb3d5b0e2d606846dab3df387 100644 (file)
 #include "wx/dc.h"
 #include "wx/overlay.h"
 
-#if wxHAS_NATIVE_OVERLAY
-    #define wxHAS_CARET_USING_OVERLAYS 1
-#else
-    #define wxHAS_CARET_USING_OVERLAYS 0
+#ifdef wxHAS_NATIVE_OVERLAY
+    #define wxHAS_CARET_USING_OVERLAYS
 #endif
 
 class WXDLLIMPEXP_CORE wxCaret;
@@ -78,7 +76,7 @@ private:
     // GTK specific initialization
     void InitGeneric();
 
-#if wxHAS_CARET_USING_OVERLAYS
+#ifdef wxHAS_CARET_USING_OVERLAYS
     // the overlay for displaying the caret
     wxOverlay   m_overlay;
 #else
index 18b984d6d74d8cc405385c31a58db3d45f3da243..e680ecd30572e4165ad927c7ff31a4ff54fb9f30 100644 (file)
@@ -160,7 +160,7 @@ public:
     // For efficiency, tell wxGenericDragImage to use a bitmap that's already
     // created (e.g. from last drag)
     void SetBackingBitmap(wxBitmap* bitmap) { 
-#if !wxHAS_NATIVE_OVERLAY
+#ifndef wxHAS_NATIVE_OVERLAY
         m_pBackingBitmap = bitmap; 
 #endif
     }
@@ -247,7 +247,7 @@ protected:
     wxWindow*       m_window;
     wxDC*           m_windowDC;
 
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
     wxOverlay       m_overlay;
     wxDCOverlay*     m_dcOverlay;
 #else
index b99b850aa8ffa3f09437106978a41fd1332d2462..2b6d2678244d0cb5f23304406dcc088102670fc0 100644 (file)
 
 #include "wx/defs.h"
 
-#ifndef wxHAS_NATIVE_OVERLAY
-    #if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
-        #define wxHAS_NATIVE_OVERLAY 1
-    #elif defined(__WXDFB__)
-        #define wxHAS_NATIVE_OVERLAY 1
-    #else
-        #define wxHAS_NATIVE_OVERLAY 0
-    #endif
+#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS
+    #define wxHAS_NATIVE_OVERLAY 1
+#elif defined(__WXDFB__)
+    #define wxHAS_NATIVE_OVERLAY 1
+#else
+    // don't define wxHAS_NATIVE_OVERLAY
 #endif
 
 // ----------------------------------------------------------------------------
index a811441fbf157b594eb49f64788f442129ec8f82..71b265014fdaa256e539b0ca4eb65a748903a0d3 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "wx/overlay.h"
 
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
 
 #if defined(__WXMAC__)
     #include "wx/mac/carbon/private/overlay.h"
index 3936c87c107cf9da05a21cdd97fa6164789656a1..d25a45d77f85d1eea61e179661999dc17ccc9205 100644 (file)
@@ -125,7 +125,7 @@ void wxDCOverlay::Clear()
 // generic implementation of wxOverlayImpl
 // ----------------------------------------------------------------------------
 
-#if !wxHAS_NATIVE_OVERLAY
+#ifndef wxHAS_NATIVE_OVERLAY
 
 wxOverlayImpl::wxOverlayImpl()
 {
index 3391ab910ea4070bc62d09cdd56452a685811717..5cad74d0864ac08890d6c7d84d5b72cd8d3b9760 100644 (file)
@@ -88,7 +88,7 @@ void wxCaret::InitGeneric()
 {
     m_hasFocus = true;
     m_blinkedOut = true;
-#if !wxHAS_CARET_USING_OVERLAYS
+#ifndef wxHAS_CARET_USING_OVERLAYS
     m_xOld =
     m_yOld = -1;
     m_bmpUnderCaret.Create(m_width, m_height);
@@ -131,7 +131,7 @@ void wxCaret::DoHide()
 
 void wxCaret::DoMove()
 {
-#if wxHAS_CARET_USING_OVERLAYS
+#ifdef wxHAS_CARET_USING_OVERLAYS
     m_overlay.Reset();
 #endif
     if ( IsVisible() )
@@ -158,7 +158,7 @@ void wxCaret::DoSize()
         m_countVisible = 0;
         DoHide();
     }
-#if wxHAS_CARET_USING_OVERLAYS
+#ifdef wxHAS_CARET_USING_OVERLAYS
     m_overlay.Reset();
 #else
     // Change bitmap size
@@ -217,7 +217,7 @@ void wxCaret::Refresh()
 {
     wxClientDC dcWin(GetWindow());
 // this is the new code, switch to 0 if this gives problems
-#if wxHAS_CARET_USING_OVERLAYS
+#ifdef wxHAS_CARET_USING_OVERLAYS
     wxDCOverlay dcOverlay( m_overlay, &dcWin, m_x, m_y, m_width , m_height );
     if ( m_blinkedOut )
     {
index 6723b68a2e4a78f8a726efd39d9a15c08acce949..7ea5a4fabcb1a2bf923539bffb3f0734f3e5f4f8 100644 (file)
@@ -72,7 +72,7 @@ void wxGenericDragImage::Init()
     m_windowDC = (wxDC*) NULL;
     m_window = (wxWindow*) NULL;
     m_fullScreen = false;
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
     m_dcOverlay = NULL;
 #else
     m_pBackingBitmap = (wxBitmap*) NULL;
@@ -288,7 +288,7 @@ bool wxGenericDragImage::BeginDrag(const wxPoint& hotspot,
         }
     }
 
-#if !wxHAS_NATIVE_OVERLAY
+#ifndef wxHAS_NATIVE_OVERLAY
     wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap);
 
     if (!backing->Ok() || (backing->GetWidth() < clientSize.x || backing->GetHeight() < clientSize.y))
@@ -356,7 +356,7 @@ bool wxGenericDragImage::EndDrag()
 
     if (m_windowDC)
     {
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
         m_overlay.Reset();
 #else
         m_windowDC->DestroyClippingRegion();
@@ -365,7 +365,7 @@ bool wxGenericDragImage::EndDrag()
         m_windowDC = (wxDC*) NULL;
     }
 
-#if !wxHAS_NATIVE_OVERLAY
+#ifndef wxHAS_NATIVE_OVERLAY
     m_repairBitmap = wxNullBitmap;
 #endif
 
@@ -409,7 +409,7 @@ bool wxGenericDragImage::Show()
         // This is where we restore the backing bitmap, in case
         // something has changed on the window.
 
-#if !wxHAS_NATIVE_OVERLAY
+#ifndef wxHAS_NATIVE_OVERLAY
         wxBitmap* backing = (m_pBackingBitmap ? m_pBackingBitmap : (wxBitmap*) & m_backingBitmap);
         wxMemoryDC memDC;
         memDC.SelectObject(* backing);
@@ -460,7 +460,7 @@ bool wxGenericDragImage::RedrawImage(const wxPoint& oldPos, const wxPoint& newPo
     if (!m_windowDC)
         return false;
 
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
     wxDCOverlay dcoverlay( m_overlay, (wxWindowDC*) m_windowDC ) ;
     if ( eraseOld )
         dcoverlay.Clear() ;
index 7cb5e09e326df0f41202973e0017fc4d0c95b36e..f1e2e046ee168ba6da75e3d5b11aa47602a6ede9 100644 (file)
@@ -32,7 +32,7 @@
 
 #include "wx/private/overlay.h"
 
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
 
 // ============================================================================
 // implementation