2003-03-22 02:56:04 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2003-04-07 01:44:11 +00:00
|
|
|
// Name: wx/cocoa/dcclient.h
|
2003-03-22 02:56:04 +00:00
|
|
|
// Purpose: wxClientDC, wxPaintDC and wxWindowDC classes
|
2003-04-07 01:44:11 +00:00
|
|
|
// Author: David Elliott
|
2003-03-22 02:56:04 +00:00
|
|
|
// Modified by:
|
2003-04-07 01:44:11 +00:00
|
|
|
// Created: 2003/04/01
|
2003-03-22 02:56:04 +00:00
|
|
|
// RCS-ID: $Id$
|
2003-04-07 01:44:11 +00:00
|
|
|
// Copyright: (c) 2003 David Elliott
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2003-03-22 02:56:04 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2003-04-07 01:44:11 +00:00
|
|
|
#ifndef __WX_COCOA_DCCLIENT_H__
|
|
|
|
#define __WX_COCOA_DCCLIENT_H__
|
2003-03-22 02:56:04 +00:00
|
|
|
|
|
|
|
#include "wx/dc.h"
|
|
|
|
|
2003-04-07 01:44:11 +00: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.
|
|
|
|
class wxWindowDC: public wxDC
|
2003-03-22 02:56:04 +00:00
|
|
|
{
|
2003-04-07 01:44:11 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxWindowDC)
|
|
|
|
public:
|
|
|
|
wxWindowDC(void);
|
|
|
|
// Create a DC corresponding to a window
|
|
|
|
wxWindowDC(wxWindow *win);
|
|
|
|
~wxWindowDC(void);
|
2003-07-09 18:38:44 +00:00
|
|
|
|
2003-07-09 14:56:56 +00:00
|
|
|
protected:
|
|
|
|
wxWindow *m_window;
|
2003-09-08 15:42:40 +00:00
|
|
|
WX_NSView m_lockedNSView;
|
|
|
|
// DC stack
|
|
|
|
virtual bool CocoaLockFocus();
|
|
|
|
virtual bool CocoaUnlockFocus();
|
|
|
|
bool CocoaLockFocusOnNSView(WX_NSView nsview);
|
|
|
|
bool CocoaUnlockFocusOnNSView();
|
2005-01-17 21:30:53 +00:00
|
|
|
virtual bool CocoaGetBounds(void *rectData);
|
2003-03-22 02:56:04 +00:00
|
|
|
};
|
|
|
|
|
2003-04-07 01:44:11 +00:00
|
|
|
class wxClientDC: public wxWindowDC
|
2003-03-22 02:56:04 +00:00
|
|
|
{
|
2003-04-07 01:44:11 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxClientDC)
|
|
|
|
public:
|
|
|
|
wxClientDC(void);
|
|
|
|
// Create a DC corresponding to a window
|
|
|
|
wxClientDC(wxWindow *win);
|
|
|
|
~wxClientDC(void);
|
2003-07-21 17:06:02 +00:00
|
|
|
protected:
|
|
|
|
// DC stack
|
|
|
|
virtual bool CocoaLockFocus();
|
|
|
|
virtual bool CocoaUnlockFocus();
|
2003-03-22 02:56:04 +00:00
|
|
|
};
|
|
|
|
|
2003-04-07 01:44:11 +00:00
|
|
|
class wxPaintDC: public wxWindowDC
|
2003-03-22 02:56:04 +00:00
|
|
|
{
|
2003-04-07 01:44:11 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxPaintDC)
|
|
|
|
public:
|
|
|
|
wxPaintDC(void);
|
|
|
|
// Create a DC corresponding to a window
|
|
|
|
wxPaintDC(wxWindow *win);
|
|
|
|
~wxPaintDC(void);
|
2003-07-21 17:06:02 +00:00
|
|
|
protected:
|
|
|
|
// DC stack
|
|
|
|
virtual bool CocoaLockFocus();
|
|
|
|
virtual bool CocoaUnlockFocus();
|
2003-03-22 02:56:04 +00:00
|
|
|
};
|
|
|
|
|
2003-04-07 01:44:11 +00:00
|
|
|
#endif // __WX_COCOA_DCCLIENT_H__
|