projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
forward SetFocus() to the directory tree (replaces patch 1831210)
[wxWidgets.git]
/
include
/
wx
/
mac
/
carbon
/
dcmemory.h
diff --git
a/include/wx/mac/carbon/dcmemory.h
b/include/wx/mac/carbon/dcmemory.h
index 0d8b1402bbb9a54efa6b78d40298bbc1e096c34e..d2eb3d4acc3527d585dd444a0b339da2cca5c60a 100644
(file)
--- a/
include/wx/mac/carbon/dcmemory.h
+++ b/
include/wx/mac/carbon/dcmemory.h
@@
-6,30
+6,38
@@
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) Stefan Csomor
-// Licence: wxWi
dget
s licence
+// Licence: wxWi
ndow
s licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCMEMORY_H_
#define _WX_DCMEMORY_H_
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_DCMEMORY_H_
#define _WX_DCMEMORY_H_
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "dcmemory.h"
-#endif
-
#include "wx/dcclient.h"
#include "wx/dcclient.h"
-class WXDLLEXPORT wxMemoryDC: public wxPaintDC
+class WXDLLEXPORT wxMemoryDC: public wxPaintDC
, public wxMemoryDCBase
{
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
{
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
- public:
- wxMemoryDC(void);
+public:
+ wxMemoryDC() { Init(); }
+ wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); }
wxMemoryDC( wxDC *dc ); // Create compatible DC
wxMemoryDC( wxDC *dc ); // Create compatible DC
- ~wxMemoryDC(void);
- virtual void SelectObject( const wxBitmap& bitmap );
+ virtual ~wxMemoryDC(void);
+
+ const wxBitmap& GetSelectedBitmap() const { return m_selected; }
+ wxBitmap GetSelectedBitmap() { return m_selected; }
+
+ wxBitmap GetSelectedObject() { return GetSelectedBitmap() ; }
+
+protected:
virtual void DoGetSize( int *width, int *height ) const;
virtual void DoGetSize( int *width, int *height ) const;
- wxBitmap GetSelectedObject() { return m_selected ; }
- private:
+ virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
+ { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
+ virtual void DoSelect(const wxBitmap& bitmap);
+
+private:
+ void Init();
+
wxBitmap m_selected;
};
wxBitmap m_selected;
};