X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f76c075805027058f08ffba0e8c1b32372f5fd44..b8737371e220ef1920e6a3d2aed88c4bc2b04daf:/interface/wx/font.h diff --git a/interface/wx/font.h b/interface/wx/font.h index c814de2baa..f9e22b306b 100644 --- a/interface/wx/font.h +++ b/interface/wx/font.h @@ -3,7 +3,7 @@ // Purpose: interface of wxFont // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -237,13 +237,10 @@ enum wxFontEncoding /// (this is used by wxEncodingConverter and wxUTFFile only for now) wxFONTENCODING_UNICODE, - // alternative names for Far Eastern encodings - // Chinese wxFONTENCODING_GB2312 = wxFONTENCODING_CP936, //!< Simplified Chinese wxFONTENCODING_BIG5 = wxFONTENCODING_CP950, //!< Traditional Chinese - - // Japanese (see http://zsigri.tripod.com/fontboard/cjk/jis.html) - wxFONTENCODING_SHIFT_JIS = wxFONTENCODING_CP932 //!< Shift JIS + wxFONTENCODING_SHIFT_JIS = wxFONTENCODING_CP932, //!< Shift JIS + wxFONTENCODING_EUC_KR = wxFONTENCODING_CP949 //!< Korean }; @@ -442,7 +439,9 @@ public: /** Returns the platform-dependent string completely describing this font. - Returned string is always non-empty. + + Returned string is always non-empty unless the font is invalid (in + which case an assert is triggered). Note that the returned string is not meant to be shown or edited by the user: a typical use of this function is for serializing in string-form a wxFont object. @@ -453,7 +452,9 @@ public: /** Returns a user-friendly string for this font object. - Returned string is always non-empty. + + Returned string is always non-empty unless the font is invalid (in + which case an assert is triggered). The string does not encode all wxFont infos under all platforms; e.g. under wxMSW the font family is not present in the returned string. @@ -526,48 +527,119 @@ public: /** @name Similar fonts creation - The functions in this section create a font similar to the given one - but with its weight, style or size changed. + The functions in this section either modify the font in place or create + a new font similar to the given one but with its weight, style or size + changed. */ //@{ /** - Return a bold version of this font. + Returns a bold version of this font. + + @see MakeBold() + + @since 2.9.1 */ - wxFont MakeBold() const; + wxFont Bold() const; /** - Return an italic version of this font. + Returns an italic version of this font. + + @see MakeItalic() + + @since 2.9.1 */ - wxFont MakeItalic() const; + wxFont Italic() const; /** - Return a larger version of this font. + Returns a larger version of this font. + + The font size is multiplied by @c 1.2, the factor of @c 1.2 being + inspired by the W3C CSS specification. - The font size is multiplied by CSS specification inspired factor of @c - 1.2. + @see MakeLarger(), Smaller(), Scaled() - @see MakeSmaller(), Scale() + @since 2.9.1 */ - wxFont MakeLarger() const; + wxFont Larger() const; /** - Return a smaller version of this font. + Returns a smaller version of this font. + + The font size is divided by @c 1.2, the factor of @c 1.2 being + inspired by the W3C CSS specification. - The font size is divided by CSS specification inspired factor of @c - 1.2. + @see MakeSmaller(), Larger(), Scaled() - @see MakeLarger(), Scale() + @since 2.9.1 */ - wxFont MakeSmaller() const; + wxFont Smaller() const; /** - Return a scaled version of this font. + Changes this font to be bold. + + @see Bold() + + @since 2.9.1 + */ + wxFont& MakeBold(); + + /** + Changes this font to be italic. + + @see Italic() + + @since 2.9.1 + */ + wxFont& MakeItalic(); + + /** + Changes this font to be larger. + + The font size is multiplied by @c 1.2, the factor of @c 1.2 being + inspired by the W3C CSS specification. + + @see Larger(), MakeSmaller(), Scale() + + @since 2.9.1 + */ + wxFont& MakeLarger(); + + /** + Changes this font to be smaller. + + The font size is divided by @c 1.2, the factor of @c 1.2 being + inspired by the W3C CSS specification. + + @see Smaller(), MakeLarger(), Scale() + + @since 2.9.1 + */ + wxFont& MakeSmaller(); + + /** + Changes the size of this font. The font size is multiplied by the given factor (which may be less than 1 to create a smaller version of the font). + + @see Scaled(), MakeLarger(), MakeSmaller() + + @since 2.9.1 + */ + wxFont& Scale(float x); + + /** + Returns a scaled version of this font. + + The font size is multiplied by the given factor (which may be less than + 1 to create a smaller version of the font). + + @see Scale(), Larger(), Smaller() + + @since 2.9.1 */ - wxFont Scale(float x) const; + wxFont Scaled(float x) const; //@}