2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dcclient.h
|
|
|
|
// Purpose: wxClientDC, wxPaintDC and wxWindowDC classes
|
|
|
|
// Author: Stefan Csomor
|
|
|
|
// Modified by:
|
|
|
|
// Created: 1998-01-01
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Stefan Csomor
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
2004-03-23 12:35:05 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DCCLIENT_H_
|
|
|
|
#define _WX_DCCLIENT_H_
|
|
|
|
|
|
|
|
#include "wx/dc.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-07-09 06:09:52 -04:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxPaintDC;
|
|
|
|
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
2004-03-23 12:35:05 -05:00
|
|
|
|
|
|
|
class WXDLLEXPORT wxWindowDC: public wxDC
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxWindowDC)
|
|
|
|
|
|
|
|
public:
|
|
|
|
wxWindowDC(void);
|
|
|
|
|
|
|
|
// Create a DC corresponding to a canvas
|
|
|
|
wxWindowDC(wxWindow *win);
|
|
|
|
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxWindowDC(void);
|
2006-09-22 10:25:23 -04:00
|
|
|
wxWindow *GetWindow() const { return m_window; }
|
2004-03-23 12:35:05 -05:00
|
|
|
protected :
|
2006-02-08 16:47:09 -05:00
|
|
|
virtual void DoGetSize( int *width, int *height ) const;
|
2006-10-29 14:43:25 -05:00
|
|
|
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
|
2004-03-23 12:35:05 -05:00
|
|
|
wxWindow *m_window;
|
2006-10-20 06:27:41 -04:00
|
|
|
#if wxMAC_USE_CORE_GRAPHICS
|
|
|
|
bool m_release;
|
|
|
|
int m_width;
|
|
|
|
int m_height;
|
|
|
|
#endif
|
2004-03-23 12:35:05 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxClientDC: public wxWindowDC
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxClientDC)
|
|
|
|
|
|
|
|
public:
|
|
|
|
wxClientDC(void);
|
|
|
|
|
|
|
|
// Create a DC corresponding to a canvas
|
|
|
|
wxClientDC(wxWindow *win);
|
|
|
|
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxClientDC(void);
|
2006-02-08 16:47:09 -05:00
|
|
|
|
|
|
|
protected:
|
2006-10-20 06:27:41 -04:00
|
|
|
#if !wxMAC_USE_CORE_GRAPHICS
|
2004-03-23 12:35:05 -05:00
|
|
|
virtual void DoGetSize( int *width, int *height ) const;
|
2006-10-20 06:27:41 -04:00
|
|
|
#endif
|
2004-03-23 12:35:05 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxPaintDC: public wxWindowDC
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxPaintDC)
|
|
|
|
|
|
|
|
public:
|
|
|
|
wxPaintDC(void);
|
|
|
|
|
|
|
|
// Create a DC corresponding to a canvas
|
|
|
|
wxPaintDC(wxWindow *win);
|
|
|
|
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxPaintDC(void);
|
2006-02-08 16:47:09 -05:00
|
|
|
|
|
|
|
protected:
|
2006-10-20 06:27:41 -04:00
|
|
|
#if !wxMAC_USE_CORE_GRAPHICS
|
2004-03-23 12:35:05 -05:00
|
|
|
virtual void DoGetSize( int *width, int *height ) const;
|
2006-10-20 06:27:41 -04:00
|
|
|
#endif
|
2004-03-23 12:35:05 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_DCCLIENT_H_
|