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
This commit is contained in:
Włodzimierz Skiba
2006-06-14 19:51:14 +00:00
parent 54a6176249
commit 48a1108eb8
19 changed files with 53 additions and 51 deletions

View File

@@ -35,6 +35,7 @@
#include "wx/frame.h" #include "wx/frame.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/colour.h" #include "wx/colour.h"
#include "wx/font.h"
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
#include "wx/dcmemory.h" #include "wx/dcmemory.h"

View File

@@ -11,11 +11,12 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/font.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#endif #endif
#include "wx/font.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/encinfo.h" #include "wx/encinfo.h"

View File

@@ -28,10 +28,9 @@
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/colour.h" #include "wx/colour.h"
#include "wx/font.h"
#endif #endif
#include "wx/font.h"
WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList; WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList;
WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList; WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList;
WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList; WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList;

View File

@@ -26,10 +26,10 @@
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/memory.h" #include "wx/memory.h"
#include "wx/font.h"
#endif #endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/font.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/filename.h" #include "wx/filename.h"
#include "wx/module.h" #include "wx/module.h"

View File

@@ -26,10 +26,10 @@
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/msgdlg.h" #include "wx/msgdlg.h"
#include "wx/memory.h" #include "wx/memory.h"
#include "wx/font.h"
#endif #endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/font.h"
#include "wx/file.h" #include "wx/file.h"
#include "wx/filename.h" #include "wx/filename.h"
#include "wx/module.h" #include "wx/module.h"

View File

@@ -18,6 +18,7 @@
#include "wx/app.h" #include "wx/app.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/toplevel.h" #include "wx/toplevel.h"
#include "wx/font.h"
#endif #endif
#endif #endif
@@ -25,7 +26,6 @@
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#include "wx/font.h"
#endif #endif
#include <ctype.h> #include <ctype.h>

View File

@@ -1,8 +1,8 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: mac/fontenum.cpp // Name: src/mac/classic/fontenum.cpp
// Purpose: wxFontEnumerator class for MacOS // Purpose: wxFontEnumerator class for MacOS
// Author: Stefan Csomor // Author: Stefan Csomor
// Modified by: // Modified by:
// Created: 04/01/98 // Created: 04/01/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
@@ -21,11 +21,11 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifdef __BORLANDC__ #ifdef __BORLANDC__
#pragma hdrstop #pragma hdrstop
#endif #endif
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/font.h" #include "wx/font.h"
#endif #endif
#include "wx/fontenum.h" #include "wx/fontenum.h"
@@ -78,7 +78,7 @@ wxFontEnumeratorHelper::wxFontEnumeratorHelper(wxFontEnumerator *fontEnum)
{ {
m_fontEnum = fontEnum; m_fontEnum = fontEnum;
m_charset = -1; m_charset = -1;
m_fixedOnly = FALSE; m_fixedOnly = false;
} }
bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
@@ -89,13 +89,13 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding)
if ( !wxFontMapper::Get()->GetAltForEncoding(encoding, &info) ) if ( !wxFontMapper::Get()->GetAltForEncoding(encoding, &info) )
{ {
// no such encodings at all // no such encodings at all
return FALSE; return false;
} }
} }
m_charset = info.charset; m_charset = info.charset;
m_facename = info.facename; m_facename = info.facename;
return TRUE; return true;
} }
void wxFontEnumeratorHelper::DoEnumerate() void wxFontEnumeratorHelper::DoEnumerate()
@@ -104,7 +104,7 @@ void wxFontEnumeratorHelper::DoEnumerate()
Str255 p_name ; Str255 p_name ;
short lines ; short lines ;
menu = NewMenu( 32000 , "\pFont" ) ; menu = NewMenu( 32000 , "\pFont" ) ;
AppendResMenu( menu , 'FONT' ) ; AppendResMenu( menu , 'FONT' ) ;
lines = CountMenuItems( menu ) ; lines = CountMenuItems( menu ) ;
@@ -115,7 +115,7 @@ void wxFontEnumeratorHelper::DoEnumerate()
wxString c_name = wxMacMakeStringFromPascal(p_name) ; wxString c_name = wxMacMakeStringFromPascal(p_name) ;
/* /*
if ( m_fixedOnly ) if ( m_fixedOnly )
{ {
// check that it's a fixed pitch font (there is *no* error here, the // check that it's a fixed pitch font (there is *no* error here, the
@@ -126,7 +126,7 @@ void wxFontEnumeratorHelper::DoEnumerate()
return TRUE; return TRUE;
} }
} }
if ( m_charset != -1 ) if ( m_charset != -1 )
{ {
// check that we have the right encoding // check that we have the right encoding
@@ -135,7 +135,7 @@ void wxFontEnumeratorHelper::DoEnumerate()
return TRUE; return TRUE;
} }
} }
*/ */
m_fontEnum->OnFacename( c_name ) ; m_fontEnum->OnFacename( c_name ) ;
} }
@@ -158,12 +158,12 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
} }
// else: no such fonts, unknown encoding // else: no such fonts, unknown encoding
return TRUE; return true;
} }
bool wxFontEnumerator::EnumerateEncodings(const wxString& family) bool wxFontEnumerator::EnumerateEncodings(const wxString& family)
{ {
wxFAIL_MSG(wxT("wxFontEnumerator::EnumerateEncodings() not yet implemented")); wxFAIL_MSG(wxT("wxFontEnumerator::EnumerateEncodings() not yet implemented"));
return TRUE; return true;
} }

