]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/font.h
Fix wxWebView test setup failure under OS X.
[wxWidgets.git] / interface / wx / font.h
index cde804883bd4471945a1196871b6dca6d51b54e0..766ce5d22595d7f0d8a1691614de03236bc3e5ec 100644 (file)
@@ -112,8 +112,10 @@ enum wxFontFlag
     wxFONTFLAG_ANTIALIASED      = 1 << 4,
     wxFONTFLAG_NOT_ANTIALIASED  = 1 << 5,
 
     wxFONTFLAG_ANTIALIASED      = 1 << 4,
     wxFONTFLAG_NOT_ANTIALIASED  = 1 << 5,
 
-    /// underlined/strikethrough flags (default: no lines)
+    /// Underlined style (not underlined by default).
     wxFONTFLAG_UNDERLINED       = 1 << 6,
     wxFONTFLAG_UNDERLINED       = 1 << 6,
+
+    /// Strike-through style (only supported in wxMSW and wxGTK currently).
     wxFONTFLAG_STRIKETHROUGH    = 1 << 7,
 
     /// the mask of all currently used flags
     wxFONTFLAG_STRIKETHROUGH    = 1 << 7,
 
     /// the mask of all currently used flags
@@ -189,6 +191,8 @@ enum wxFontEncoding
     wxFONTENCODING_CP1255,          //!< WinHebrew
     wxFONTENCODING_CP1256,          //!< WinArabic
     wxFONTENCODING_CP1257,          //!< WinBaltic (same as Latin 7)
     wxFONTENCODING_CP1255,          //!< WinHebrew
     wxFONTENCODING_CP1256,          //!< WinArabic
     wxFONTENCODING_CP1257,          //!< WinBaltic (same as Latin 7)
+    wxFONTENCODING_CP1258,          //!< WinVietnamese (since 2.9.4)
+    wxFONTENCODING_CP1361,          //!< Johab Korean character set (since 2.9.4)
     wxFONTENCODING_CP12_MAX,
 
     wxFONTENCODING_UTF7,            //!< UTF-7 Unicode encoding
     wxFONTENCODING_CP12_MAX,
 
     wxFONTENCODING_UTF7,            //!< UTF-7 Unicode encoding
@@ -260,7 +264,9 @@ enum wxFontEncoding
     wxFONTENCODING_GB2312 = wxFONTENCODING_CP936, //!< Simplified Chinese
     wxFONTENCODING_BIG5 = wxFONTENCODING_CP950,   //!< Traditional Chinese
     wxFONTENCODING_SHIFT_JIS = wxFONTENCODING_CP932, //!< Shift JIS
     wxFONTENCODING_GB2312 = wxFONTENCODING_CP936, //!< Simplified Chinese
     wxFONTENCODING_BIG5 = wxFONTENCODING_CP950,   //!< Traditional Chinese
     wxFONTENCODING_SHIFT_JIS = wxFONTENCODING_CP932, //!< Shift JIS
-    wxFONTENCODING_EUC_KR = wxFONTENCODING_CP949 //!< Korean
+    wxFONTENCODING_EUC_KR = wxFONTENCODING_CP949, //!< Korean
+    wxFONTENCODING_JOHAB = wxFONTENCODING_CP1361, //!< Korean Johab (since 2.9.4)
+    wxFONTENCODING_VIETNAMESE = wxFONTENCODING_CP1258 //!< Vietnamese (since 2.9.4)
 };
 
 
 };
 
 
@@ -404,6 +410,9 @@ public:
         The meaning of the remaining arguments is the same as in the other
         constructors, please see their documentation for details.
 
         The meaning of the remaining arguments is the same as in the other
         constructors, please see their documentation for details.
 
