fixed wxDFB compilation after wxDC-related changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,23 +13,28 @@
|
||||
|
||||
#include "wx/defs.h"
|
||||
#include "wx/region.h"
|
||||
#include "wx/dc.h"
|
||||
#include "wx/dfb/dfbptr.h"
|
||||
|
||||
wxDFB_DECLARE_INTERFACE(IDirectFBSurface);
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxDC
|
||||
// wxDFBDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxDC : public wxDCBase
|
||||
class WXDLLIMPEXP_CORE wxDFBDCImpl : public wxDCImpl
|
||||
{
|
||||
public:
|
||||
wxDC();
|
||||
// ctors
|
||||
wxDFBDCImpl(wxDC *owner) : wxDCImpl(owner) { m_surface = NULL; }
|
||||
wxDFBDCImpl(wxDC *owner, const wxIDirectFBSurfacePtr& surface)
|
||||
: wxDCImpl(owner)
|
||||
{
|
||||
DFBInit(surface);
|
||||
}
|
||||
|
||||
// Ctor.
|
||||
wxDC(const wxIDirectFBSurfacePtr& surface);
|
||||
bool IsOk() const { return m_surface != NULL; }
|
||||
|
||||
public:
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
@@ -80,7 +85,7 @@ protected:
|
||||
wxCoord XLOG2DEVREL(wxCoord x) const { return LogicalToDeviceXRel(x); }
|
||||
wxCoord YLOG2DEV(wxCoord y) const { return LogicalToDeviceY(y); }
|
||||
wxCoord YLOG2DEVREL(wxCoord y) const { return LogicalToDeviceYRel(y); }
|
||||
|
||||
|
||||
// initializes the DC from a surface, must be called if default ctor
|
||||
// was used
|
||||
void DFBInit(const wxIDirectFBSurfacePtr& surface);
|
||||
@@ -158,7 +163,7 @@ protected:
|
||||
|
||||
friend class WXDLLIMPEXP_FWD_CORE wxOverlayImpl; // for Init
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxDC)
|
||||
DECLARE_ABSTRACT_CLASS(wxDFBDCImpl)
|
||||
};
|
||||
|
||||
#endif // _WX_DFB_DC_H_
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/dfb/dcclient.h
|
||||
// Purpose: wxWindowDC, wxClientDC and wxPaintDC
|
||||
// Purpose: wxWindowDCImpl, wxClientDCImpl and wxPaintDCImpl
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2006-08-10
|
||||
// RCS-ID: $Id$
|
||||
@@ -11,20 +11,20 @@
|
||||
#ifndef _WX_DFB_DCCLIENT_H_
|
||||
#define _WX_DFB_DCCLIENT_H_
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/dfb/dc.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxWindowDC
|
||||
// wxWindowDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWindowDC : public wxDC
|
||||
class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxDFBDCImpl
|
||||
{
|
||||
public:
|
||||
wxWindowDC() : m_shouldFlip(false) {}
|
||||
wxWindowDC(wxWindow *win);
|
||||
virtual ~wxWindowDC();
|
||||
wxWindowDCImpl(wxDC *owner) : wxDFBDCImpl(owner), m_shouldFlip(false) { }
|
||||
wxWindowDCImpl(wxDC *owner, wxWindow *win);
|
||||
virtual ~wxWindowDCImpl();
|
||||
|
||||
virtual wxWindow *GetWindow() const { return m_win; }
|
||||
|
||||
@@ -41,37 +41,37 @@ private:
|
||||
|
||||
friend class wxOverlayImpl; // for m_shouldFlip;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxWindowDC)
|
||||
DECLARE_NO_COPY_CLASS(wxWindowDC)
|
||||
DECLARE_DYNAMIC_CLASS(wxWindowDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxWindowDCImpl)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxClientDC
|
||||
// wxClientDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxClientDC : public wxWindowDC
|
||||
class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
wxClientDC() {}
|
||||
wxClientDC(wxWindow *win);
|
||||
wxClientDCImpl(wxDC *owner) : wxWindowDCImpl(owner) { }
|
||||
wxClientDCImpl(wxDC *owner, wxWindow *win);
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxClientDC)
|
||||
DECLARE_NO_COPY_CLASS(wxClientDC)
|
||||
DECLARE_DYNAMIC_CLASS(wxClientDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxClientDCImpl)
|
||||
};
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPaintDC
|
||||
// wxPaintDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLIMPEXP_CORE wxPaintDC : public wxClientDC
|
||||
class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
|
||||
{
|
||||
public:
|
||||
wxPaintDC() {}
|
||||
wxPaintDC(wxWindow *win) : wxClientDC(win) {}
|
||||
wxPaintDCImpl(wxDC *owner) : wxClientDCImpl(owner) { }
|
||||
wxPaintDCImpl(wxDC *owner, wxWindow *win) : wxClientDCImpl(owner, win) { }
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxPaintDC)
|
||||
DECLARE_NO_COPY_CLASS(wxPaintDC)
|
||||
DECLARE_DYNAMIC_CLASS(wxPaintDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxPaintDCImpl)
|
||||
};
|
||||
|
||||
#endif // _WX_DFB_DCCLIENT_H_
|
||||
|
@@ -11,21 +11,30 @@
|
||||
#ifndef _WX_DFB_DCMEMORY_H_
|
||||
#define _WX_DFB_DCMEMORY_H_
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/dfb/dc.h"
|
||||
#include "wx/bitmap.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxMemoryDC : public wxDC, public wxMemoryDCBase
|
||||
class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxDFBDCImpl
|
||||
{
|
||||
public:
|
||||
wxMemoryDC() { Init(); }
|
||||
wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); }
|
||||
wxMemoryDC(wxDC *dc); // create compatible DC
|
||||
wxMemoryDCImpl(wxMemoryDC *owner)
|
||||
: wxDFBDCImpl(owner)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// implementation from now on:
|
||||
wxMemoryDCImpl(wxMemoryDC *owner, wxBitmap& bitmap)
|
||||
: wxDFBDCImpl(owner)
|
||||
{
|
||||
Init();
|
||||
DoSelect(bitmap);
|
||||
}
|
||||
|
||||
wxBitmap GetSelectedObject() const { return m_bmp; }
|
||||
wxMemoryDCImpl(wxMemoryDC *owner, wxDC *dc); // create compatible DC
|
||||
|
||||
protected:
|
||||
// override wxMemoryDC-specific base class virtual methods
|
||||
virtual const wxBitmap& GetSelectedBitmap() const { return m_bmp; }
|
||||
virtual wxBitmap& GetSelectedBitmap() { return m_bmp; }
|
||||
virtual void DoSelect(const wxBitmap& bitmap);
|
||||
|
||||
private:
|
||||
@@ -33,7 +42,7 @@ private:
|
||||
|
||||
wxBitmap m_bmp;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
|
||||
DECLARE_DYNAMIC_CLASS(wxMemoryDCImpl)
|
||||
};
|
||||
|
||||
#endif // _WX_DFB_DCMEMORY_H_
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: wx/dfb/dcscreen.h
|
||||
// Purpose: wxScreenDC declaration
|
||||
// Purpose: wxScreenDCImpl declaration
|
||||
// Author: Vaclav Slavik
|
||||
// Created: 2006-08-10
|
||||
// RCS-ID: $Id$
|
||||
@@ -11,21 +11,14 @@
|
||||
#ifndef _WX_DFB_DCSCREEN_H_
|
||||
#define _WX_DFB_DCSCREEN_H_
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/dfb/dc.h"
|
||||
|
||||
class WXDLLIMPEXP_CORE wxScreenDC: public wxDC
|
||||
class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxDFBDCImpl
|
||||
{
|
||||
public:
|
||||
wxScreenDC();
|
||||
wxScreenDCImpl(wxScreenDC *owner);
|
||||
|
||||
static bool StartDrawingOnTop(wxWindow *WXUNUSED(window))
|
||||
{ return true; }
|
||||
static bool StartDrawingOnTop(wxRect *WXUNUSED(rect) = NULL)
|
||||
{ return true; }
|
||||
static bool EndDrawingOnTop()
|
||||
{ return true; }
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxScreenDC)
|
||||
DECLARE_DYNAMIC_CLASS(wxScreenDCImpl)
|
||||
};
|
||||
|
||||
#endif // _WX_DFB_DCSCREEN_H_
|
||||
|
@@ -191,7 +191,7 @@ private:
|
||||
|
||||
friend class wxNonOwnedWindow; // for HandleXXXEvent
|
||||
friend class wxOverlayImpl; // for Add/RemoveOverlay
|
||||
friend class wxWindowDC; // for PaintOverlays
|
||||
friend class wxWindowDCImpl; // for PaintOverlays
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxWindowDFB)
|
||||
DECLARE_NO_COPY_CLASS(wxWindowDFB)
|
||||
|
Reference in New Issue
Block a user