View File

@@ -16,13 +16,15 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/intl.h" #include "wx/intl.h"
#include "wx/app.h" #include "wx/app.h"
#if wxUSE_GUI
#include "wx/font.h"
#endif
#endif #endif
#include "wx/apptrait.h" #include "wx/apptrait.h"
#if wxUSE_GUI #if wxUSE_GUI
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#include "wx/font.h"
#endif #endif
#include <ctype.h> #include <ctype.h>

View File

@@ -10,15 +10,16 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h" #include "wx/wxprec.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/string.h" #include "wx/string.h"
#include "wx/intl.h" #include "wx/intl.h"
#if wxUSE_GUI
#include "wx/font.h"
#endif
#endif #endif
#include "wx/mac/corefoundation/cfstring.h"
#if wxUSE_GUI #include "wx/mac/corefoundation/cfstring.h"
#include "wx/font.h"
#endif
#ifdef __DARWIN__ #ifdef __DARWIN__
#include <CoreServices/CoreServices.h> #include <CoreServices/CoreServices.h>
@@ -633,7 +634,7 @@ wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding)
// converts this string into a carbon foundation string with optional pc 2 mac encoding // converts this string into a carbon foundation string with optional pc 2 mac encoding
void wxMacCFStringHolder::Assign( const wxString &st , wxFontEncoding encoding ) void wxMacCFStringHolder::Assign( const wxString &st , wxFontEncoding encoding )
{ {
Release() ; Release() ;
if (st.IsEmpty()) if (st.IsEmpty())
{ {
m_cfs = CFSTR("") ; m_cfs = CFSTR("") ;
@@ -668,7 +669,7 @@ wxString wxMacCFStringHolder::AsString(wxFontEncoding encoding)
{ {
if ( m_cfs == NULL ) if ( m_cfs == NULL )
return wxEmptyString ; return wxEmptyString ;
Size cflen = CFStringGetLength( m_cfs ) ; Size cflen = CFStringGetLength( m_cfs ) ;
size_t noChars ; size_t noChars ;
wxChar* buf = NULL ; wxChar* buf = NULL ;
@@ -706,4 +707,3 @@ wxString wxMacCFStringHolder::AsString(wxFontEncoding encoding)
delete[] buf ; delete[] buf ;
return result ; return result ;
} }

View File

@@ -17,9 +17,9 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/colour.h" #include "wx/colour.h"
#include "wx/font.h"
#endif #endif
#include "wx/font.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/module.h" #include "wx/module.h"

View File

@@ -24,11 +24,12 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/font.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/list.h" #include "wx/list.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/font.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/encinfo.h" #include "wx/encinfo.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
@@ -573,7 +574,7 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family)
BYTE ff_family; BYTE ff_family;
wxArrayString facename; 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 // taken from http://www.codestyle.org/css/font-family
switch ( family ) switch ( family )
@@ -635,9 +636,9 @@ void wxNativeFontInfo::SetFamily(wxFontFamily family)
facename.Add(_T("MS Shell Dlg")); facename.Add(_T("MS Shell Dlg"));
// Quoting the MSDN: // Quoting the MSDN:
// "MS Shell Dlg is a mapping mechanism that enables // "MS Shell Dlg is a mapping mechanism that enables
// U.S. English Microsoft Windows NT, and Microsoft Windows 2000 to // U.S. English Microsoft Windows NT, and Microsoft Windows 2000 to
// support locales that have characters that are not contained in code // 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." // 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(); return wxFontBase::IsFixedWidth();
} }

View File

@@ -32,7 +32,6 @@
#include "wx/font.h" #include "wx/font.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/font.h"
#include "wx/window.h" #include "wx/window.h"
#include "wx/accel.h" #include "wx/accel.h"
#include "wx/string.h" #include "wx/string.h"

View File

@@ -30,9 +30,9 @@
#include "wx/listbox.h" #include "wx/listbox.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/colour.h" #include "wx/colour.h"
#include "wx/font.h"
#endif #endif
#include "wx/font.h"
#include "wx/ownerdrw.h" #include "wx/ownerdrw.h"
#define INCL_PM #define INCL_PM

View File

@@ -20,12 +20,13 @@
// headers // headers
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#include "wx/font.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include <stdio.h> #include <stdio.h>
#include "wx/list.h" #include "wx/list.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/font.h"
#include "wx/log.h" #include "wx/log.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP
@@ -1135,19 +1136,14 @@ const wxNativeFontInfo* wxFont::GetNativeFontInfo() const
// //
// Internal use only method to set the FONTMETRICS array // Internal use only method to set the FONTMETRICS array
// //
void wxFont::SetFM( void wxFont::SetFM( PFONTMETRICS pFM, int nNumFonts )
PFONTMETRICS pFM
, int nNumFonts
)
{ {
M_FONTDATA->SetFM(pFM); M_FONTDATA->SetFM(pFM);
M_FONTDATA->SetNumFonts(nNumFonts); M_FONTDATA->SetNumFonts(nNumFonts);
} // end of wxFont::SetFM } // end of wxFont::SetFM
void wxFont::SetPS( void wxFont::SetPS( HPS hPS )
HPS hPS
)
{ {
Unshare(); Unshare();

View File

@@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: msw/fontenum.cpp // Name: src/os2/fontenum.cpp
// Purpose: wxFontEnumerator class for Windows // Purpose: wxFontEnumerator class for Windows
// Author: Julian Smart // Author: Julian Smart
// Modified by: David Webster to add support for font encodings // Modified by: David Webster to add support for font encodings
@@ -22,11 +22,12 @@
#if wxUSE_FONTMAP #if wxUSE_FONTMAP
#include "wx/fontenum.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/font.h" #include "wx/font.h"
#endif #endif
#include "wx/fontenum.h"
#include "wx/fontmap.h" #include "wx/fontmap.h"
#include "wx/encinfo.h" #include "wx/encinfo.h"

View File

@@ -12,8 +12,12 @@
#include "wx/wxprec.h" #include "wx/wxprec.h"
#include "wx/gdiobj.h" #include "wx/gdiobj.h"
#ifndef WX_PRECOMP
#include "wx/font.h"
#endif
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/font.h"
IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject)

View File

@@ -22,7 +22,6 @@
#include "wx/font.h" #include "wx/font.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/font.h"
#include "wx/window.h" #include "wx/window.h"
#include "wx/accel.h" #include "wx/accel.h"
#include "wx/menu.h" #include "wx/menu.h"

View File

@@ -24,11 +24,12 @@
#pragma hdrstop #pragma hdrstop
#endif #endif
#include "wx/font.h"
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/list.h" #include "wx/list.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/font.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/encinfo.h" #include "wx/encinfo.h"
#endif // WX_PRECOMP #endif // WX_PRECOMP

View File

@@ -32,7 +32,6 @@
#include "wx/font.h" #include "wx/font.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
#include "wx/settings.h" #include "wx/settings.h"
#include "wx/font.h"
#include "wx/window.h" #include "wx/window.h"
#include "wx/accel.h" #include "wx/accel.h"
#include "wx/string.h" #include "wx/string.h"