+        Notice that this constructor provides the only way of creating fonts
+        with strike-through style.
+
         @since 2.9.4
      */
     wxFont(int pointSize, wxFontFamily family, int flags,
         @since 2.9.4
      */
     wxFont(int pointSize, wxFontFamily family, int flags,
@@ -541,6 +550,15 @@ public:
     */
     virtual bool GetUnderlined() const;
 
     */
     virtual bool GetUnderlined() const;
 
+    /**
+        Returns @true if the font is stricken-through, @false otherwise.
+
+        @see SetStrikethrough()
+
+        @since 2.9.4
+     */
+    virtual bool GetStrikethrough() const;
+
     /**
         Gets the font weight. See ::wxFontWeight for a list of valid weight identifiers.
 
     /**
         Gets the font weight. See ::wxFontWeight for a list of valid weight identifiers.
 
@@ -627,6 +645,17 @@ public:
      */
     wxFont Underlined() const;
 
      */
     wxFont Underlined() const;
 
+    /**
+        Returns stricken-through version of this font.
+
+        Currently stricken-through fonts are only supported in wxMSW and wxGTK.
+
+        @see MakeStrikethrough()
+
+        @since 2.9.4
+     */
+    wxFont Strikethrough() const;
+
     /**
         Changes this font to be bold.
 
     /**
         Changes this font to be bold.
 
@@ -678,6 +707,17 @@ public:
      */
     wxFont& MakeUnderlined();
 
      */
     wxFont& MakeUnderlined();
 
+    /**
+        Changes this font to be stricken-through.
+
+        Currently stricken-through fonts are only supported in wxMSW and wxGTK.
+
+        @see Strikethrough()
+
+        @since 2.9.4
+    */
+    wxFont& MakeStrikethrough();
+
     /**
         Changes the size of this font.
 
     /**
         Changes the size of this font.
 
@@ -777,7 +817,7 @@ public:
 
         @beginTable
         @hdr3col{platform, generic syntax, example}
 
         @beginTable
         @hdr3col{platform, generic syntax, example}
-        @row3col{wxGTK2, <tt>[FACE-NAME] [bold] [oblique|italic] [POINTSIZE]</tt>, Monospace bold 10}
+        @row3col{wxGTK2, <tt>[underlined] [strikethrough] [FACE-NAME] [bold] [oblique|italic] [POINTSIZE]</tt>, Monospace bold 10}
         @row3col{wxMSW, <tt>[light|bold] [italic] [FACE-NAME] [POINTSIZE] [ENCODING]</tt>, Tahoma 10 WINDOWS-1252}
         @endTable
 
         @row3col{wxMSW, <tt>[light|bold] [italic] [FACE-NAME] [POINTSIZE] [ENCODING]</tt>, Tahoma 10 WINDOWS-1252}
         @endTable
 
@@ -785,7 +825,9 @@ public:
 
         For more detailed information about the allowed syntaxes you can look at the
         documentation of the native API used for font-rendering
 
         For more detailed information about the allowed syntaxes you can look at the
         documentation of the native API used for font-rendering
-        (e.g. @c pango_font_description_from_string on GTK).
+        (e.g. @c pango_font_description_from_string under GTK, although notice
+        that it doesn't support the "underlined" and "strikethrough" attributes
+        and so those are handled by wxWidgets itself).
 
         Note that unlike SetNativeFontInfo(), this function doesn't always restore all
         attributes of the wxFont object under all platforms; e.g. on wxMSW the font family
 
         Note that unlike SetNativeFontInfo(), this function doesn't always restore all
         attributes of the wxFont object under all platforms; e.g. on wxMSW the font family
@@ -869,6 +911,20 @@ public:
     */
     virtual void SetUnderlined(bool underlined);
 
     */
     virtual void SetUnderlined(bool underlined);
 
+    /**
+        Sets strike-through attribute of the font.
+
+        Currently stricken-through fonts are only supported in wxMSW and wxGTK.
+
+        @param strikethrough
+            @true to add strike-through style, @false to remove it.
+
+        @see GetStrikethrough()
+
+        @since 2.9.4
+    */
+    virtual void SetStrikethrough(bool strikethrough);
+
     /**
         Sets the font weight.
 
     /**
         Sets the font weight.
 
@@ -966,25 +1022,25 @@ wxFont wxNullFont;
 
     @see wxSystemSettings
 */
 
     @see wxSystemSettings
 */
-wxFont wxNORMAL_FONT;
+wxFont* wxNORMAL_FONT;
 
 /**
     A font using the @c wxFONTFAMILY_SWISS family and 2 points smaller than
     ::wxNORMAL_FONT.
 */
 
 /**
     A font using the @c wxFONTFAMILY_SWISS family and 2 points smaller than
     ::wxNORMAL_FONT.
 */
-wxFont wxSMALL_FONT;
+wxFont* wxSMALL_FONT;
 
 /**
     A font using the @c wxFONTFAMILY_ROMAN family and @c wxFONTSTYLE_ITALIC style and
     of the same size of ::wxNORMAL_FONT.
 */
 
 /**
     A font using the @c wxFONTFAMILY_ROMAN family and @c wxFONTSTYLE_ITALIC style and
     of the same size of ::wxNORMAL_FONT.
 */
-wxFont wxITALIC_FONT;
+wxFont* wxITALIC_FONT;
 
 /**
     A font identic to ::wxNORMAL_FONT except for the family used which is
     @c wxFONTFAMILY_SWISS.
 */
 
 /**
     A font identic to ::wxNORMAL_FONT except for the family used which is
     @c wxFONTFAMILY_SWISS.
 */
-wxFont wxSWISS_FONT;
+wxFont* wxSWISS_FONT;
 
 
 /**
 
 
 /**
@@ -1006,7 +1062,7 @@ wxFont wxSWISS_FONT;
 
     @see wxFont
 */
 
     @see wxFont
 */
-class wxFontList : public wxList
+class wxFontList
 {
 public:
     /**
 {
 public:
     /**