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

📄 gtklabel.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</table></div></div><hr><div class="refsect2" lang="en"><a name="id3455313"></a><h3><a name="gtk-label-set-ellipsize"></a>gtk_label_set_ellipsize ()</h3><a class="indexterm" name="id3455328"></a><pre class="programlisting">void                gtk_label_set_ellipsize             (<a class="link" href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,                                                         <ahref="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoEllipsizeMode">PangoEllipsizeMode</a> mode);</pre><p>Sets the mode used to ellipsize (add an ellipsis: "...") to the text if there is not enough space to render the entire string.</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>label</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>mode</code></em>&#160;:</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="type">PangoEllipsizeMode</span></a></td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3455424"></a><h3><a name="gtk-label-set-width-chars"></a>gtk_label_set_width_chars ()</h3><a class="indexterm" name="id3455440"></a><pre class="programlisting">void                gtk_label_set_width_chars           (<a class="link" href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> n_chars);</pre><p>Sets the desired width in characters of <em class="parameter"><code>label</code></em> to <em class="parameter"><code>n_chars</code></em>.</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>label</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_chars</code></em>&#160;:</span></p></td><td> the new desired width, in characters.</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3455538"></a><h3><a name="gtk-label-set-max-width-chars"></a>gtk_label_set_max_width_chars ()</h3><a class="indexterm" name="id3455554"></a><pre class="programlisting">void                gtk_label_set_max_width_chars       (<a class="link" href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> n_chars);</pre><p>Sets the desired maximum width in characters of <em class="parameter"><code>label</code></em> to <em class="parameter"><code>n_chars</code></em>.</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>label</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>n_chars</code></em>&#160;:</span></p></td><td> the new desired maximum width, in characters.</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3455653"></a><h3><a name="gtk-label-get"></a>gtk_label_get ()</h3><a class="indexterm" name="id3455668"></a><pre class="programlisting">void                gtk_label_get                       (<a class="link" href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> **str);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_label_get</code> is deprecated and should not be used in newly-written code.</p></div><p>Gets the current string of text within the <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> and writes it tothe given <em class="parameter"><code>str</code></em> argument.  It does not make a copy of this string so youmust not write to it.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>label</code></em>&#160;:</span></p></td><td>The <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widget you want to get the text from.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>str</code></em>&#160;:</span></p></td><td>The reference to the pointer you want to point to the text.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3455774"></a><h3><a name="gtk-label-parse-uline"></a>gtk_label_parse_uline ()</h3><a class="indexterm" name="id3455789"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a>               gtk_label_parse_uline               (<a class="link" href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *string);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_label_parse_uline</code> is deprecated and should not be used in newly-written code.</p></div><p>Parses the given string for underscores and converts the nextcharacter to an underlined character.  The last character thatwas underlined will have its lower-cased accelerator keyval returned  (i.e."_File" would return the keyval for "f".  This isprobably only used within the GTK+ library itself for menu items and such.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>label</code></em>&#160;:</span></p></td><td>The <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> you want to affect.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>string</code></em>&#160;:</span></p></td><td>The string you want to parse for underlines.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td>The lowercase keyval of the last character underlined.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3455897"></a><h3><a name="gtk-label-set-line-wrap"></a>gtk_label_set_line_wrap ()</h3><a class="indexterm" name="id3455910"></a><pre class="programlisting">void                gtk_label_set_line_wrap             (<a class="link" href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> wrap);</pre><p>Toggles line wrapping within the <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a> widget. <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> makes it breaklines if text exceeds the widget's size. <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> lets the text get cut offby the edge of the widget if it exceeds the widget size.</p><p>Note that setting line wrapping to <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> does not make the labelwrap at its parent container's width, because GTK+ widgetsconceptually can't make their requisition depend on the parentcontainer's size. For a label that wraps at a specific position,set the label's width using <a class="link" href="GtkWidget.html#gtk-widget-set-size-request"><code class="function">gtk_widget_set_size_request()</code></a>.</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>label</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>wrap</code></em>&#160;:</span></p></td><td> the setting</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3456050"></a><h3><a name="gtk-label-set-line-wrap-mode"></a>gtk_label_set_line_wrap_mode ()</h3><a class="indexterm" name="id3456066"></a><pre class="programlisting">void                gtk_label_set_line_wrap_mode        (<a class="link" href="GtkLabel.html" title="GtkLabel">GtkLabel</a> *label,                                                         <ahref="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoWrapMode">PangoWrapMode</a> wrap_mode);</pre><p>If line wrapping is on (see <a class="link" href="GtkLabel.html#gtk-label-set-line-wrap"><code class="function">gtk_label_set_line_wrap()</code></a>) this controls howthe line wrapping is done. The default is <ahref="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PANGO-WRAP-WORD:CAPS"><code class="literal">PANGO_WRAP_WORD</code></a> which meanswrap on word boundaries.</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>label</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkLabel.html" title="GtkLabel"><span class="type">GtkLabel</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>wrap_mode</code></em>&#160;:</span></p></td><td> the line wrapping mode</td>

⌨️ 快捷键说明

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