#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
#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;
// 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
// 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
}
wxWindow* m_window;
wxDC* m_windowDC;
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
wxOverlay m_overlay;
wxDCOverlay* m_dcOverlay;
#else
#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
// ----------------------------------------------------------------------------
#include "wx/overlay.h"
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
#if defined(__WXMAC__)
#include "wx/mac/carbon/private/overlay.h"
// generic implementation of wxOverlayImpl
// ----------------------------------------------------------------------------
-#if !wxHAS_NATIVE_OVERLAY
+#ifndef wxHAS_NATIVE_OVERLAY
wxOverlayImpl::wxOverlayImpl()
{
{
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);
void wxCaret::DoMove()
{
-#if wxHAS_CARET_USING_OVERLAYS
+#ifdef wxHAS_CARET_USING_OVERLAYS
m_overlay.Reset();
#endif
if ( IsVisible() )
m_countVisible = 0;
DoHide();
}
-#if wxHAS_CARET_USING_OVERLAYS
+#ifdef wxHAS_CARET_USING_OVERLAYS
m_overlay.Reset();
#else
// Change bitmap size
{
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 )
{
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;
}
}
-#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))
if (m_windowDC)
{
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
m_overlay.Reset();
#else
m_windowDC->DestroyClippingRegion();
m_windowDC = (wxDC*) NULL;
}
-#if !wxHAS_NATIVE_OVERLAY
+#ifndef wxHAS_NATIVE_OVERLAY
m_repairBitmap = wxNullBitmap;
#endif
// 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);
if (!m_windowDC)
return false;
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
wxDCOverlay dcoverlay( m_overlay, (wxWindowDC*) m_windowDC ) ;
if ( eraseOld )
dcoverlay.Clear() ;
#include "wx/private/overlay.h"
-#if wxHAS_NATIVE_OVERLAY
+#ifdef wxHAS_NATIVE_OVERLAY
// ============================================================================
// implementation