1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-22 21:28:01 -05:00
|
|
|
// Name: wx/gtk1/dcmemory.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-05-28 15:54:07 -04:00
|
|
|
// RCS-ID: $Id$
|
1998-10-26 05:56:58 -05:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKDCMEMORYH__
|
|
|
|
#define __GTKDCMEMORYH__
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/dcclient.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDC;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxMemoryDC
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2006-10-30 14:41:46 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC, public wxMemoryDCBase
|
1998-05-20 10:01:55 -04:00
|
|
|
{
|
1998-12-01 07:55:09 -05:00
|
|
|
public:
|
2006-10-30 14:41:46 -05:00
|
|
|
wxMemoryDC() { Init(); }
|
|
|
|
wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); }
|
1999-11-22 14:44:25 -05:00
|
|
|
wxMemoryDC( wxDC *dc ); // Create compatible DC
|
2006-09-05 16:47:48 -04:00
|
|
|
virtual ~wxMemoryDC();
|
1999-11-22 14:44:25 -05:00
|
|
|
void DoGetSize( int *width, int *height ) const;
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2000-01-15 05:39:27 -05:00
|
|
|
// these get reimplemented for mono-bitmaps to behave
|
|
|
|
// more like their Win32 couterparts. They now interpret
|
|
|
|
// wxWHITE, wxWHITE_BRUSH and wxWHITE_PEN as drawing 0
|
|
|
|
// and everything else as drawing 1.
|
|
|
|
virtual void SetPen( const wxPen &pen );
|
|
|
|
virtual void SetBrush( const wxBrush &brush );
|
2003-05-01 15:31:30 -04:00
|
|
|
virtual void SetBackground( const wxBrush &brush );
|
2000-01-15 05:39:27 -05:00
|
|
|
virtual void SetTextForeground( const wxColour &col );
|
|
|
|
virtual void SetTextBackground( const wxColour &col );
|
|
|
|
|
1999-11-22 14:44:25 -05:00
|
|
|
// implementation
|
|
|
|
wxBitmap m_selected;
|
1998-12-09 12:30:17 -05:00
|
|
|
|
2006-10-30 14:41:46 -05:00
|
|
|
protected:
|
|
|
|
virtual void DoSelect(const wxBitmap& bitmap);
|
|
|
|
|
1999-11-22 14:44:25 -05:00
|
|
|
private:
|
2006-10-30 14:41:46 -05:00
|
|
|
void Init();
|
|
|
|
|
1999-11-22 14:44:25 -05:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
|
1998-05-20 10:01:55 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// __GTKDCMEMORYH__
|
|
|
|
|