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

📄 gtkcellrenderertext.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 4 页
字号:
href="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoStyle">PangoStyle</a>            : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--style-set">style-set</a>"                <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--text">text</a>"                     <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a>            : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--underline">underline</a>"                <ahref="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoUnderline">PangoUnderline</a>        : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--underline-set">underline-set</a>"            <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--variant">variant</a>"                  <ahref="/usr/share/gtk-doc/html/pango/pango-Fonts.html#PangoVariant">PangoVariant</a>          : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--variant-set">variant-set</a>"              <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--weight">weight</a>"                   <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                  : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--weight-set">weight-set</a>"               <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--width-chars">width-chars</a>"              <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                  : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--wrap-mode">wrap-mode</a>"                <ahref="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoWrapMode">PangoWrapMode</a>         : Read / Write  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText--wrap-width">wrap-width</a>"               <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                  : Read / Write</pre></div><div class="refsect1" lang="en"><a name="id3839066"></a><h2>Signals</h2><pre class="synopsis">  "<a class="link" href="GtkCellRendererText.html#GtkCellRendererText-edited">edited</a>"                                         : Run Last</pre></div><div class="refsect1" lang="en"><a name="id3839094"></a><h2>Description</h2><p>A <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a> renders a given text in its cell, using the font, color and style information provided by its properties. The text will be ellipsized if it is too long and the <a class="link" href="GtkCellRendererText.html#GtkCellRendererText--ellipsize">ellipsize</a> property allows it.</p><p>If the <a class="link" href="GtkCellRenderer.html#GtkCellRenderer--mode">mode</a> is <a class="link" href="GtkCellRenderer.html#GTK-CELL-RENDERER-MODE-EDITABLE:CAPS"><code class="literal">GTK_CELL_RENDERER_MODE_EDITABLE</code></a>,the <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a> allows to edit its text using an entry.</p></div><div class="refsect1" lang="en"><a name="id3839159"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id3839169"></a><h3><a name="GtkCellRendererText-struct"></a>GtkCellRendererText</h3><a class="indexterm" name="id3839182"></a><pre class="programlisting">typedef struct _GtkCellRendererText GtkCellRendererText;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id3839198"></a><h3><a name="gtk-cell-renderer-text-new"></a>gtk_cell_renderer_text_new ()</h3><a class="indexterm" name="id3839211"></a><pre class="programlisting"><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a>*    gtk_cell_renderer_text_new          (void);</pre><p>Creates a new <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a>. Adjust how text is drawn usingobject properties. Object properties can beset globally (with <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-set"><code class="function">g_object_set()</code></a>). Also, with <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a>,you can bind a property to a value in a <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>. For example,you can bind the "text" property on the cell renderer to a stringvalue in the model, thus rendering a different string in each rowof the <a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a></p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the new cell renderer</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3839298"></a><h3><a name="gtk-cell-renderer-text-set-fixed-height-from-font"></a>gtk_cell_renderer_text_set_fixed_height_from_font ()</h3><a class="indexterm" name="id3839313"></a><pre class="programlisting">void                gtk_cell_renderer_text_set_fixed_height_from_font                                                        (<a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText">GtkCellRendererText</a> *renderer,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> number_of_rows);</pre><p>Sets the height of a renderer to explicitly be determined by the "font" and"y_pad" property set on it.  Further changes in these properties do notaffect the height, so they must be accompanied by a subsequent call to thisfunction.  Using this function is unflexible, and should really only be usedif calculating the size of a cell is too slow (ie, a massive number of cellsdisplayed).  If <em class="parameter"><code>number_of_rows</code></em> is -1, then the fixed height is unset, andthe height is determined by the properties again.</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>renderer</code></em>&#160;:</span></p></td><td> A <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>number_of_rows</code></em>&#160;:</span></p></td><td> Number of rows of text each cell renderer is allocated, or -1</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3839411"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3839421"></a><h3><a name="GtkCellRendererText--align-set"></a>The <code class="literal">"align-set"</code> property</h3><a class="indexterm" name="id3839438"></a><pre class="programlisting">  "align-set"                <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write</pre><p>Whether this tag affects the alignment mode.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id3839465"></a><h3><a name="GtkCellRendererText--alignment"></a>The <code class="literal">"alignment"</code> property</h3><a class="indexterm" name="id3839482"></a><pre class="programlisting">  "alignment"                <ahref="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoAlignment">PangoAlignment</a>        : Read / Write</pre><p>Specifies how to align the lines of text with respect to each other. </p><p>Note that this property describes how to align the lines of text in case there are several of them. The "xalign" property of <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a>, on the other hand, sets the horizontal alignment of the whole text.</p><p></p><p>Default value: PANGO_ALIGN_LEFT</p><p>Since  2.10</p></div><hr><div class="refsect2" lang="en"><a name="id3839533"></a><h3><a name="GtkCellRendererText--attributes"></a>The <code class="literal">"attributes"</code> property</h3><a class="indexterm" name="id3839550"></a><pre class="programlisting">  "attributes"               <ahref="/usr/share/gtk-doc/html/pango/pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a>         : Read / Write</pre><p>A list of style attributes to apply to the text of the renderer.</p></div><hr><div class="refsect2" lang="en"><a name="id3839574"></a><h3><a name="GtkCellRendererText--background"></a>The <code class="literal">"background"</code> property</h3><a class="indexterm" name="id3839591"></a><pre class="programlisting">  "background"               <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a>            : Write</pre><p>Background color as a string.</p><p>Default value: NULL</p></div><hr><div class="refsect2" lang="en"><a name="id3839617"></a><h3><a name="GtkCellRendererText--background-gdk"></a>The <code class="literal">"background-gdk"</code> property</h3><a class="indexterm" name="id3839634"></a><pre class="programlisting">  "background-gdk"           <ahref="/usr/share/gtk-doc/html/gdk/gdk-Colormaps-and-Colors.html#GdkColor">GdkColor</a>              : Read / Write</pre><p>Background color as a GdkColor.</p></div><hr><div class="refsect2" lang="en"><a name="id3839657"></a><h3><a name="GtkCellRendererText--background-set"></a>The <code class="literal">"background-set"</code> property</h3><a class="indexterm" name="id3839674"></a><pre class="programlisting">  "background-set"           <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write</pre><p>Whether this tag affects the background color.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id3839702"></a><h3><a name="GtkCellRendererText--editable"></a>The <code class="literal">"editable"</code> property</h3><a class="indexterm" name="id3839718"></a><pre class="programlisting">  "editable"                 <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write</pre><p>Whether the text can be modified by the user.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id3839745"></a><h3><a name="GtkCellRendererText--editable-set"></a>The <code class="literal">"editable-set"</code> property</h3><a class="indexterm" name="id3839762"></a><pre class="programlisting">  "editable-set"             <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>              : Read / Write</pre><p>Whether this tag affects text editability.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id3839789"></a><h3><a name="GtkCellRendererText--ellipsize"></a>The <code class="literal">"ellipsize"</code> property</h3><a class="indexterm" name="id3839806"></a><pre class="programlisting">  "ellipsize"                <ahref="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoEllipsizeMode">PangoEllipsizeMode</a>    : Read / Write</pre>

⌨️ 快捷键说明

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