2003-03-21 21:56:04 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2003-04-06 21:44:11 -04:00
|
|
|
// Name: wx/cocoa/dcclient.h
|
2007-12-03 23:22:16 -05:00
|
|
|
// Purpose: wxClientDCImpl, wxPaintDCImpl and wxWindowDCImpl classes
|
2003-04-06 21:44:11 -04:00
|
|
|
// Author: David Elliott
|
2003-03-21 21:56:04 -05:00
|
|
|
// Modified by:
|
2003-04-06 21:44:11 -04:00
|
|
|
// Created: 2003/04/01
|
2003-03-21 21:56:04 -05:00
|
|
|
// RCS-ID: $Id$
|
2003-04-06 21:44:11 -04:00
|
|
|
// Copyright: (c) 2003 David Elliott
|
2006-10-17 10:44:52 -04:00
|
|
|
// Licence: wxWindows licence
|
2003-03-21 21:56:04 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-04-06 21:44:11 -04:00
|
|
|
#ifndef __WX_COCOA_DCCLIENT_H__
|
|
|
|
#define __WX_COCOA_DCCLIENT_H__
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2007-12-03 23:22:16 -05:00
|
|
|
#include "wx/cocoa/dc.h"
|
2003-03-21 21:56:04 -05:00
|
|
|
|
2003-04-06 21:44:11 -04:00
|
|
|
// DFE: A while ago I stumbled upon the fact that retrieving the parent
|
|
|
|
// NSView of the content view seems to return the entire window rectangle
|
|
|
|
// (including decorations). Of course, that is not at all part of the
|
|
|
|
// Cocoa or OpenStep APIs, but it might be a neat hack.
|
2007-12-03 23:22:16 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxWindowDCImpl: public wxCocoaDCImpl
|
2003-03-21 21:56:04 -05:00
|
|
|
{
|
2007-12-03 23:22:16 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxWindowDCImpl)
|
2003-04-06 21:44:11 -04:00
|
|
|
public:
|
2007-12-03 23:22:16 -05:00
|
|
|
wxWindowDCImpl(wxDC *owner);
|
2003-04-06 21:44:11 -04:00
|
|
|
// Create a DC corresponding to a window
|
2007-12-03 23:22:16 -05:00
|
|
|
wxWindowDCImpl(wxDC *owner, wxWindow *win);
|
|
|
|
virtual ~wxWindowDCImpl(void);
|
2003-07-09 14:38:44 -04:00
|
|
|
|
2003-07-09 10:56:56 -04:00
|
|
|
protected:
|
|
|
|
wxWindow *m_window;
|
2003-09-08 11:42:40 -04:00
|
|
|
WX_NSView m_lockedNSView;
|
|
|
|
// DC stack
|
|
|
|
virtual bool CocoaLockFocus();
|
|
|
|
virtual bool CocoaUnlockFocus();
|
|
|
|
bool CocoaLockFocusOnNSView(WX_NSView nsview);
|
|
|
|
bool CocoaUnlockFocusOnNSView();
|
2005-01-17 16:30:53 -05:00
|
|
|
virtual bool CocoaGetBounds(void *rectData);
|
2003-03-21 21:56:04 -05:00
|
|
|
};
|
|
|
|
|
2007-12-03 23:22:16 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxClientDCImpl: public wxWindowDCImpl
|
2003-03-21 21:56:04 -05:00
|
|
|
{
|
2007-12-03 23:22:16 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxClientDCImpl)
|
2003-04-06 21:44:11 -04:00
|
|
|
public:
|
2007-12-03 23:22:16 -05:00
|
|
|
wxClientDCImpl(wxDC *owner);
|
2003-04-06 21:44:11 -04:00
|
|
|
// Create a DC corresponding to a window
|
2007-12-03 23:22:16 -05:00
|
|
|
wxClientDCImpl(wxDC *owner, wxWindow *win);
|
|
|
|
virtual ~wxClientDCImpl(void);
|
2003-07-21 13:06:02 -04:00
|
|
|
protected:
|
|
|
|
// DC stack
|
|
|
|
virtual bool CocoaLockFocus();
|
|
|
|
virtual bool CocoaUnlockFocus();
|
2003-03-21 21:56:04 -05:00
|
|
|
};
|
|
|
|
|
2007-12-03 23:22:16 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxPaintDCImpl: public wxWindowDCImpl
|
2003-03-21 21:56:04 -05:00
|
|
|
{
|
2007-12-03 23:22:16 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPaintDCImpl)
|
2003-04-06 21:44:11 -04:00
|
|
|
public:
|
2007-12-03 23:22:16 -05:00
|
|
|
wxPaintDCImpl(wxDC *owner);
|
2003-04-06 21:44:11 -04:00
|
|
|
// Create a DC corresponding to a window
|
2007-12-03 23:22:16 -05:00
|
|
|
wxPaintDCImpl(wxDC *owner, wxWindow *win);
|
|
|
|
virtual ~wxPaintDCImpl(void);
|
2003-07-21 13:06:02 -04:00
|
|
|
protected:
|
|
|
|
// DC stack
|
|
|
|
virtual bool CocoaLockFocus();
|
|
|
|
virtual bool CocoaUnlockFocus();
|
2003-03-21 21:56:04 -05:00
|
|
|
};
|
|
|
|
|
2006-10-17 10:44:52 -04:00
|
|
|
#endif
|
|
|
|
// __WX_COCOA_DCCLIENT_H__
|