2004-10-19 09:40:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-01-18 16:14:27 -05:00
|
|
|
// Name: wx/palmos/dcclient.h
|
2004-10-19 09:40:30 -04:00
|
|
|
// Purpose: wxClientDC class
|
2005-01-18 16:14:27 -05:00
|
|
|
// Author: William Osborne - minimal working wxPalmOS port
|
2004-10-19 09:40:30 -04:00
|
|
|
// Modified by:
|
|
|
|
// Created: 10/13/04
|
2005-01-18 16:14:27 -05:00
|
|
|
// RCS-ID: $Id$
|
2004-10-19 09:40:30 -04:00
|
|
|
// Copyright: (c) William Osborne
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_DCCLIENT_H_
|
|
|
|
#define _WX_DCCLIENT_H_
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// headers
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#include "wx/dc.h"
|
2007-12-14 20:25:56 -05:00
|
|
|
#include "wx/palmos/dc.h"
|
|
|
|
#include "wx/dcclient.h"
|
2004-10-19 09:40:30 -04:00
|
|
|
#include "wx/dynarray.h"
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// array types
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// this one if used by wxPaintDC only
|
2007-07-09 06:09:52 -04:00
|
|
|
struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo;
|
2004-10-19 09:40:30 -04:00
|
|
|
|
|
|
|
WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo, wxArrayDCInfo);
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// DC classes
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxPalmDCImpl
|
2004-10-19 09:40:30 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// default ctor
|
2007-12-14 20:25:56 -05:00
|
|
|
wxWindowDCImpl( wxDC *owner );
|
2004-10-19 09:40:30 -04:00
|
|
|
|
|
|
|
// Create a DC corresponding to the whole window
|
2007-12-14 20:25:56 -05:00
|
|
|
wxWindowDCImpl( wxDC *owner, wxWindow *win );
|
|
|
|
|
|
|
|
virtual void DoGetSize(int *width, int *height) const;
|
2004-10-19 09:40:30 -04:00
|
|
|
|
|
|
|
protected:
|
2005-05-31 05:20:43 -04:00
|
|
|
// initialize the newly created DC
|
2004-10-19 09:40:30 -04:00
|
|
|
void InitDC();
|
|
|
|
|
2007-12-14 20:25:56 -05:00
|
|
|
DECLARE_CLASS(wxWindowDCImpl)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxWindowDCImpl);
|
2004-10-19 09:40:30 -04:00
|
|
|
};
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
|
2004-10-19 09:40:30 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
// default ctor
|
2007-12-14 20:25:56 -05:00
|
|
|
wxClientDCImpl( wxDC *owner );
|
2004-10-19 09:40:30 -04:00
|
|
|
|
|
|
|
// Create a DC corresponding to the client area of the window
|
2007-12-14 20:25:56 -05:00
|
|
|
wxClientDCImpl( wxDC *owner, wxWindow *win );
|
2004-10-19 09:40:30 -04:00
|
|
|
|
2007-12-14 20:25:56 -05:00
|
|
|
virtual ~wxClientDCImpl();
|
|
|
|
|
|
|
|
virtual void DoGetSize(int *width, int *height) const;
|
2004-10-19 09:40:30 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void InitDC();
|
|
|
|
|
2007-12-14 20:25:56 -05:00
|
|
|
DECLARE_CLASS(wxClientDCImpl)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxClientDCImpl);
|
2004-10-19 09:40:30 -04:00
|
|
|
};
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
|
2004-10-19 09:40:30 -04:00
|
|
|
{
|
|
|
|
public:
|
2007-12-14 20:25:56 -05:00
|
|
|
wxPaintDCImpl( wxDC *owner );
|
2004-10-19 09:40:30 -04:00
|
|
|
|
|
|
|
// Create a DC corresponding for painting the window in OnPaint()
|
2007-12-14 20:25:56 -05:00
|
|
|
wxPaintDCImpl( wxDC *owner, wxWindow *win );
|
2004-10-19 09:40:30 -04:00
|
|
|
|
2007-12-14 20:25:56 -05:00
|
|
|
virtual ~wxPaintDCImpl();
|
2004-10-19 09:40:30 -04:00
|
|
|
|
|
|
|
// find the entry for this DC in the cache (keyed by the window)
|
|
|
|
static WXHDC FindDCInCache(wxWindow* win);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
static wxArrayDCInfo ms_cache;
|
|
|
|
|
|
|
|
// find the entry for this DC in the cache (keyed by the window)
|
|
|
|
wxPaintDCInfo *FindInCache(size_t *index = NULL) const;
|
|
|
|
|
2007-12-14 20:25:56 -05:00
|
|
|
DECLARE_CLASS(wxPaintDCImpl)
|
2009-02-08 06:45:59 -05:00
|
|
|
wxDECLARE_NO_COPY_CLASS(wxPaintDCImpl);
|
2004-10-19 09:40:30 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_DCCLIENT_H_
|