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>GtkLevelBar: 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="DisplayWidgets.html" title="Display Widgets">
|
||||
<link rel="prev" href="GtkProgressBar.html" title="GtkProgressBar">
|
||||
<link rel="next" href="GtkStatusbar.html" title="GtkStatusbar">
|
||||
<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">
|
||||
@ -284,7 +284,7 @@
|
||||
<a name="GtkLevelBar.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
|
||||
<p>
|
||||
GtkLevelBar implements
|
||||
AtkImplementor, <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a> and <a class="link" href="gtk3-Orientable.html#GtkOrientable">GtkOrientable</a>.</p>
|
||||
AtkImplementorIface, <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a> and <a class="link" href="gtk3-Orientable.html#GtkOrientable">GtkOrientable</a>.</p>
|
||||
</div>
|
||||
<div class="refsect1">
|
||||
<a name="GtkLevelBar.includes"></a><h2>Includes</h2>
|
||||
@ -307,38 +307,73 @@ when changing the minimum or maximum value. GTK+ will simply clamp
|
||||
them to the new range.</p>
|
||||
<div class="refsect3">
|
||||
<a name="id-1.3.8.7.11.5"></a><h4>Adding a custom offset on the bar</h4>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
<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
|
||||
13
|
||||
14
|
||||
15
|
||||
16
|
||||
17
|
||||
18
|
||||
19
|
||||
20
|
||||
21
|
||||
22
|
||||
23
|
||||
24
|
||||
25
|
||||
26
|
||||
27
|
||||
28
|
||||
29</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="keyword">static</span><span class="normal"> <a href="GtkWidget.html#GtkWidget-struct">GtkWidget</a> </span><span class="symbol">*</span>
|
||||
<span class="function">create_level_bar</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span>
|
||||
<span class="cbracket">{</span>
|
||||
<span class="normal"> </span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">widget</span><span class="symbol">;</span>
|
||||
<span class="normal"> </span><span class="usertype">GtkLevelBar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">bar</span><span class="symbol">;</span>
|
||||
|
||||
static GtkWidget *
|
||||
create_level_bar (void)
|
||||
{
|
||||
GtkWidget *widget;
|
||||
GtkLevelBar *bar;
|
||||
<span class="normal"> widget </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkLevelBar.html#gtk-level-bar-new">gtk_level_bar_new</a></span><span class="normal"> </span><span class="symbol">();</span>
|
||||
<span class="normal"> bar </span><span class="symbol">=</span><span class="normal"> </span><span class="function">GTK_LEVEL_BAR</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">widget</span><span class="symbol">);</span>
|
||||
|
||||
widget = gtk_level_bar_new ();
|
||||
bar = GTK_LEVEL_BAR (widget);
|
||||
<span class="normal"> </span><span class="comment">// This changes the value of the default low offset</span>
|
||||
|
||||
// This changes the value of the default low offset
|
||||
<span class="normal"> </span><span class="function"><a href="GtkLevelBar.html#gtk-level-bar-add-offset-value">gtk_level_bar_add_offset_value</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">bar</span><span class="symbol">,</span>
|
||||
<span class="normal"> <a href="GtkLevelBar.html#GTK-LEVEL-BAR-OFFSET-LOW:CAPS">GTK_LEVEL_BAR_OFFSET_LOW</a></span><span class="symbol">,</span>
|
||||
<span class="normal"> </span><span class="number">0.10</span><span class="symbol">);</span>
|
||||
|
||||
gtk_level_bar_add_offset_value (bar,
|
||||
GTK_LEVEL_BAR_OFFSET_LOW,
|
||||
0.10);
|
||||
<span class="normal"> </span><span class="comment">// This adds a new offset to the bar; the application will</span>
|
||||
<span class="normal"> </span><span class="comment">// be able to change its color CSS like this:</span>
|
||||
<span class="normal"> </span><span class="comment">//</span>
|
||||
<span class="normal"> </span><span class="comment">// levelbar block.my-offset {</span>
|
||||
<span class="normal"> </span><span class="comment">// background-color: magenta;</span>
|
||||
<span class="normal"> </span><span class="comment">// border-style: solid;</span>
|
||||
<span class="normal"> </span><span class="comment">// border-color: black;</span>
|
||||
<span class="normal"> </span><span class="comment">// border-style: 1px;</span>
|
||||
<span class="normal"> </span><span class="comment">// }</span>
|
||||
|
||||
// This adds a new offset to the bar; the application will
|
||||
// be able to change its color CSS like this:
|
||||
//
|
||||
// levelbar block.my-offset {
|
||||
// background-color: magenta;
|
||||
// border-style: solid;
|
||||
// border-color: black;
|
||||
// border-style: 1px;
|
||||
// }
|
||||
<span class="normal"> </span><span class="function"><a href="GtkLevelBar.html#gtk-level-bar-add-offset-value">gtk_level_bar_add_offset_value</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">bar</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"my-offset"</span><span class="symbol">,</span><span class="normal"> </span><span class="number">0.60</span><span class="symbol">);</span>
|
||||
|
||||
gtk_level_bar_add_offset_value (bar, "my-offset", 0.60);
|
||||
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> widget</span><span class="symbol">;</span>
|
||||
<span class="cbracket">}</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
return widget;
|
||||
}
|
||||
</pre></div>
|
||||
<p></p>
|
||||
<p>The default interval of values is between zero and one, but it’s possible to
|
||||
modify the interval using <a class="link" href="GtkLevelBar.html#gtk-level-bar-set-min-value" title="gtk_level_bar_set_min_value ()"><code class="function">gtk_level_bar_set_min_value()</code></a> and
|
||||
@ -363,14 +398,27 @@ each of which must have name and value attributes.</p>
|
||||
<hr>
|
||||
<div class="refsect2">
|
||||
<a name="id-1.3.8.7.11.7"></a><h3>CSS nodes</h3>
|
||||
<div class="informalexample"><pre class="programlisting">
|
||||
levelbar[.discrete]
|
||||
╰── trough
|
||||
├── block.filled.level-name
|
||||
┊
|
||||
├── block.empty
|
||||
┊
|
||||
</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
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6</pre></td>
|
||||
<td class="listing_code"><pre class="programlisting"><span class="normal">levelbar</span><span class="symbol">[.</span><span class="normal">discrete</span><span class="symbol">]</span>
|
||||
<span class="normal">╰── trough</span>
|
||||
<span class="normal"> ├── block</span><span class="symbol">.</span><span class="normal">filled</span><span class="symbol">.</span><span class="normal">level</span><span class="symbol">-</span><span class="normal">name</span>
|
||||
<span class="normal"> ┊</span>
|
||||
<span class="normal"> ├── block</span><span class="symbol">.</span><span class="normal">empty</span>
|
||||
<span class="normal"> ┊</span></pre></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<p></p>
|
||||
<p>GtkLevelBar has a main CSS node with name levelbar and one of the style
|
||||
classes .discrete or .continuous and a subnode with name trough. Below the
|
||||
@ -1062,6 +1110,6 @@ the value of offset "x" changes.</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