1 ///////////////////////////////////////////////////////////////////////////// 
   2 // Name:        wx/palmos/dcclient.h 
   3 // Purpose:     wxClientDC class 
   4 // Author:      William Osborne - minimal working wxPalmOS port 
   8 // Copyright:   (c) William Osborne 
   9 // Licence:     wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  12 #ifndef _WX_DCCLIENT_H_ 
  13 #define _WX_DCCLIENT_H_ 
  15 // ---------------------------------------------------------------------------- 
  17 // ---------------------------------------------------------------------------- 
  20 #include "wx/palmos/dc.h" 
  21 #include "wx/dcclient.h" 
  22 #include "wx/dynarray.h" 
  24 // ---------------------------------------------------------------------------- 
  26 // ---------------------------------------------------------------------------- 
  28 // this one if used by wxPaintDC only 
  29 struct WXDLLIMPEXP_FWD_CORE wxPaintDCInfo
; 
  31 WX_DECLARE_EXPORTED_OBJARRAY(wxPaintDCInfo
, wxArrayDCInfo
); 
  33 // ---------------------------------------------------------------------------- 
  35 // ---------------------------------------------------------------------------- 
  37 class WXDLLIMPEXP_CORE wxWindowDCImpl 
: public wxPalmDCImpl
 
  41     wxWindowDCImpl( wxDC 
*owner 
); 
  43     // Create a DC corresponding to the whole window 
  44     wxWindowDCImpl( wxDC 
*owner
, wxWindow 
*win 
); 
  46     virtual void DoGetSize(int *width
, int *height
) const; 
  49     // initialize the newly created DC 
  52     DECLARE_CLASS(wxWindowDCImpl
) 
  53     DECLARE_NO_COPY_CLASS(wxWindowDCImpl
) 
  56 class WXDLLIMPEXP_CORE wxClientDCImpl 
: public wxWindowDCImpl
 
  60     wxClientDCImpl( wxDC 
*owner 
); 
  62     // Create a DC corresponding to the client area of the window 
  63     wxClientDCImpl( wxDC 
*owner
, wxWindow 
*win 
); 
  65     virtual ~wxClientDCImpl(); 
  67     virtual void DoGetSize(int *width
, int *height
) const; 
  72     DECLARE_CLASS(wxClientDCImpl
) 
  73     DECLARE_NO_COPY_CLASS(wxClientDCImpl
) 
  76 class WXDLLIMPEXP_CORE wxPaintDCImpl 
: public wxClientDCImpl
 
  79     wxPaintDCImpl( wxDC 
*owner 
); 
  81     // Create a DC corresponding for painting the window in OnPaint() 
  82     wxPaintDCImpl( wxDC 
*owner
, wxWindow 
*win 
); 
  84     virtual ~wxPaintDCImpl(); 
  86     // find the entry for this DC in the cache (keyed by the window) 
  87     static WXHDC 
FindDCInCache(wxWindow
* win
); 
  90     static wxArrayDCInfo ms_cache
; 
  92     // find the entry for this DC in the cache (keyed by the window) 
  93     wxPaintDCInfo 
*FindInCache(size_t *index 
= NULL
) const; 
  95     DECLARE_CLASS(wxPaintDCImpl
) 
  96     DECLARE_NO_COPY_CLASS(wxPaintDCImpl
)