⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtkfontselection.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<h3 class="title">Warning</h3><p><code class="literal">gtk_font_selection_get_font</code> is deprecated and should not be used in newly-written code.</p></div><p>Gets the currently-selected font.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fontsel</code></em>&#160;:</span></p></td><td>a <a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td>the currently-selected font, or NULL if no font is selected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4051321"></a><h3><a name="gtk-font-selection-get-font-name"></a>gtk_font_selection_get_font_name ()</h3><a class="indexterm" name="id4051335"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a>*              gtk_font_selection_get_font_name    (<a class="link" href="GtkFontSelection.html" title="GtkFontSelection">GtkFontSelection</a> *fontsel);</pre><p>Gets the currently-selected font name.  Note that this can be a differentstring than what you set with <a class="link" href="GtkFontSelection.html#gtk-font-selection-set-font-name"><code class="function">gtk_font_selection_set_font_name()</code></a>, asthe font selection widget may normalize font names and thus return a stringwith a different structure.  For example, "Helvetica Italic Bold 12" could benormalized to "Helvetica Bold Italic 12".  Use <ahref="/usr/share/gtk-doc/html/pango/pango-Fonts.html#pango-font-description-equal"><code class="function">pango_font_description_equal()</code></a>if you want to compare two font descriptions.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fontsel</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> A string with the name of the current font, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><span class="type">NULL</span></a> if no fontis selected.  You must free this string with <ahref="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4051453"></a><h3><a name="gtk-font-selection-set-font-name"></a>gtk_font_selection_set_font_name ()</h3><a class="indexterm" name="id4051467"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            gtk_font_selection_set_font_name    (<a class="link" href="GtkFontSelection.html" title="GtkFontSelection">GtkFontSelection</a> *fontsel,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *fontname);</pre><p>Sets the currently-selected font.  Note that the <em class="parameter"><code>fontsel</code></em> needs to know thescreen in which it will appear for this to work; this can be guaranteed bysimply making sure that the <em class="parameter"><code>fontsel</code></em> is inserted in a toplevel window beforeyou call this function.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fontsel</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>fontname</code></em>&#160;:</span></p></td><td> a font name like "Helvetica 12" or "Times Bold 18"</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if the font could be set successfully; <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a> if no suchfont exists or if the <em class="parameter"><code>fontsel</code></em> doesn't belong to a particular screen yet.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4051597"></a><h3><a name="gtk-font-selection-get-preview-text"></a>gtk_font_selection_get_preview_text ()</h3><a class="indexterm" name="id4051612"></a><pre class="programlisting">const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a>*        gtk_font_selection_get_preview_text (<a class="link" href="GtkFontSelection.html" title="GtkFontSelection">GtkFontSelection</a> *fontsel);</pre><p>Gets the text displayed in the preview area.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fontsel</code></em>&#160;:</span></p></td><td>a <a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td>the text displayed in the preview area. This string is owned by the widget and should not be modified or freed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4051680"></a><h3><a name="gtk-font-selection-set-preview-text"></a>gtk_font_selection_set_preview_text ()</h3><a class="indexterm" name="id4051695"></a><pre class="programlisting">void                gtk_font_selection_set_preview_text (<a class="link" href="GtkFontSelection.html" title="GtkFontSelection">GtkFontSelection</a> *fontsel,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *text);</pre><p>Sets the text displayed in the preview area.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fontsel</code></em>&#160;:</span></p></td><td>a <a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>text</code></em>&#160;:</span></p></td><td>the text to display in the preview area.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id4051773"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id4051784"></a><h3><a name="GtkFontSelection--font"></a>The <code class="literal">"font"</code> property</h3><a class="indexterm" name="id4051800"></a><pre class="programlisting">  "font"                     <ahref="/usr/share/gtk-doc/html/gdk/gdk-Fonts.html#GdkFont">GdkFont</a>               : Read</pre><p>The GdkFont that is currently selected.</p></div><hr><div class="refsect2" lang="en"><a name="id4051823"></a><h3><a name="GtkFontSelection--font-name"></a>The <code class="literal">"font-name"</code> property</h3><a class="indexterm" name="id4051840"></a><pre class="programlisting">  "font-name"                <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a>            : Read / Write</pre><p>The X string that represents this font.</p><p>Default value: NULL</p></div><hr><div class="refsect2" lang="en"><a name="id4051866"></a><h3><a name="GtkFontSelection--preview-text"></a>The <code class="literal">"preview-text"</code> property</h3><a class="indexterm" name="id4051883"></a><pre class="programlisting">  "preview-text"             <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a>            : Read / Write</pre><p>The text to display in order to demonstrate the selected font.</p><p>Default value: "abcdefghijk ABCDEFGHIJK"</p></div></div><div class="refsect1" lang="en"><a name="id4051911"></a><h2>See Also</h2><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a class="link" href="GtkFontSelectionDialog.html" title="GtkFontSelectionDialog"><span class="type">GtkFontSelectionDialog</span></a></span></p></td><td><p>a dialog box which uses <a class="link" href="GtkFontSelection.html" title="GtkFontSelection"><span class="type">GtkFontSelection</span></a>.</p></td></tr></tbody></table></div><p></p></div><div class="refsect1" lang="en"><a name="id4051950"></a><div class="refsect2" lang="en"><a name="id4051951"></a></div><hr><div class="refsect2" lang="en"><a name="id4051952"></a></div></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -