+ virtual ~wxDC();
+
+//-------------------------------------------------------------------------
+// wxCocoa specifics
+//-------------------------------------------------------------------------
+public:
+ static void CocoaInitializeTextSystem();
+ static void CocoaShutdownTextSystem();
+ static WX_NSTextStorage sm_cocoaNSTextStorage;
+ static WX_NSLayoutManager sm_cocoaNSLayoutManager;
+ static WX_NSTextContainer sm_cocoaNSTextContainer;
+ // Create a simple Wx to Bounds transform (just flip the coordinate system)
+ static WX_NSAffineTransform CocoaGetWxToBoundsTransform(bool isFlipped, float height);
+protected:
+// DC stack
+ static wxCocoaDCStack sm_cocoaDCStack;
+ virtual bool CocoaLockFocus();
+ virtual bool CocoaUnlockFocus();
+ bool CocoaUnwindStackAndTakeFocus();
+ inline bool CocoaTakeFocus()
+ {
+ wxCocoaDCStack::compatibility_iterator node = sm_cocoaDCStack.GetFirst();
+ if(node && (node->GetData() == this))
+ return true;
+ return CocoaUnwindStackAndTakeFocus();
+ }
+ void CocoaUnwindStackAndLoseFocus();
+// DC flipping/transformation
+ void CocoaApplyTransformations();
+ void CocoaUnapplyTransformations();
+ WX_NSAffineTransform m_cocoaWxToBoundsTransform;
+// Get bounds rect (for Clear())
+ // note: we use void * to mean NSRect * so that we can avoid
+ // putting NSRect in the headers.
+ virtual bool CocoaGetBounds(void *rectData);
+// Blitting
+ virtual bool CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest,
+ wxCoord width, wxCoord height, wxCoord xsrc, wxCoord ysrc,
+ int logicalFunc, bool useMask, wxCoord xsrcMask, wxCoord ysrcMask);
+//-------------------------------------------------------------------------
+// Implementation
+//-------------------------------------------------------------------------
+public: