wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
6.34k stars 1.79k forks source link

wxNativeFontInfo patch #4862

Closed wxtrac closed 3 years ago

wxtrac commented 24 years ago

Issue migrated from trac ticket # 4862

priority: normal

2000-11-28 22:14:37: dbryson created the issue

wxtrac commented 24 years ago

2000-11-28 22:14:37: dbryson uploaded file None (28.8 KiB)

None

wxtrac commented 24 years ago

2000-11-28 22:18:31: dbryson commented


This patch adds a wxNativeFontInfo struct which is used to store the native information required to specify a specific font on the given platform. The wxNativeFontInfo structure has methods (ToString()/FromString()) to allow reading and writing this information in a opaque manner (to your config file, whatever).

The following methods are added to wxFont:

wxFont(const wxNativeFontInfo& info) <- new ctor wxNativeFontInfo GetNativeFontInfo() void SetNativeFontInfo(const wxNativeFontInfo& info)

The only platform for which "real" native font information is implemented is wxGTK. All others use a generic implementation which uses the normal wxFont attributes.

wxFontDialog for wxGTK is modified to use this to allow selection of the initial font.

In addition, the font sample is modified to test this stuff and to fix a bug caused by recent changes to wxGetSingleChoiceIndex().

wxtrac commented 24 years ago

2000-12-18 05:50:13: @vadz commented


applied to wxMSW/wxGTK/wxMotif but not to Mac/OS2 subtrees