1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-23 02:28:01 +00:00
|
|
|
// Name: wx/gtk1/dcmemory.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-05-28 19:54:07 +00:00
|
|
|
// RCS-ID: $Id$
|
1998-10-26 10:56:58 +00:00
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKDCMEMORYH__
|
|
|
|
#define __GTKDCMEMORYH__
|
|
|
|
|
2007-12-21 09:58:20 +00:00
|
|
|
#include "wx/dcmemory.h"
|
2007-12-15 18:20:59 +00:00
|
|
|
#include "wx/gtk1/dcclient.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-12-15 18:20:59 +00:00
|
|
|
class WXDLLIMPEXP_FWD_CORE wxMemoryDCImpl;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
2007-12-15 18:20:59 +00:00
|
|
|
// wxMemoryDCImpl
|
1998-05-20 14:01:55 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2007-12-15 18:20:59 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
1998-12-01 12:55:09 +00:00
|
|
|
public:
|
2007-12-15 18:20:59 +00:00
|
|
|
wxMemoryDCImpl(wxMemoryDC *owner)
|
|
|
|
: wxWindowDCImpl(owner)
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap)
|
|
|
|
: wxWindowDCImpl(owner)
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
|
|
|
|
DoSelect(bitmap);
|
|
|
|
}
|
|
|
|
|
|
|
|
wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc);
|
|
|
|
virtual ~wxMemoryDCImpl();
|
|
|
|
|
|
|
|
virtual void DoSelect(const wxBitmap& bitmap);
|
|
|
|
virtual void DoGetSize( int *width, int *height ) const;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2000-01-15 10:39:27 +00: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 19:31:30 +00:00
|
|
|
virtual void SetBackground( const wxBrush &brush );
|
2000-01-15 10:39:27 +00:00
|
|
|
virtual void SetTextForeground( const wxColour &col );
|
|
|
|
virtual void SetTextBackground( const wxColour &col );
|
|
|
|
|
1999-11-22 19:44:25 +00:00
|
|
|
// implementation
|
|
|
|
wxBitmap m_selected;
|
1998-12-09 17:30:17 +00:00
|
|
|
|
1999-11-22 19:44:25 +00:00
|
|
|
private:
|
2006-10-30 19:41:46 +00:00
|
|
|
void Init();
|
|
|
|
|
2007-12-15 18:20:59 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxMemoryDCImpl)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
2007-12-15 18:20:59 +00:00
|
|
|
#endif // __GTKDCMEMORYH__
|
1998-05-20 14:01:55 +00:00
|
|
|
|