X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/95fd868c8f92ed40f3a4f16a1b3a38f7ee7d44ec..78606adf3a792c767d6498882e81547990180c96:/src/mac/carbon/fontenum.cpp diff --git a/src/mac/carbon/fontenum.cpp b/src/mac/carbon/fontenum.cpp index 4a91e5703f..83ffa6ef40 100644 --- a/src/mac/carbon/fontenum.cpp +++ b/src/mac/carbon/fontenum.cpp @@ -17,13 +17,11 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ - #pragma implementation "fontenum.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" +#if wxUSE_FONTMAP + #ifdef __BORLANDC__ #pragma hdrstop #endif @@ -36,6 +34,7 @@ #include "wx/fontutil.h" #include "wx/fontmap.h" #include "wx/fontutil.h" +#include "wx/encinfo.h" #include "wx/mac/private.h" @@ -103,46 +102,46 @@ bool wxFontEnumeratorHelper::SetEncoding(wxFontEncoding encoding) void wxFontEnumeratorHelper::DoEnumerate() { - MenuHandle menu ; - Str255 p_name ; - - short lines ; - - menu = NewMenu( 32000 , "\pFont" ) ; - AppendResMenu( menu , 'FONT' ) ; - lines = CountMenuItems( menu ) ; - - for ( int i = 1 ; i < lines+1 ; i ++ ) - { - GetMenuItemText( menu , i , p_name ) ; - wxString c_name = wxMacMakeStringFromPascal(p_name) ; - - /* - - if ( m_fixedOnly ) - { - // check that it's a fixed pitch font (there is *no* error here, the - // flag name is misleading!) - if ( tm->tmPitchAndFamily & TMPF_FIXED_PITCH ) - { - // not a fixed pitch font - return TRUE; - } - } - - if ( m_charset != -1 ) - { - // check that we have the right encoding - if ( lf->lfCharSet != m_charset ) - { - return TRUE; - } - } - - */ - m_fontEnum->OnFacename( c_name ) ; - } - DisposeMenu( menu ) ; + MenuHandle menu ; + Str255 p_name ; + + short lines ; + + menu = NewMenu( 32000 , "\pFont" ) ; + AppendResMenu( menu , 'FONT' ) ; + lines = CountMenuItems( menu ) ; + + for ( int i = 1 ; i < lines+1 ; i ++ ) + { + GetMenuItemText( menu , i , p_name ) ; + wxString c_name = wxMacMakeStringFromPascal(p_name) ; + + /* + + if ( m_fixedOnly ) + { + // check that it's a fixed pitch font (there is *no* error here, the + // flag name is misleading!) + if ( tm->tmPitchAndFamily & TMPF_FIXED_PITCH ) + { + // not a fixed pitch font + return TRUE; + } + } + + if ( m_charset != -1 ) + { + // check that we have the right encoding + if ( lf->lfCharSet != m_charset ) + { + return TRUE; + } + } + + */ + m_fontEnum->OnFacename( c_name ) ; + } + DisposeMenu( menu ) ; } // ---------------------------------------------------------------------------- @@ -170,3 +169,5 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& family) return TRUE; } + +#endif