added wxSYS_ICONTITLE_FONT (patch 816026)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-10-16 11:17:38 +00:00
parent 84968677ab
commit 3cb9989457
4 changed files with 18 additions and 3 deletions

View File

@@ -98,6 +98,7 @@ wxMSW:
- make it possible to give focus to the notebook tabs (Hajo Kirchhoff) - make it possible to give focus to the notebook tabs (Hajo Kirchhoff)
- MDI child frames are not always resizeable any more (Andrei Fortuna) - MDI child frames are not always resizeable any more (Andrei Fortuna)
- fixed enumerating of entries/groups under '/' in wxRegConfig - fixed enumerating of entries/groups under '/' in wxRegConfig
- added wxSYS_ICONTITLE_FONT (Andreas Pflug)
wxGTK: wxGTK:

View File

@@ -86,8 +86,10 @@ Returns a system font.
\twocolitem{{\bf wxSYS\_ANSI\_VAR\_FONT}}{Windows variable-pitch (proportional) font.} \twocolitem{{\bf wxSYS\_ANSI\_VAR\_FONT}}{Windows variable-pitch (proportional) font.}
\twocolitem{{\bf wxSYS\_SYSTEM\_FONT}}{System font.} \twocolitem{{\bf wxSYS\_SYSTEM\_FONT}}{System font.}
\twocolitem{{\bf wxSYS\_DEVICE\_DEFAULT\_FONT}}{Device-dependent font (Windows NT only).} \twocolitem{{\bf wxSYS\_DEVICE\_DEFAULT\_FONT}}{Device-dependent font (Windows NT only).}
\twocolitem{{\bf wxSYS\_DEFAULT\_GUI\_FONT}}{Default font for user interface objects such as menus and dialog boxes. \twocolitem{{\bf wxSYS\_DEFAULT\_GUI\_FONT}}{Default font for user interface
Not available in versions of Windows earlier than Windows 95 or Windows NT 4.0.} objects such as menus and dialog boxes.}
\twocolitem{{\bf wxSYS\_ICONTITLE\_FONT}}{Font for the icon titles (Windows
only, same as default GUI font on other platforms}
\end{twocollist} \end{twocollist}
\pythonnote{This static method is implemented in Python as a \pythonnote{This static method is implemented in Python as a

View File

@@ -28,7 +28,11 @@ enum wxSystemFont
wxSYS_DEVICE_DEFAULT_FONT, wxSYS_DEVICE_DEFAULT_FONT,
wxSYS_DEFAULT_PALETTE, wxSYS_DEFAULT_PALETTE,
wxSYS_SYSTEM_FIXED_FONT, wxSYS_SYSTEM_FIXED_FONT,
wxSYS_DEFAULT_GUI_FONT wxSYS_DEFAULT_GUI_FONT,
wxSYS_ICONTITLE_FONT
#ifndef __WXMSW__
= wxSYS_DEFAULT_GUI_FONT
#endif
}; };
// possible values for wxSystemSettings::GetColour() parameter // possible values for wxSystemSettings::GetColour() parameter

View File

@@ -250,6 +250,14 @@ wxFont wxCreateFontFromStockObject(int index)
wxFont wxSystemSettingsNative::GetFont(wxSystemFont index) wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
{ {
// this one is special: we don't get it from GetStockObject()
if ( index == wxSYS_ICONTITLE_FONT )
{
LOGFONT lf;
SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(lf), &lf, 0);
return wxCreateFontFromLogFont(&lf);
}
// wxWindow ctor calls GetSystemFont(wxSYS_DEFAULT_GUI_FONT) so we're // wxWindow ctor calls GetSystemFont(wxSYS_DEFAULT_GUI_FONT) so we're
// called fairly often - this is why we cache this particular font // called fairly often - this is why we cache this particular font
bool isDefaultRequested = index == wxSYS_DEFAULT_GUI_FONT; bool isDefaultRequested = index == wxSYS_DEFAULT_GUI_FONT;