File: setting-the-page-flow.html

package info (click to toggle)
gtk%2B2.0 2.24.33-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie, trixie-proposed-updates, trixie-updates
  • size: 124,860 kB
  • sloc: ansic: 574,091; makefile: 5,171; sh: 4,618; xml: 1,193; python: 1,117; perl: 749; awk: 49; cpp: 34
file content (76 lines) | stat: -rw-r--r-- 3,952 bytes parent folder | download | duplicates (3)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Setting the page flow: GTK+ 2 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
<link rel="prev" href="decorating-the-assistant-pages.html" title="Decorating the assistant pages">
<link rel="next" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts"></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gtk-migrating-GtkAssistant.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="decorating-the-assistant-pages.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gtk-migrating-GtkRecentChooser.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="setting-the-page-flow"></a>Setting the page flow</h2></div></div></div>
<p>
      Here is the area where <span class="structname">GtkAssistant</span> and <span class="structname">GnomeDruid</span>
	 differ the most. While <span class="structname">GnomeDruid</span> used the "next" and "back" signals from the 
	 <span class="structname">GnomeDruidPage</span>, <span class="structname">GtkAssistant</span> uses the following
	 techniques:
    </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><a class="link" href="GtkAssistant.html#gtk-assistant-set-forward-page-func" title="gtk_assistant_set_forward_page_func ()"><code class="function">gtk_assistant_set_forward_page_func()</code></a>: Allows to define a GtkAssistantPageFunc to let the
	   assistant know which will be the following page given the current page.</p></li>
<li class="listitem"><p><a class="link" href="GtkAssistant.html#gtk-assistant-set-page-complete" title="gtk_assistant_set_page_complete ()"><code class="function">gtk_assistant_set_page_complete()</code></a>: Lets the assistant know whether the specified page is complete
	   or not, updating buttons state accordingly.</p></li>
<li class="listitem">
<p><a class="link" href="GtkAssistant.html#gtk-assistant-set-page-type" title="gtk_assistant_set_page_type ()"><code class="function">gtk_assistant_set_page_type()</code></a>: Lets the assistant know the page role and update the buttons
	   state accordingly. Pages can have the following roles:</p>
<table border="0" summary="Simple list" class="simplelist">
<tr><td>Intro</td></tr>
<tr><td>Content</td></tr>
<tr><td>Progress</td></tr>
<tr><td>Confirmation</td></tr>
<tr><td>Summary</td></tr>
</table>
</li>
</ul></div>
<p>
      A sample GtkAssistantPageFunc could look like this:
    </p>
<pre class="programlisting">
static gint
forward_page_function (gint     current_page,
                       gpointer data)
{
  switch (current_page)
    {
    case 0:
      return 1;
    case 1:
      if (check_page1_data ())
	   return 2;
	 else
	   return 3;
    case 2:
      return 3;
    default:
      return -1;
    }
}
    </pre>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.0</div>
</body>
</html>