New upstream version 3.23.2
This commit is contained in:
@ -3,12 +3,12 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>GtkWidgetPath: GTK+ 3 Reference Manual</title>
|
||||
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
|
||||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||||
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
|
||||
<link rel="up" href="theming.html" title="Part IV. Theming in GTK+">
|
||||
<link rel="prev" href="gtk3-GtkStyleProperties.html" title="GtkStyleProperties">
|
||||
<link rel="next" href="GtkIconTheme.html" title="GtkIconTheme">
|
||||
<meta name="generator" content="GTK-Doc V1.27 (XML mode)">
|
||||
<meta name="generator" content="GTK-Doc V1.28 (XML mode)">
|
||||
<link rel="stylesheet" href="style.css" type="text/css">
|
||||
</head>
|
||||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||||
@ -374,15 +374,29 @@ updated on widget hierarchy changes.</p>
|
||||
<p>The widget path generation is generally simple:</p>
|
||||
<div class="refsect3">
|
||||
<a name="id-1.5.8.6.5"></a><h4>Defining a button within a window</h4>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
{
|
||||
GtkWidgetPath *path;
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="usertype">GtkWidgetPath</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">path</span><span class="symbol">;</span>
|
||||
|
||||
<span class="normal"> path </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-new">gtk_widget_path_new</a></span><span class="normal"> </span><span class="symbol">();</span>
|
||||
<span class="normal"> </span><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-append-type">gtk_widget_path_append_type</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> GTK_TYPE_WINDOW</span><span class="symbol">);</span>
|
||||
<span class="normal"> </span><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-append-type">gtk_widget_path_append_type</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> GTK_TYPE_BUTTON</span><span class="symbol">);</span>
|
||||
<span class="cbracket">}</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
path = gtk_widget_path_new ();
|
||||
gtk_widget_path_append_type (path, GTK_TYPE_WINDOW);
|
||||
gtk_widget_path_append_type (path, GTK_TYPE_BUTTON);
|
||||
}
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p>Although more complex information, such as widget names, or
|
||||
different classes (property that may be used by other widget
|
||||
@ -390,20 +404,39 @@ types) and intermediate regions may be included:</p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="id-1.5.8.6.6"></a><h4>Defining the first tab widget in a notebook</h4>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
{
|
||||
GtkWidgetPath *path;
|
||||
guint pos;
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
9
|
||||
10
|
||||
11
|
||||
12</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="usertype">GtkWidgetPath</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">path</span><span class="symbol">;</span>
|
||||
<span class="normal"> </span><span class="usertype">guint</span><span class="normal"> pos</span><span class="symbol">;</span>
|
||||
|
||||
path = gtk_widget_path_new ();
|
||||
<span class="normal"> path </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-new">gtk_widget_path_new</a></span><span class="normal"> </span><span class="symbol">();</span>
|
||||
|
||||
pos = gtk_widget_path_append_type (path, GTK_TYPE_NOTEBOOK);
|
||||
gtk_widget_path_iter_add_region (path, pos, "tab", GTK_REGION_EVEN | GTK_REGION_FIRST);
|
||||
<span class="normal"> pos </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-append-type">gtk_widget_path_append_type</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> GTK_TYPE_NOTEBOOK</span><span class="symbol">);</span>
|
||||
<span class="normal"> </span><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-iter-add-region">gtk_widget_path_iter_add_region</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> pos</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"tab"</span><span class="symbol">,</span><span class="normal"> <a href="GtkStyleContext.html#GTK-REGION-EVEN:CAPS">GTK_REGION_EVEN</a> </span><span class="symbol">|</span><span class="normal"> <a href="GtkStyleContext.html#GTK-REGION-FIRST:CAPS">GTK_REGION_FIRST</a></span><span class="symbol">);</span>
|
||||
|
||||
<span class="normal"> pos </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-append-type">gtk_widget_path_append_type</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> GTK_TYPE_LABEL</span><span class="symbol">);</span>
|
||||
<span class="normal"> </span><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-iter-set-name">gtk_widget_path_iter_set_name</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> pos</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"first tab label"</span><span class="symbol">);</span>
|
||||
<span class="cbracket">}</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
pos = gtk_widget_path_append_type (path, GTK_TYPE_LABEL);
|
||||
gtk_widget_path_iter_set_name (path, pos, "first tab label");
|
||||
}
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p>All this information will be used to match the style information
|
||||
that applies to the described widget.</p>
|
||||
@ -1753,16 +1786,32 @@ in the widget hierarchy defined by <em class="parameter"><code>path</code></em>
|
||||
this manually, as this function updates all state flags.</p>
|
||||
<div class="refsect3">
|
||||
<a name="id-1.5.8.7.35.6"></a><h4>Setting a flag</h4>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
gtk_widget_path_iter_set_state (path, pos, gtk_widget_path_iter_get_state (path, pos) | flag);
|
||||
</pre></div>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-iter-set-state">gtk_widget_path_iter_set_state</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> pos</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-iter-get-state">gtk_widget_path_iter_get_state</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> pos</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">|</span><span class="normal"> flag</span><span class="symbol">);</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
<a name="id-1.5.8.7.35.7"></a><h4>Unsetting a flag</h4>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
gtk_widget_path_iter_set_state (path, pos, gtk_widget_path_iter_get_state (path, pos) & ~flag);
|
||||
</pre></div>
|
||||
<div class="informalexample">
|
||||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="listing_lines" align="right"><pre>1</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-iter-set-state">gtk_widget_path_iter_set_state</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> pos</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="gtk3-GtkWidgetPath.html#gtk-widget-path-iter-get-state">gtk_widget_path_iter_get_state</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">path</span><span class="symbol">,</span><span class="normal"> pos</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">&</span><span class="normal"> </span><span class="symbol">~</span><span class="normal">flag</span><span class="symbol">);</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="refsect3">
|
||||
@ -1913,6 +1962,6 @@ that cannot be represented in CSS).</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>Generated by GTK-Doc V1.27</div>
|
||||
<hr>Generated by GTK-Doc V1.28</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user