- New AUI library supporting docking windows and much more
+2.7.2
+-----
+
+All (GUI):
+
+- wxMemoryDC constructor now optionally accepts a wxBitmap parameter,
+ calling SelectObject itself if a valid bitmap is passed.
+
+
+
+
2.7.1
-----
\membersection{wxMemoryDC::wxMemoryDC}\label{wxmemorydcctor}
-\func{}{wxMemoryDC}{\void}
+\func{}{wxMemoryDC}{\param{const wxBitmap\& }{bitmap = wxNullBitmap}}
Constructs a new memory device context.
Use the {\it Ok} member to test whether the constructor was successful
-in creating a usable device context. Don't forget to select a bitmap
-into the DC before drawing on it.
+in creating a usable device context. If you don't pass a valid bitmap
+to the constructor, don't forget to select a bitmap into the DC before
+drawing on it.
\membersection{wxMemoryDC::SelectObject}\label{wxmemorydcselectobject}
{
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
public:
- wxMemoryDC(void);
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC( wxDC *dc ); // Create compatible DC
virtual ~wxMemoryDC(void);
virtual void SelectObject(const wxBitmap& bitmap);
class WXDLLIMPEXP_CORE wxMemoryDC : public wxDC
{
public:
- wxMemoryDC();
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC(wxDC *dc); // create compatible DC
virtual void SelectObject(const wxBitmap& bitmap);
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC
{
public:
- wxMemoryDC();
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC( wxDC *dc ); // Create compatible DC
virtual ~wxMemoryDC();
virtual void SelectObject( const wxBitmap& bitmap );
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC
{
public:
- wxMemoryDC();
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC( wxDC *dc ); // Create compatible DC
virtual ~wxMemoryDC();
virtual void SelectObject( const wxBitmap& bitmap );
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
public:
- wxMemoryDC(void);
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC( wxDC *dc ); // Create compatible DC
virtual ~wxMemoryDC(void);
virtual void SelectObject( const wxBitmap& bitmap );
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
public:
- wxMemoryDC(void);
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC( wxDC *dc ); // Create compatible DC
virtual ~wxMemoryDC(void);
virtual void SelectObject( const wxBitmap& bitmap );
class WXDLLEXPORT wxMemoryDC : public wxDC
{
public:
- wxMemoryDC();
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC(wxDC *dc); // Create compatible DC
virtual ~wxMemoryDC();
virtual void SelectObject(const wxBitmap& bitmap);
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
public:
- wxMemoryDC();
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC( wxDC *dc ); // Create compatible DC
virtual ~wxMemoryDC();
class WXDLLEXPORT wxMemoryDC : public wxDC
{
public:
- wxMemoryDC();
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC(wxDC *dc); // Create compatible DC
virtual void SelectObject(const wxBitmap& bitmap);
class WXDLLEXPORT wxMemoryDC: public wxDC
{
public:
- wxMemoryDC(void);
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC(wxDC* pDC); // Create compatible DC
virtual void SelectObject(const wxBitmap& rBitmap);
class WXDLLEXPORT wxMemoryDC : public wxDC
{
public:
- wxMemoryDC();
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC(wxDC *dc); // Create compatible DC
virtual void SelectObject(const wxBitmap& bitmap);
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC
{
public:
- wxMemoryDC();
+ wxMemoryDC( const wxBitmap& bitmap = wxNullBitmap );
wxMemoryDC( wxDC *dc ); // Create compatible DC
virtual ~wxMemoryDC();
virtual void SelectObject( const wxBitmap& bitmap );
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxDC)
-wxMemoryDC::wxMemoryDC(void)
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
{
m_cocoaNSImage = NULL;
m_ok = false;
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxDC)
-wxMemoryDC::wxMemoryDC()
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
{
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc))
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC)
-wxMemoryDC::wxMemoryDC() : wxWindowDC()
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
+ : wxWindowDC()
{
m_ok = false;
pango_context_set_language( m_context, gtk_get_default_language() );
m_layout = pango_layout_new( m_context );
m_fontdesc = pango_font_description_copy( pango_context_get_font_description( m_context ) );
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC)
-wxMemoryDC::wxMemoryDC() : wxWindowDC()
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
+ : wxWindowDC()
{
m_ok = false;
m_cmap = gtk_widget_get_default_colormap();
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC)
-wxMemoryDC::wxMemoryDC()
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
: m_selected()
{
m_ok = true;
SetPen(*wxBLACK_PEN);
SetFont(*wxNORMAL_FONT);
m_ok = false;
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxPaintDC)
-wxMemoryDC::wxMemoryDC(void)
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
: m_selected()
{
m_ok = true;
SetBrush(*wxWHITE_BRUSH);
SetPen(*wxBLACK_PEN);
m_ok = false;
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
};
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC)
-wxMemoryDC::wxMemoryDC() : wxDC()
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
+ : wxDC()
{
m_isMemDC = true;
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC(wxDC *WXUNUSED(dc)) : wxDC()
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC, wxWindowDC)
-wxMemoryDC::wxMemoryDC(void)
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
{
m_ok = true;
m_display = wxGetDisplay();
SetBrush (* wxWHITE_BRUSH);
SetPen (* wxBLACK_PEN);
SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC( wxDC* dc )
// wxMemoryDC
// ----------------------------------------------------------------------------
-wxMemoryDC::wxMemoryDC()
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
{
CreateCompatible(NULL);
Init();
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC(wxDC *dc)
// Memory DC
/////////////////////////////////////////////////////////////////////////////
-wxMemoryDC::wxMemoryDC(void)
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
{
CreateCompatible(NULL);
Init();
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
} // end of wxMemoryDC::wxMemoryDC
wxMemoryDC::wxMemoryDC(
// wxMemoryDC
// ----------------------------------------------------------------------------
-wxMemoryDC::wxMemoryDC()
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
{
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC(wxDC *dc)
IMPLEMENT_DYNAMIC_CLASS(wxMemoryDC,wxWindowDC)
-wxMemoryDC::wxMemoryDC() : wxWindowDC()
+wxMemoryDC::wxMemoryDC( const wxBitmap& bitmap )
+ : wxWindowDC()
{
m_ok = false;
int screen = DefaultScreen( wxGlobalDisplay() );
m_cmap = (WXColormap) DefaultColormap( wxGlobalDisplay(), screen );
+
+ if ( bitmap.IsOk() )
+ SelectObject(bitmap);
}
wxMemoryDC::wxMemoryDC( wxDC *WXUNUSED(dc) )