DC reorganization
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -414,7 +414,7 @@ protected:
|
||||
virtual void DoSetIndent();
|
||||
|
||||
private:
|
||||
friend class wxDataViewCtrlDC;
|
||||
friend class wxDataViewCtrlDCImpl;
|
||||
friend class wxDataViewColumn;
|
||||
friend class wxGtkDataViewModelNotifier;
|
||||
GtkWidget *m_treeview;
|
||||
|
@@ -15,22 +15,11 @@
|
||||
// wxDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
class WXDLLIMPEXP_CORE wxGTKImplDC : public wxImplDC
|
||||
#else
|
||||
#define wxGTKImplDC wxDC
|
||||
class WXDLLIMPEXP_CORE wxDC : public wxDCBase
|
||||
#endif
|
||||
|
||||
class WXDLLIMPEXP_CORE wxGTKDCImpl : public wxDCImpl
|
||||
{
|
||||
public:
|
||||
#if wxUSE_NEW_DC
|
||||
wxGTKImplDC( wxDC *owner );
|
||||
#else
|
||||
wxDC();
|
||||
#endif
|
||||
|
||||
virtual ~wxGTKImplDC();
|
||||
wxGTKDCImpl( wxDC *owner );
|
||||
virtual ~wxGTKDCImpl();
|
||||
|
||||
#if wxUSE_PALETTE
|
||||
void SetColourMap( const wxPalette& palette ) { SetPalette(palette); };
|
||||
@@ -52,10 +41,10 @@ protected:
|
||||
virtual void DoGetSizeMM(int* width, int* height) const;
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxGTKImplDC)
|
||||
DECLARE_ABSTRACT_CLASS(wxGTKDCImpl)
|
||||
};
|
||||
|
||||
// this must be defined when wxDC::Blit() honours the DC origian and needed to
|
||||
// this must be defined when wxDC::Blit() honours the DC origin and needed to
|
||||
// allow wxUniv code in univ/winuniv.cpp to work with versions of wxGTK
|
||||
// 2.3.[23]
|
||||
#ifndef wxHAS_WORKING_GTK_DC_BLIT
|
||||
|
@@ -11,33 +11,23 @@
|
||||
#define __GTKDCCLIENTH__
|
||||
|
||||
#include "wx/dc.h"
|
||||
#include "wx/gtk/dc.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/region.h"
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxWindow;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxWindowDC
|
||||
// wxWindowDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
class WXDLLIMPEXP_CORE wxGTKWindowImplDC : public wxGTKImplDC
|
||||
#else
|
||||
#define wxGTKWindowImplDC wxWindowDC
|
||||
class WXDLLIMPEXP_CORE wxWindowDC : public wxDC
|
||||
#endif
|
||||
class WXDLLIMPEXP_CORE wxWindowDCImpl : public wxGTKDCImpl
|
||||
{
|
||||
public:
|
||||
wxWindowDCImpl( wxDC *owner );
|
||||
wxWindowDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
wxGTKWindowImplDC( wxDC *owner );
|
||||
wxGTKWindowImplDC( wxDC *owner, wxWindow *win );
|
||||
#else
|
||||
wxWindowDC();
|
||||
wxWindowDC( wxWindow *win );
|
||||
#endif
|
||||
|
||||
virtual ~wxGTKWindowImplDC();
|
||||
virtual ~wxWindowDCImpl();
|
||||
|
||||
virtual bool CanDrawBitmap() const { return true; }
|
||||
virtual bool CanGetTextExtent() const { return true; }
|
||||
@@ -116,14 +106,13 @@ public:
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
GdkWindow *m_window;
|
||||
GdkWindow *m_gdkwindow;
|
||||
GdkGC *m_penGC;
|
||||
GdkGC *m_brushGC;
|
||||
GdkGC *m_textGC;
|
||||
GdkGC *m_bgGC;
|
||||
GdkColormap *m_cmap;
|
||||
bool m_isScreenDC;
|
||||
wxWindow *m_owningWindow;
|
||||
wxRegion m_currentClippingRegion;
|
||||
wxRegion m_paintClippingRegion;
|
||||
|
||||
@@ -137,63 +126,43 @@ public:
|
||||
|
||||
virtual void ComputeScaleAndOrigin();
|
||||
|
||||
virtual GdkWindow *GetGDKWindow() const { return m_window; }
|
||||
virtual GdkWindow *GetGDKWindow() const { return m_gdkwindow; }
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxGTKWindowImplDC)
|
||||
DECLARE_ABSTRACT_CLASS(wxWindowDCImpl)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxClientDC
|
||||
// wxClientDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
class WXDLLIMPEXP_CORE wxGTKClientImplDC : public wxGTKWindowImplDC
|
||||
#else
|
||||
#define wxGTKClientImplDC wxClientDC
|
||||
class WXDLLIMPEXP_CORE wxClientDC : public wxWindowDC
|
||||
#endif
|
||||
class WXDLLIMPEXP_CORE wxClientDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
wxGTKClientImplDC( wxDC *owner );
|
||||
wxGTKClientImplDC( wxDC *owner, wxWindow *win );
|
||||
#else
|
||||
wxClientDC();
|
||||
wxClientDC( wxWindow *win );
|
||||
#endif
|
||||
wxClientDCImpl( wxDC *owner );
|
||||
wxClientDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
protected:
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxGTKClientImplDC)
|
||||
DECLARE_ABSTRACT_CLASS(wxClientDCImpl)
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxPaintDC
|
||||
// wxPaintDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
class WXDLLIMPEXP_CORE wxGTKPaintImplDC : public wxGTKClientImplDC
|
||||
#else
|
||||
#define wxGTKPaintImplDC wxPaintDC
|
||||
class WXDLLIMPEXP_CORE wxPaintDC : public wxClientDC
|
||||
#endif
|
||||
class WXDLLIMPEXP_CORE wxPaintDCImpl : public wxClientDCImpl
|
||||
{
|
||||
public:
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
wxGTKPaintImplDC( wxDC *owner );
|
||||
wxGTKPaintImplDC( wxDC *owner, wxWindow *win );
|
||||
#else
|
||||
wxPaintDC();
|
||||
wxPaintDC( wxWindow *win );
|
||||
#endif
|
||||
wxPaintDCImpl( wxDC *owner );
|
||||
wxPaintDCImpl( wxDC *owner, wxWindow *win );
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxGTKPaintImplDC)
|
||||
DECLARE_ABSTRACT_CLASS(wxPaintDCImpl)
|
||||
};
|
||||
|
||||
#endif // __GTKDCCLIENTH__
|
||||
#endif
|
||||
// __GTKDCCLIENTH__
|
||||
|
||||
|
@@ -10,33 +10,21 @@
|
||||
#ifndef _WX_GTK_DCMEMORY_H_
|
||||
#define _WX_GTK_DCMEMORY_H_
|
||||
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/dcmemory.h"
|
||||
#include "wx/gtk/dcclient.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMemoryDC
|
||||
// wxMemoryDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
class WXDLLIMPEXP_CORE wxGTKMemoryImplDC : public wxGTKWindowImplDC
|
||||
#else
|
||||
#define wxGTKMemoryImplDC wxMemoryDC
|
||||
class WXDLLIMPEXP_CORE wxMemoryDC : public wxWindowDC, public wxMemoryDCBase
|
||||
#endif
|
||||
class WXDLLIMPEXP_CORE wxMemoryDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
wxGTKMemoryImplDC( wxMemoryDC *owner );
|
||||
wxGTKMemoryImplDC( wxMemoryDC *owner, wxBitmap& bitmap );
|
||||
wxGTKMemoryImplDC( wxMemoryDC *owner, wxDC *dc );
|
||||
#else
|
||||
wxMemoryDC();
|
||||
wxMemoryDC(wxBitmap& bitmap);
|
||||
wxMemoryDC( wxDC *dc );
|
||||
#endif
|
||||
wxMemoryDCImpl( wxMemoryDC *owner );
|
||||
wxMemoryDCImpl( wxMemoryDC *owner, wxBitmap& bitmap );
|
||||
wxMemoryDCImpl( wxMemoryDC *owner, wxDC *dc );
|
||||
|
||||
virtual ~wxGTKMemoryImplDC();
|
||||
virtual ~wxMemoryDCImpl();
|
||||
|
||||
// these get reimplemented for mono-bitmaps to behave
|
||||
// more like their Win32 couterparts. They now interpret
|
||||
@@ -49,7 +37,7 @@ public:
|
||||
virtual void SetTextBackground( const wxColour &col );
|
||||
|
||||
protected:
|
||||
// overridden from wxImplDC
|
||||
// overridden from wxDCImpl
|
||||
virtual void DoGetSize( int *width, int *height ) const;
|
||||
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
|
||||
|
||||
@@ -66,7 +54,9 @@ private:
|
||||
private:
|
||||
void Init();
|
||||
|
||||
DECLARE_ABSTRACT_CLASS(wxGTKMemoryImplDC)
|
||||
DECLARE_ABSTRACT_CLASS(wxMemoryDCImpl)
|
||||
};
|
||||
|
||||
#endif // _WX_GTK_DCMEMORY_H_
|
||||
#endif
|
||||
// _WX_GTK_DCMEMORY_H_
|
||||
|
||||
|
@@ -10,35 +10,18 @@
|
||||
#ifndef __GTKDCSCREENH__
|
||||
#define __GTKDCSCREENH__
|
||||
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/dcscreen.h"
|
||||
#include "wx/gtk/dcclient.h"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxScreenDC
|
||||
// wxScreenDCImpl
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
class WXDLLIMPEXP_CORE wxGTKScreenImplDC : public wxGTKWindowImplDC
|
||||
#else
|
||||
#define wxGTKScreenImplDC wxScreenDC
|
||||
class WXDLLIMPEXP_CORE wxScreenDC : public wxWindowDC
|
||||
#endif
|
||||
class WXDLLIMPEXP_CORE wxScreenDCImpl : public wxWindowDCImpl
|
||||
{
|
||||
public:
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
wxGTKScreenImplDC( wxScreenDC *owner );
|
||||
#else
|
||||
wxScreenDC();
|
||||
#endif
|
||||
|
||||
~wxGTKScreenImplDC();
|
||||
|
||||
static bool StartDrawingOnTop(wxWindow * WXUNUSED(window))
|
||||
{ return true; }
|
||||
static bool StartDrawingOnTop(wxRect * WXUNUSED(rect) = NULL)
|
||||
{ return true; }
|
||||
static bool EndDrawingOnTop() { return true; }
|
||||
|
||||
wxScreenDCImpl( wxScreenDC *owner );
|
||||
~wxScreenDCImpl();
|
||||
|
||||
protected:
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
@@ -46,7 +29,7 @@ protected:
|
||||
void Init();
|
||||
|
||||
private:
|
||||
DECLARE_ABSTRACT_CLASS(wxGTKScreenImplDC)
|
||||
DECLARE_ABSTRACT_CLASS(wxScreenDCImpl)
|
||||
};
|
||||
|
||||
#endif // __GTKDCSCREENH__
|
||||
|
@@ -92,7 +92,7 @@ public:
|
||||
wxPageSetupDialogData * data = NULL );
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
virtual wxImplDC* CreatePrinterImplDC( wxPrinterDC *owner, const wxPrintData& data );
|
||||
virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
|
||||
#else
|
||||
virtual wxDC* CreatePrinterDC( const wxPrintData& data );
|
||||
#endif
|
||||
@@ -212,19 +212,19 @@ private:
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
class wxGnomePrinterImplDC : public wxImplDC
|
||||
class wxGnomePrinterDCImpl : public wxDCImpl
|
||||
#else
|
||||
#define wxGnomePrinterImplDC wxGnomePrinterDC
|
||||
#define wxGnomePrinterDCImpl wxGnomePrinterDC
|
||||
class wxGnomePrinterDC : public wxDC
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
#if wxUSE_NEW_DC
|
||||
wxGnomePrinterImplDC( wxPrinterDC *owner, const wxPrintData& data );
|
||||
wxGnomePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
|
||||
#else
|
||||
wxGnomePrinterDC( const wxPrintData& data );
|
||||
#endif
|
||||
virtual ~wxGnomePrinterImplDC();
|
||||
virtual ~wxGnomePrinterDCImpl();
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
@@ -307,8 +307,8 @@ private:
|
||||
void makeEllipticalPath(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxGnomePrinterImplDC)
|
||||
DECLARE_NO_COPY_CLASS(wxGnomePrinterImplDC)
|
||||
DECLARE_DYNAMIC_CLASS(wxGnomePrinterDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxGnomePrinterDCImpl)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -54,7 +54,7 @@ public:
|
||||
wxPageSetupDialogData * data = NULL );
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
virtual wxImplDC* CreatePrinterImplDC( wxPrinterDC *owner, const wxPrintData& data );
|
||||
virtual wxDCImpl* CreatePrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
|
||||
#else
|
||||
virtual wxDC* CreatePrinterDC( const wxPrintData& data );
|
||||
#endif
|
||||
@@ -223,19 +223,19 @@ private:
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#if wxUSE_NEW_DC
|
||||
class WXDLLIMPEXP_CORE wxGtkPrinterImplDC : public wxImplDC
|
||||
class WXDLLIMPEXP_CORE wxGtkPrinterDCImpl : public wxDCImpl
|
||||
#else
|
||||
#define wxGtkPrinterImplDC wxGtkPrinterDC
|
||||
#define wxGtkPrinterDCImpl wxGtkPrinterDC
|
||||
class WXDLLIMPEXP_CORE wxGtkPrinterDC : public wxDC
|
||||
#endif
|
||||
{
|
||||
public:
|
||||
#if wxUSE_NEW_DC
|
||||
wxGtkPrinterImplDC( wxPrinterDC *owner, const wxPrintData& data );
|
||||
wxGtkPrinterDCImpl( wxPrinterDC *owner, const wxPrintData& data );
|
||||
#else
|
||||
wxGtkPrinterDC( const wxPrintData& data );
|
||||
#endif
|
||||
virtual ~wxGtkPrinterImplDC();
|
||||
virtual ~wxGtkPrinterDCImpl();
|
||||
|
||||
bool Ok() const { return IsOk(); }
|
||||
bool IsOk() const;
|
||||
@@ -320,8 +320,8 @@ private:
|
||||
double m_PS2DEV;
|
||||
double m_DEV2PS;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkPrinterImplDC)
|
||||
DECLARE_NO_COPY_CLASS(wxGtkPrinterImplDC)
|
||||
DECLARE_DYNAMIC_CLASS(wxGtkPrinterDCImpl)
|
||||
DECLARE_NO_COPY_CLASS(wxGtkPrinterDCImpl)
|
||||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -15,6 +15,9 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "wx/gtk/private/string.h"
|
||||
#include "wx/gtk/dc.h"
|
||||
#include "wx/gtk/dcclient.h"
|
||||
#include "wx/gtk/dcmemory.h"
|
||||
|
||||
// pango_version_check symbol is quite recent ATM (4/2007)... so we
|
||||
// use our own wrapper which implements a smart trick.
|
||||
|
Reference in New Issue
Block a user