From e1bf3ad3e8f34361824a801008d47833ac71dcb1 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 3 Nov 2004 21:13:28 +0000 Subject: [PATCH] Applied patch to reorder includes. Not the most important patch in the world, but still. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30247 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/bitmap.cpp | 2 +- src/gtk/colour.cpp | 2 +- src/gtk/evtloop.cpp | 5 +---- src/gtk/fontdlg.cpp | 2 +- src/gtk/frame.cpp | 1 + src/gtk/gnome/gprint.cpp | 20 ++++++++++++++++++++ src/gtk/menu.cpp | 2 +- src/gtk/msgdlg.cpp | 2 +- src/gtk/region.cpp | 4 +--- src/gtk/renderer.cpp | 5 +---- src/gtk/scrolwin.cpp | 3 +-- src/gtk/taskbar.cpp | 2 +- src/gtk/threadno.cpp | 2 +- src/gtk/threadsgi.cpp | 2 +- src/gtk/tooltip.cpp | 2 +- src/gtk/toplevel.cpp | 1 + src/gtk1/bitmap.cpp | 2 +- src/gtk1/colour.cpp | 2 +- src/gtk1/evtloop.cpp | 5 +---- src/gtk1/fontdlg.cpp | 2 +- src/gtk1/frame.cpp | 1 + src/gtk1/gnome/gprint.cpp | 20 ++++++++++++++++++++ src/gtk1/menu.cpp | 2 +- src/gtk1/msgdlg.cpp | 2 +- src/gtk1/region.cpp | 4 +--- src/gtk1/renderer.cpp | 5 +---- src/gtk1/scrolwin.cpp | 3 +-- src/gtk1/taskbar.cpp | 2 +- src/gtk1/threadno.cpp | 2 +- src/gtk1/threadsgi.cpp | 2 +- src/gtk1/tooltip.cpp | 2 +- src/gtk1/toplevel.cpp | 1 + 32 files changed, 70 insertions(+), 44 deletions(-) diff --git a/src/gtk/bitmap.cpp b/src/gtk/bitmap.cpp index 10b8e7063d..4950f9508a 100644 --- a/src/gtk/bitmap.cpp +++ b/src/gtk/bitmap.cpp @@ -16,8 +16,8 @@ #include "wx/defs.h" -#include "wx/palette.h" #include "wx/bitmap.h" +#include "wx/palette.h" #include "wx/icon.h" #include "wx/filefn.h" #include "wx/image.h" diff --git a/src/gtk/colour.cpp b/src/gtk/colour.cpp index ebb55bb7b0..60735789eb 100644 --- a/src/gtk/colour.cpp +++ b/src/gtk/colour.cpp @@ -15,8 +15,8 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/gdicmn.h" #include "wx/colour.h" +#include "wx/gdicmn.h" #include "wx/gtk/private.h" #include diff --git a/src/gtk/evtloop.cpp b/src/gtk/evtloop.cpp index 74d4132b43..d89a31d44f 100644 --- a/src/gtk/evtloop.cpp +++ b/src/gtk/evtloop.cpp @@ -28,11 +28,8 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP -#endif //WX_PRECOMP - -#include "wx/app.h" #include "wx/evtloop.h" +#include "wx/app.h" #include diff --git a/src/gtk/fontdlg.cpp b/src/gtk/fontdlg.cpp index fe2fe16ec3..76811ec307 100644 --- a/src/gtk/fontdlg.cpp +++ b/src/gtk/fontdlg.cpp @@ -20,8 +20,8 @@ #ifndef __WXGPE__ -#include "wx/fontutil.h" #include "wx/fontdlg.h" +#include "wx/fontutil.h" #include "wx/utils.h" #include "wx/intl.h" #include "wx/debug.h" diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index f1f4317e11..c6043a88c6 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -24,6 +24,7 @@ #include "wx/defs.h" +#include "wx/frame.h" #include "wx/dialog.h" #include "wx/control.h" #include "wx/app.h" diff --git a/src/gtk/gnome/gprint.cpp b/src/gtk/gnome/gprint.cpp index 9f0903dc80..3c9c2622e0 100644 --- a/src/gtk/gnome/gprint.cpp +++ b/src/gtk/gnome/gprint.cpp @@ -442,14 +442,34 @@ bool wxGnomePrintDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord void wxGnomePrintDC::DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y ) { + DoDrawBitmap( icon, x, y, true ); } void wxGnomePrintDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask ) { + if (!bitmap.Ok()) return; + +#if 0 + // TODO do something clever here + if (bitmap.HasPixbuf()) + { + } + else +#endif + { + wxImage image = bitmap.ConvertToImage(); + + if (!image.Ok()) return; + + gnome_print_moveto (m_gpc, XLOG2DEV(x), YLOG2DEV(y) ); + gnome_print_rgbimage( m_gpc, (guchar*) image.GetData(), image.GetWidth(), image.GetHeight(), image.GetWidth()*3 ); + } } void wxGnomePrintDC::DoDrawText(const wxString& text, wxCoord x, wxCoord y ) { + return; + if (m_textForegroundColour.Ok()) { unsigned char red = m_textForegroundColour.Red(); diff --git a/src/gtk/menu.cpp b/src/gtk/menu.cpp index d957352dbf..82956da0a6 100644 --- a/src/gtk/menu.cpp +++ b/src/gtk/menu.cpp @@ -15,11 +15,11 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/menu.h" #include "wx/log.h" #include "wx/intl.h" #include "wx/app.h" #include "wx/bitmap.h" -#include "wx/menu.h" #if wxUSE_ACCEL #include "wx/accel.h" diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp index eaa3d7cf3a..4ee201a9f2 100644 --- a/src/gtk/msgdlg.cpp +++ b/src/gtk/msgdlg.cpp @@ -22,10 +22,10 @@ #if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__) +#include "wx/msgdlg.h" #include "wx/gtk/private.h" #include -#include "wx/msgdlg.h" #include "wx/intl.h" IMPLEMENT_CLASS(wxMessageDialog, wxDialog) diff --git a/src/gtk/region.cpp b/src/gtk/region.cpp index 20746fb14b..5807eabbee 100644 --- a/src/gtk/region.cpp +++ b/src/gtk/region.cpp @@ -23,10 +23,8 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/log.h" - #include "wx/region.h" - +#include "wx/log.h" #include "wx/gtk/private.h" #ifndef __WXGTK20__ diff --git a/src/gtk/renderer.cpp b/src/gtk/renderer.cpp index aa02feb193..c6d47c1f4a 100644 --- a/src/gtk/renderer.cpp +++ b/src/gtk/renderer.cpp @@ -24,15 +24,12 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP -#endif // WX_PRECOMP - +#include "wx/renderer.h" #include #include "wx/gtk/win_gtk.h" #include "wx/window.h" #include "wx/dc.h" -#include "wx/renderer.h" #ifdef __WXGTK20__ #include "wx/settings.h" diff --git a/src/gtk/scrolwin.cpp b/src/gtk/scrolwin.cpp index 4d82bb3209..fd31b4e024 100644 --- a/src/gtk/scrolwin.cpp +++ b/src/gtk/scrolwin.cpp @@ -28,10 +28,9 @@ #pragma hdrstop #endif +#include "wx/scrolwin.h" #include "wx/utils.h" #include "wx/dcclient.h" - -#include "wx/scrolwin.h" #include "wx/panel.h" #include "wx/sizer.h" diff --git a/src/gtk/taskbar.cpp b/src/gtk/taskbar.cpp index 85dd72c3e2..be0e53af49 100644 --- a/src/gtk/taskbar.cpp +++ b/src/gtk/taskbar.cpp @@ -16,6 +16,7 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/gtk/taskbarpriv.h" #include "wx/log.h" #include "wx/frame.h" @@ -25,7 +26,6 @@ #include #if GTK_CHECK_VERSION(2, 1, 0) -#include "wx/gtk/taskbarpriv.h" #include "eggtrayicon.h" wxTaskBarIconAreaBase::wxTaskBarIconAreaBase() diff --git a/src/gtk/threadno.cpp b/src/gtk/threadno.cpp index 8907b7d39d..c31f6c8454 100644 --- a/src/gtk/threadno.cpp +++ b/src/gtk/threadno.cpp @@ -16,9 +16,9 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/thread.h" #include "wx/wx.h" #include "wx/module.h" -#include "wx/thread.h" #include "wx/log.h" wxMutex::wxMutex() diff --git a/src/gtk/threadsgi.cpp b/src/gtk/threadsgi.cpp index cc65251bb0..b869e4ed4c 100644 --- a/src/gtk/threadsgi.cpp +++ b/src/gtk/threadsgi.cpp @@ -15,13 +15,13 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/thread.h" #include #include #include #include #include -#include "wx/thread.h" #include "wx/module.h" #include "wx/utils.h" #include "wx/log.h" diff --git a/src/gtk/tooltip.cpp b/src/gtk/tooltip.cpp index 3a679894d2..5f428af202 100644 --- a/src/gtk/tooltip.cpp +++ b/src/gtk/tooltip.cpp @@ -18,8 +18,8 @@ #if wxUSE_TOOLTIPS -#include "wx/window.h" #include "wx/tooltip.h" +#include "wx/window.h" #include "wx/gtk/private.h" diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index a622a7e248..1de5cf38e1 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -28,6 +28,7 @@ #include "wx/defs.h" +#include "wx/toplevel.h" #include "wx/log.h" #include "wx/dialog.h" #include "wx/control.h" diff --git a/src/gtk1/bitmap.cpp b/src/gtk1/bitmap.cpp index 10b8e7063d..4950f9508a 100644 --- a/src/gtk1/bitmap.cpp +++ b/src/gtk1/bitmap.cpp @@ -16,8 +16,8 @@ #include "wx/defs.h" -#include "wx/palette.h" #include "wx/bitmap.h" +#include "wx/palette.h" #include "wx/icon.h" #include "wx/filefn.h" #include "wx/image.h" diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index ebb55bb7b0..60735789eb 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -15,8 +15,8 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/gdicmn.h" #include "wx/colour.h" +#include "wx/gdicmn.h" #include "wx/gtk/private.h" #include diff --git a/src/gtk1/evtloop.cpp b/src/gtk1/evtloop.cpp index 74d4132b43..d89a31d44f 100644 --- a/src/gtk1/evtloop.cpp +++ b/src/gtk1/evtloop.cpp @@ -28,11 +28,8 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP -#endif //WX_PRECOMP - -#include "wx/app.h" #include "wx/evtloop.h" +#include "wx/app.h" #include diff --git a/src/gtk1/fontdlg.cpp b/src/gtk1/fontdlg.cpp index fe2fe16ec3..76811ec307 100644 --- a/src/gtk1/fontdlg.cpp +++ b/src/gtk1/fontdlg.cpp @@ -20,8 +20,8 @@ #ifndef __WXGPE__ -#include "wx/fontutil.h" #include "wx/fontdlg.h" +#include "wx/fontutil.h" #include "wx/utils.h" #include "wx/intl.h" #include "wx/debug.h" diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index f1f4317e11..c6043a88c6 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -24,6 +24,7 @@ #include "wx/defs.h" +#include "wx/frame.h" #include "wx/dialog.h" #include "wx/control.h" #include "wx/app.h" diff --git a/src/gtk1/gnome/gprint.cpp b/src/gtk1/gnome/gprint.cpp index 9f0903dc80..3c9c2622e0 100644 --- a/src/gtk1/gnome/gprint.cpp +++ b/src/gtk1/gnome/gprint.cpp @@ -442,14 +442,34 @@ bool wxGnomePrintDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord void wxGnomePrintDC::DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y ) { + DoDrawBitmap( icon, x, y, true ); } void wxGnomePrintDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask ) { + if (!bitmap.Ok()) return; + +#if 0 + // TODO do something clever here + if (bitmap.HasPixbuf()) + { + } + else +#endif + { + wxImage image = bitmap.ConvertToImage(); + + if (!image.Ok()) return; + + gnome_print_moveto (m_gpc, XLOG2DEV(x), YLOG2DEV(y) ); + gnome_print_rgbimage( m_gpc, (guchar*) image.GetData(), image.GetWidth(), image.GetHeight(), image.GetWidth()*3 ); + } } void wxGnomePrintDC::DoDrawText(const wxString& text, wxCoord x, wxCoord y ) { + return; + if (m_textForegroundColour.Ok()) { unsigned char red = m_textForegroundColour.Red(); diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index d957352dbf..82956da0a6 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -15,11 +15,11 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/menu.h" #include "wx/log.h" #include "wx/intl.h" #include "wx/app.h" #include "wx/bitmap.h" -#include "wx/menu.h" #if wxUSE_ACCEL #include "wx/accel.h" diff --git a/src/gtk1/msgdlg.cpp b/src/gtk1/msgdlg.cpp index eaa3d7cf3a..4ee201a9f2 100644 --- a/src/gtk1/msgdlg.cpp +++ b/src/gtk1/msgdlg.cpp @@ -22,10 +22,10 @@ #if wxUSE_MSGDLG && defined(__WXGTK20__) && !defined(__WXGPE__) +#include "wx/msgdlg.h" #include "wx/gtk/private.h" #include -#include "wx/msgdlg.h" #include "wx/intl.h" IMPLEMENT_CLASS(wxMessageDialog, wxDialog) diff --git a/src/gtk1/region.cpp b/src/gtk1/region.cpp index 20746fb14b..5807eabbee 100644 --- a/src/gtk1/region.cpp +++ b/src/gtk1/region.cpp @@ -23,10 +23,8 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/log.h" - #include "wx/region.h" - +#include "wx/log.h" #include "wx/gtk/private.h" #ifndef __WXGTK20__ diff --git a/src/gtk1/renderer.cpp b/src/gtk1/renderer.cpp index aa02feb193..c6d47c1f4a 100644 --- a/src/gtk1/renderer.cpp +++ b/src/gtk1/renderer.cpp @@ -24,15 +24,12 @@ #pragma hdrstop #endif -#ifndef WX_PRECOMP -#endif // WX_PRECOMP - +#include "wx/renderer.h" #include #include "wx/gtk/win_gtk.h" #include "wx/window.h" #include "wx/dc.h" -#include "wx/renderer.h" #ifdef __WXGTK20__ #include "wx/settings.h" diff --git a/src/gtk1/scrolwin.cpp b/src/gtk1/scrolwin.cpp index 4d82bb3209..fd31b4e024 100644 --- a/src/gtk1/scrolwin.cpp +++ b/src/gtk1/scrolwin.cpp @@ -28,10 +28,9 @@ #pragma hdrstop #endif +#include "wx/scrolwin.h" #include "wx/utils.h" #include "wx/dcclient.h" - -#include "wx/scrolwin.h" #include "wx/panel.h" #include "wx/sizer.h" diff --git a/src/gtk1/taskbar.cpp b/src/gtk1/taskbar.cpp index 85dd72c3e2..be0e53af49 100644 --- a/src/gtk1/taskbar.cpp +++ b/src/gtk1/taskbar.cpp @@ -16,6 +16,7 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/gtk/taskbarpriv.h" #include "wx/log.h" #include "wx/frame.h" @@ -25,7 +26,6 @@ #include #if GTK_CHECK_VERSION(2, 1, 0) -#include "wx/gtk/taskbarpriv.h" #include "eggtrayicon.h" wxTaskBarIconAreaBase::wxTaskBarIconAreaBase() diff --git a/src/gtk1/threadno.cpp b/src/gtk1/threadno.cpp index 8907b7d39d..c31f6c8454 100644 --- a/src/gtk1/threadno.cpp +++ b/src/gtk1/threadno.cpp @@ -16,9 +16,9 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/thread.h" #include "wx/wx.h" #include "wx/module.h" -#include "wx/thread.h" #include "wx/log.h" wxMutex::wxMutex() diff --git a/src/gtk1/threadsgi.cpp b/src/gtk1/threadsgi.cpp index cc65251bb0..b869e4ed4c 100644 --- a/src/gtk1/threadsgi.cpp +++ b/src/gtk1/threadsgi.cpp @@ -15,13 +15,13 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#include "wx/thread.h" #include #include #include #include #include -#include "wx/thread.h" #include "wx/module.h" #include "wx/utils.h" #include "wx/log.h" diff --git a/src/gtk1/tooltip.cpp b/src/gtk1/tooltip.cpp index 3a679894d2..5f428af202 100644 --- a/src/gtk1/tooltip.cpp +++ b/src/gtk1/tooltip.cpp @@ -18,8 +18,8 @@ #if wxUSE_TOOLTIPS -#include "wx/window.h" #include "wx/tooltip.h" +#include "wx/window.h" #include "wx/gtk/private.h" diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index a622a7e248..1de5cf38e1 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -28,6 +28,7 @@ #include "wx/defs.h" +#include "wx/toplevel.h" #include "wx/log.h" #include "wx/dialog.h" #include "wx/control.h"