From 48a1108eb87970373e1b1d5debeeaedd8d1916ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Wed, 14 Jun 2006 19:51:14 +0000 Subject: [PATCH] Include wx/font.h according to precompiled headers of wx/wx.h (with other minor cleaning). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/wx.h | 1 + src/cocoa/font.cpp | 3 ++- src/common/gdicmn.cpp | 3 +-- src/gtk/app.cpp | 2 +- src/gtk1/app.cpp | 2 +- src/mac/carbon/utils.cpp | 2 +- src/mac/classic/fontenum.cpp | 26 +++++++++++++------------- src/mac/classic/utils.cpp | 4 +++- src/mac/corefoundation/cfstring.cpp | 14 +++++++------- src/mgl/settings.cpp | 2 +- src/msw/font.cpp | 12 ++++++------ src/msw/menuitem.cpp | 1 - src/os2/checklst.cpp | 2 +- src/os2/font.cpp | 12 ++++-------- src/os2/fontenum.cpp | 7 ++++--- src/os2/gdiobj.cpp | 6 +++++- src/os2/menuitem.cpp | 1 - src/palmos/font.cpp | 3 ++- src/palmos/menuitem.cpp | 1 - 19 files changed, 53 insertions(+), 51 deletions(-) diff --git a/include/wx/wx.h b/include/wx/wx.h index e50e3f9fc7..a3bb3bfe06 100644 --- a/include/wx/wx.h +++ b/include/wx/wx.h @@ -35,6 +35,7 @@ #include "wx/frame.h" #include "wx/bitmap.h" #include "wx/colour.h" +#include "wx/font.h" #include "wx/dc.h" #include "wx/dcclient.h" #include "wx/dcmemory.h" diff --git a/src/cocoa/font.cpp b/src/cocoa/font.cpp index 606e2e3d72..88670a4d87 100644 --- a/src/cocoa/font.cpp +++ b/src/cocoa/font.cpp @@ -11,11 +11,12 @@ #include "wx/wxprec.h" +#include "wx/font.h" + #ifndef WX_PRECOMP #include "wx/string.h" #endif -#include "wx/font.h" #include "wx/gdicmn.h" #include "wx/encinfo.h" diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index a81555a5cc..617a8d344b 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -28,10 +28,9 @@ #include "wx/settings.h" #include "wx/bitmap.h" #include "wx/colour.h" + #include "wx/font.h" #endif -#include "wx/font.h" - WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList; WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList; WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList; diff --git a/src/gtk/app.cpp b/src/gtk/app.cpp index 462ea4940e..1cef9c3ee5 100644 --- a/src/gtk/app.cpp +++ b/src/gtk/app.cpp @@ -26,10 +26,10 @@ #include "wx/settings.h" #include "wx/msgdlg.h" #include "wx/memory.h" + #include "wx/font.h" #endif #include "wx/gdicmn.h" -#include "wx/font.h" #include "wx/file.h" #include "wx/filename.h" #include "wx/module.h" diff --git a/src/gtk1/app.cpp b/src/gtk1/app.cpp index 06a16e3fc0..4d47d138f2 100644 --- a/src/gtk1/app.cpp +++ b/src/gtk1/app.cpp @@ -26,10 +26,10 @@ #include "wx/settings.h" #include "wx/msgdlg.h" #include "wx/memory.h" + #include "wx/font.h" #endif #include "wx/gdicmn.h" -#include "wx/font.h" #include "wx/file.h" #include "wx/filename.h" #include "wx/module.h" diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index 5b715f598e..e903a7d4d4 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -18,6 +18,7 @@ #include "wx/app.h" #if wxUSE_GUI #include "wx/toplevel.h" + #include "wx/font.h" #endif #endif @@ -25,7 +26,6 @@ #if wxUSE_GUI #include "wx/mac/uma.h" - #include "wx/font.h" #endif #include diff --git a/src/mac/classic/fontenum.cpp b/src/mac/classic/fontenum.cpp index e42113729b..11673812fc 100644 --- a/src/mac/classic/fontenum.cpp +++ b/src/mac/classic/fontenum.cpp @@ -1,8 +1,8 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: mac/fontenum.cpp +// Name: src/mac/classic/fontenum.cpp // Purpose: wxFontEnumerator class for MacOS // Author: Stefan Csomor -// Modified by: +// Modified by: // Created: 04/01/98 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor @@ -21,11 +21,11 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop + #pragma hdrstop #endif #ifndef WX_PRECOMP - #include "wx/font.h" + #include "wx/font.h" #endif #include "wx/fontenum.h" @@ -78,7 +78,7 @@ wxFontEnumeratorHelper::wxFontEnumeratorHelper(wxFontEnumerator *fontEnum) { m_fontEnum = fontEnum; m_charset = -1; - m_fixedOnly = FALSE; + m_fixedOnly = false; } bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) @@ -89,13 +89,13 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) if ( !wxFontMapper::Get()->GetAltForEncoding(encoding, &info) ) { // no such encodings at all - return FALSE; + return false; } } m_charset = info.charset; m_facename = info.facename; - return TRUE; + return true; } void wxFontEnumeratorHelper::DoEnumerate() @@ -104,7 +104,7 @@ void wxFontEnumeratorHelper::DoEnumerate() Str255 p_name ; short lines ; - + menu = NewMenu( 32000 , "\pFont" ) ; AppendResMenu( menu , 'FONT' ) ; lines = CountMenuItems( menu ) ; @@ -115,7 +115,7 @@ void wxFontEnumeratorHelper::DoEnumerate() wxString c_name = wxMacMakeStringFromPascal(p_name) ; /* - + if ( m_fixedOnly ) { // check that it's a fixed pitch font (there is *no* error here, the @@ -126,7 +126,7 @@ void wxFontEnumeratorHelper::DoEnumerate() return TRUE; } } - + if ( m_charset != -1 ) { // check that we have the right encoding @@ -135,7 +135,7 @@ void wxFontEnumeratorHelper::DoEnumerate() return TRUE; } } - + */ m_fontEnum->OnFacename( c_name ) ; } @@ -158,12 +158,12 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding, } // else: no such fonts, unknown encoding - return TRUE; + return true; } bool wxFontEnumerator::EnumerateEncodings(const wxString& family) { wxFAIL_MSG(wxT("wxFontEnumerator::EnumerateEncodings() not yet implemented")); - return TRUE; + return true; } diff --git a/src/mac/classic/utils.cpp b/src/mac/classic/utils.cpp index 945f1ac073..7078e7a3c7 100644 --- a/src/mac/classic/utils.cpp +++ b/src/mac/classic/utils.cpp @@ -16,13 +16,15 @@ #ifndef WX_PRECOMP #include "wx/intl.h" #include "wx/app.h" + #if wxUSE_GUI + #include "wx/font.h" + #endif #endif #include "wx/apptrait.h" #if wxUSE_GUI #include "wx/mac/uma.h" - #include "wx/font.h" #endif #include diff --git a/src/mac/corefoundation/cfstring.cpp b/src/mac/corefoundation/cfstring.cpp index 2661bb0af8..ac72e36b7f 100644 --- a/src/mac/corefoundation/cfstring.cpp +++ b/src/mac/corefoundation/cfstring.cpp @@ -10,15 +10,16 @@ ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" + #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/intl.h" + #if wxUSE_GUI + #include "wx/font.h" + #endif #endif -#include "wx/mac/corefoundation/cfstring.h" -#if wxUSE_GUI - #include "wx/font.h" -#endif +#include "wx/mac/corefoundation/cfstring.h" #ifdef __DARWIN__ #include @@ -633,7 +634,7 @@ wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding) // converts this string into a carbon foundation string with optional pc 2 mac encoding void wxMacCFStringHolder::Assign( const wxString &st , wxFontEncoding encoding ) { - Release() ; + Release() ; if (st.IsEmpty()) { m_cfs = CFSTR("") ; @@ -668,7 +669,7 @@ wxString wxMacCFStringHolder::AsString(wxFontEncoding encoding) { if ( m_cfs == NULL ) return wxEmptyString ; - + Size cflen = CFStringGetLength( m_cfs ) ; size_t noChars ; wxChar* buf = NULL ; @@ -706,4 +707,3 @@ wxString wxMacCFStringHolder::AsString(wxFontEncoding encoding) delete[] buf ; return result ; } - diff --git a/src/mgl/settings.cpp b/src/mgl/settings.cpp index b0e7a2be4e..c051f96414 100644 --- a/src/mgl/settings.cpp +++ b/src/mgl/settings.cpp @@ -17,9 +17,9 @@ #ifndef WX_PRECOMP #include "wx/colour.h" + #include "wx/font.h" #endif -#include "wx/font.h" #include "wx/gdicmn.h" #include "wx/module.h" diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 308a36e837..5fcc96ffc8 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -24,11 +24,12 @@ #pragma hdrstop #endif +#include "wx/font.h" + #ifndef WX_PRECOMP #include "wx/list.h" #include "wx/utils.h" #include "wx/app.h" - #include "wx/font.h" #include "wx/log.h" #include "wx/encinfo.h" #endif // WX_PRECOMP @@ -573,7 +574,7 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family) BYTE ff_family; wxArrayString facename; - // the list of fonts associated with a family was partially + // the list of fonts associated with a family was partially // taken from http://www.codestyle.org/css/font-family switch ( family ) @@ -635,9 +636,9 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family) facename.Add(_T("MS Shell Dlg")); // Quoting the MSDN: - // "MS Shell Dlg is a mapping mechanism that enables - // U.S. English Microsoft Windows NT, and Microsoft Windows 2000 to - // support locales that have characters that are not contained in code + // "MS Shell Dlg is a mapping mechanism that enables + // U.S. English Microsoft Windows NT, and Microsoft Windows 2000 to + // support locales that have characters that are not contained in code // page 1252. It is not a font but a face name for a nonexistent font." } } @@ -1095,4 +1096,3 @@ bool wxFont::IsFixedWidth() const return wxFontBase::IsFixedWidth(); } - diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index 8bcbd83aa0..25958f2c6e 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -32,7 +32,6 @@ #include "wx/font.h" #include "wx/bitmap.h" #include "wx/settings.h" - #include "wx/font.h" #include "wx/window.h" #include "wx/accel.h" #include "wx/string.h" diff --git a/src/os2/checklst.cpp b/src/os2/checklst.cpp index b9f6e93e02..8491b44200 100644 --- a/src/os2/checklst.cpp +++ b/src/os2/checklst.cpp @@ -30,9 +30,9 @@ #include "wx/listbox.h" #include "wx/bitmap.h" #include "wx/colour.h" + #include "wx/font.h" #endif -#include "wx/font.h" #include "wx/ownerdrw.h" #define INCL_PM diff --git a/src/os2/font.cpp b/src/os2/font.cpp index 9871769c77..a85ff9d642 100644 --- a/src/os2/font.cpp +++ b/src/os2/font.cpp @@ -20,12 +20,13 @@ // headers // ---------------------------------------------------------------------------- +#include "wx/font.h" + #ifndef WX_PRECOMP #include #include "wx/list.h" #include "wx/utils.h" #include "wx/app.h" - #include "wx/font.h" #include "wx/log.h" #endif // WX_PRECOMP @@ -1135,19 +1136,14 @@ const wxNativeFontInfo* wxFont::GetNativeFontInfo() const // // Internal use only method to set the FONTMETRICS array // -void wxFont::SetFM( - PFONTMETRICS pFM -, int nNumFonts -) +void wxFont::SetFM( PFONTMETRICS pFM, int nNumFonts ) { M_FONTDATA->SetFM(pFM); M_FONTDATA->SetNumFonts(nNumFonts); } // end of wxFont::SetFM -void wxFont::SetPS( - HPS hPS -) +void wxFont::SetPS( HPS hPS ) { Unshare(); diff --git a/src/os2/fontenum.cpp b/src/os2/fontenum.cpp index af3bd9ec78..1af60107aa 100644 --- a/src/os2/fontenum.cpp +++ b/src/os2/fontenum.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////////// -// Name: msw/fontenum.cpp +// Name: src/os2/fontenum.cpp // Purpose: wxFontEnumerator class for Windows // Author: Julian Smart // Modified by: David Webster to add support for font encodings @@ -22,11 +22,12 @@ #if wxUSE_FONTMAP +#include "wx/fontenum.h" + #ifndef WX_PRECOMP - #include "wx/font.h" + #include "wx/font.h" #endif -#include "wx/fontenum.h" #include "wx/fontmap.h" #include "wx/encinfo.h" diff --git a/src/os2/gdiobj.cpp b/src/os2/gdiobj.cpp index 699e33d450..909d5f70b6 100644 --- a/src/os2/gdiobj.cpp +++ b/src/os2/gdiobj.cpp @@ -12,8 +12,12 @@ #include "wx/wxprec.h" #include "wx/gdiobj.h" + +#ifndef WX_PRECOMP + #include "wx/font.h" +#endif + #include "wx/gdicmn.h" -#include "wx/font.h" IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) diff --git a/src/os2/menuitem.cpp b/src/os2/menuitem.cpp index 06ea4c8185..f72deae3e1 100644 --- a/src/os2/menuitem.cpp +++ b/src/os2/menuitem.cpp @@ -22,7 +22,6 @@ #include "wx/font.h" #include "wx/bitmap.h" #include "wx/settings.h" - #include "wx/font.h" #include "wx/window.h" #include "wx/accel.h" #include "wx/menu.h" diff --git a/src/palmos/font.cpp b/src/palmos/font.cpp index 5eebd464f5..643465f864 100644 --- a/src/palmos/font.cpp +++ b/src/palmos/font.cpp @@ -24,11 +24,12 @@ #pragma hdrstop #endif +#include "wx/font.h" + #ifndef WX_PRECOMP #include "wx/list.h" #include "wx/utils.h" #include "wx/app.h" - #include "wx/font.h" #include "wx/log.h" #include "wx/encinfo.h" #endif // WX_PRECOMP diff --git a/src/palmos/menuitem.cpp b/src/palmos/menuitem.cpp index 111a44c494..23d967875c 100644 --- a/src/palmos/menuitem.cpp +++ b/src/palmos/menuitem.cpp @@ -32,7 +32,6 @@ #include "wx/font.h" #include "wx/bitmap.h" #include "wx/settings.h" - #include "wx/font.h" #include "wx/window.h" #include "wx/accel.h" #include "wx/string.h" -- 2.45.2